src/core/boolean-value.h
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 21 Feb 2008 18:54:02 +0100
changeset 2451 8979f07befd5
parent 2441 d4a91f8bb374
permissions -rw-r--r--
value-helper.h -> attribute-helper.h
mathieu@2371
     1
#ifndef BOOLEAN_VALUE_H
mathieu@2371
     2
#define BOOLEAN_VALUE_H
mathieu@2371
     3
mathieu@2438
     4
#include "attribute.h"
mathieu@2451
     5
#include "attribute-helper.h"
mathieu@2371
     6
mathieu@2371
     7
namespace ns3 {
mathieu@2371
     8
mathieu@2441
     9
class Boolean
mathieu@2371
    10
{
mathieu@2371
    11
public:
mathieu@2441
    12
  Boolean ();
mathieu@2441
    13
  Boolean (bool value);
mathieu@2371
    14
  void Set (bool value);
mathieu@2371
    15
  bool Get (void) const;
mathieu@2371
    16
mathieu@2441
    17
  operator bool () const;
mathieu@2372
    18
mathieu@2441
    19
  ATTRIBUTE_CONVERTER_DEFINE (Boolean);
mathieu@2371
    20
private:
mathieu@2371
    21
  bool m_value;
mathieu@2371
    22
};
mathieu@2371
    23
mathieu@2441
    24
std::ostream & operator << (std::ostream &os, const Boolean &value);
mathieu@2441
    25
std::istream & operator >> (std::istream &is, Boolean &value);
mathieu@2410
    26
mathieu@2441
    27
ATTRIBUTE_VALUE_DEFINE (Boolean);
mathieu@2441
    28
ATTRIBUTE_CHECKER_DEFINE (Boolean);
mathieu@2441
    29
ATTRIBUTE_ACCESSOR_DEFINE (Boolean);
mathieu@2371
    30
mathieu@2371
    31
} // namespace ns3
mathieu@2371
    32
mathieu@2371
    33
#endif /* BOOLEAN_PARAMETER_H */