src/core/boolean.h
changeset 2452 8efda0e4423a
parent 2451 8979f07befd5
child 2453 57fe34e08d8d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/boolean.h	Thu Feb 21 18:57:34 2008 +0100
@@ -0,0 +1,33 @@
+#ifndef BOOLEAN_VALUE_H
+#define BOOLEAN_VALUE_H
+
+#include "attribute.h"
+#include "attribute-helper.h"
+
+namespace ns3 {
+
+class Boolean
+{
+public:
+  Boolean ();
+  Boolean (bool value);
+  void Set (bool value);
+  bool Get (void) const;
+
+  operator bool () const;
+
+  ATTRIBUTE_CONVERTER_DEFINE (Boolean);
+private:
+  bool m_value;
+};
+
+std::ostream & operator << (std::ostream &os, const Boolean &value);
+std::istream & operator >> (std::istream &is, Boolean &value);
+
+ATTRIBUTE_VALUE_DEFINE (Boolean);
+ATTRIBUTE_CHECKER_DEFINE (Boolean);
+ATTRIBUTE_ACCESSOR_DEFINE (Boolean);
+
+} // namespace ns3
+
+#endif /* BOOLEAN_PARAMETER_H */