All these macros can be used to generate automatically the code for subclasses of AttributeValue, AttributeAccessor, and, AttributeChecker, which can be used to give attribute powers to a normal class. More...
Macros | |
#define | ATTRIBUTE_ACCESSOR_DEFINE(type) |
#define | ATTRIBUTE_CHECKER_DEFINE(type) |
#define | ATTRIBUTE_CHECKER_IMPLEMENT(type) |
#define | ATTRIBUTE_CHECKER_IMPLEMENT_WITH_NAME(type, name) |
#define | ATTRIBUTE_CONVERTER_DEFINE(type) |
#define | ATTRIBUTE_HELPER_CPP(type) |
#define | ATTRIBUTE_HELPER_HEADER(type) |
#define | ATTRIBUTE_VALUE_DEFINE(type) ATTRIBUTE_VALUE_DEFINE_WITH_NAME (type,type) |
#define | ATTRIBUTE_VALUE_DEFINE_WITH_NAME(type, name) |
#define | ATTRIBUTE_VALUE_IMPLEMENT(type) ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME (type,type) |
#define | ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME(type, name) |
Functions | |
template<typename T , typename BASE > | |
Ptr< AttributeChecker > | ns3::MakeSimpleAttributeChecker (std::string name, std::string underlying) |
A simple string-based attribute checker. More... | |
All these macros can be used to generate automatically the code for subclasses of AttributeValue, AttributeAccessor, and, AttributeChecker, which can be used to give attribute powers to a normal class.
i.e., the user class can then effectively be made an attribute.
There are two kinds of helper macros: 1) The simple macros.
The simple macros are implemented in terms of the complex macros and should generally be preferred over the complex macros.
#define ATTRIBUTE_ACCESSOR_DEFINE | ( | type | ) |
type | the name of the class |
This macro defines and generates the code for the implementation of the Make<type>Accessor
template functions. This macro is typically invoked in a class header to allow users of this class to view and use the template functions defined here. This macro is implemented through the helper templates functions ns3::MakeAccessorHelper<>.
Definition at line 109 of file attribute-helper.h.
#define ATTRIBUTE_CHECKER_DEFINE | ( | type | ) |
type | the name of the class |
This macro defines the typeChecker
class and the associated Make<type>Checker
function. Typically invoked in the class header file..
Definition at line 175 of file attribute-helper.h.
#define ATTRIBUTE_CHECKER_IMPLEMENT | ( | type | ) |
type | the name of the class |
This macro implements the Make<type>Checker
function. Typically invoked in the source file..
Definition at line 233 of file attribute-helper.h.
#define ATTRIBUTE_CHECKER_IMPLEMENT_WITH_NAME | ( | type, | |
name | |||
) |
Definition at line 243 of file attribute-helper.h.
#define ATTRIBUTE_CONVERTER_DEFINE | ( | type | ) |
type | the name of the class |
This macro defines the conversion operators for class type
to and from instances of type Attribute. Typically invoked in the class header file.
Definition at line 165 of file attribute-helper.h.
#define ATTRIBUTE_HELPER_CPP | ( | type | ) |
type | the name of the class |
This macro should be invoked from the class implementation file.
Definition at line 267 of file attribute-helper.h.
#define ATTRIBUTE_HELPER_HEADER | ( | type | ) |
type | the name of the class |
This macro should be invoked outside of the class declaration in its public header.
Definition at line 256 of file attribute-helper.h.
#define ATTRIBUTE_VALUE_DEFINE | ( | type | ) | ATTRIBUTE_VALUE_DEFINE_WITH_NAME (type,type) |
type | the name of the class. |
This macro defines the class typeValue
associated to class type
. This macro is typically invoked in the class header file.
Definition at line 153 of file attribute-helper.h.
#define ATTRIBUTE_VALUE_DEFINE_WITH_NAME | ( | type, | |
name | |||
) |
Definition at line 125 of file attribute-helper.h.
#define ATTRIBUTE_VALUE_IMPLEMENT | ( | type | ) | ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME (type,type) |
type | the name of the class. |
This macro implements the typeValue
class (including the typeValue::SerializeToString
and typeValue::DeserializeFromString
methods). Typically invoked in the source file.
Definition at line 222 of file attribute-helper.h.
#define ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME | ( | type, | |
name | |||
) |
Definition at line 184 of file attribute-helper.h.
Ptr<AttributeChecker> ns3::MakeSimpleAttributeChecker | ( | std::string | name, |
std::string | underlying | ||
) |
A simple string-based attribute checker.
name | value type of the attribute |
underlying | underlying type name |
Definition at line 60 of file attribute-helper.h.
References ns3::Copy(), and ns3::Create().