This commit adds 'Bound' class which expresses value range of each
variable as min/max.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
--- /dev/null
+#ifndef __NEST_BOUND_H__
+#define __NEST_BOUND_H__
+
+#include <cstdint>
+
+namespace nest
+{
+
+class Bound
+{
+public:
+ Bound() = default;
+
+public:
+ Bound(int64_t min, int64_t max) : _min{min}, _max{max}
+ {
+ // DO NOTHING
+ }
+
+public:
+ int64_t min(void) const { return _min; }
+ int64_t max(void) const { return _max; }
+
+private:
+ int64_t _min;
+ int64_t _max;
+};
+
+} // namespace nest
+
+#endif // __NEST_BOUND_H__
--- /dev/null
+#include "nest/Bound.h"
+
+#include <gtest/gtest.h>
+
+TEST(BOUND, ctor)
+{
+ const nest::Bound b{-10, 20};
+
+ ASSERT_EQ(b.min(), -10);
+ ASSERT_EQ(b.max(), 20);
+}