Files | |
file | attribute-accessor-helper.h |
ns3::MakeAccessorHelper declarations and template implementations. | |
file | type-name.h |
ns3::TypeNameGet() function declarations. | |
Classes | |
class | ns3::AccessorHelper< T, U > |
Basic functionality for accessing class attributes via class data members, or get functor/set methods. More... | |
struct | ns3::AccessorTrait< T > |
The non-const and non-reference type equivalent to T . More... | |
Macros | |
#define | TYPENAMEGET_DEFINE(T) |
Macro that defines a template specialization for TypeNameGet<T>() . | |
Functions | |
template<typename V , typename T , typename U > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperOne (U T::*memberVariable) |
MakeAccessorHelper implementation for a class data member. | |
template<typename V , typename T , typename U > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperOne (U(T::*getter)() const) |
MakeAccessorHelper implementation for a class get functor method. | |
template<typename V , typename T , typename U > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperOne (void(T::*setter)(U)) |
MakeAccessorHelper implementation for a class set method returning void. | |
template<typename W , typename T , typename U , typename V > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperTwo (bool(T::*setter)(U), V(T::*getter)() const) |
MakeAccessorHelper implementation with a class get functor method and a class set method returning bool . | |
template<typename W , typename T , typename U , typename V > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperTwo (V(T::*getter)() const, bool(T::*setter)(U)) |
MakeAccessorHelper implementation with a class get functor method and a class set method returning bool . | |
template<typename W , typename T , typename U , typename V > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperTwo (V(T::*getter)() const, void(T::*setter)(U)) |
MakeAccessorHelper implementation with a class get functor method and a class set method returning void . | |
template<typename W , typename T , typename U , typename V > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperTwo (void(T::*setter)(U), V(T::*getter)() const) |
MakeAccessorHelper implementation with a class get functor method and a class set method returning void . | |
template<typename V , typename T1 > | |
Ptr< const AttributeAccessor > | ns3::MakeAccessorHelper (T1 a1) |
Create an AttributeAccessor for a class data member, or a lone class get functor or set method. | |
template<typename V , typename T1 , typename T2 > | |
Ptr< const AttributeAccessor > | ns3::MakeAccessorHelper (T1 a1, T2 a2) |
Create an AttributeAccessor using a pair of get functor and set methods from a class. | |
template<typename T , typename BASE > | |
Ptr< AttributeChecker > | ns3::MakeSimpleAttributeChecker (std::string name, std::string underlying) |
A simple string-based attribute checker. | |
template<typename T > | |
std::string | ns3::TypeNameGet () |
Type name strings for AttributeValue types. | |
ns3::TYPENAMEGET_DEFINE (bool) | |
ns3::TypeNameGet() specialization for numeric types. | |
ns3::TYPENAMEGET_DEFINE (int8_t) | |
ns3::TypeNameGet() specialization for numeric types. | |
ns3::TYPENAMEGET_DEFINE (int16_t) | |
ns3::TypeNameGet() specialization for numeric types. | |
ns3::TYPENAMEGET_DEFINE (int32_t) | |
ns3::TypeNameGet() specialization for numeric types. | |
ns3::TYPENAMEGET_DEFINE (int64_t) | |
ns3::TypeNameGet() specialization for numeric types. | |
ns3::TYPENAMEGET_DEFINE (uint8_t) | |
ns3::TypeNameGet() specialization for numeric types. | |
ns3::TYPENAMEGET_DEFINE (uint16_t) | |
ns3::TypeNameGet() specialization for numeric types. | |
ns3::TYPENAMEGET_DEFINE (uint32_t) | |
ns3::TypeNameGet() specialization for numeric types. | |
ns3::TYPENAMEGET_DEFINE (uint64_t) | |
ns3::TypeNameGet() specialization for numeric types. | |
ns3::TYPENAMEGET_DEFINE (float) | |
ns3::TypeNameGet() specialization for numeric types. | |
ns3::TYPENAMEGET_DEFINE (double) | |
ns3::TypeNameGet() specialization for numeric types. | |
ns3::TYPENAMEGET_DEFINE (long double) | |
ns3::TypeNameGet() specialization for numeric types. | |
These are the internal implementation functions for the Attribute system.
Module code shouldn't need to call these directly. Instead, see Attribute Helper.
There are three versions of DoMakeAccessorHelperOne:
There are two pairs of DoMakeAccessorHelperTwo (four total):
void
or bool
. #define TYPENAMEGET_DEFINE | ( | T | ) |
Macro that defines a template specialization for TypeNameGet<T>()
.
T | The type. |
Definition at line 49 of file type-name.h.
|
inline |
MakeAccessorHelper implementation for a class data member.
V | [explicit] The specific AttributeValue type to use to represent the Attribute. |
T | [deduced] The class holding the data member. |
U | [deduced] The type of the data member. |
[in] | memberVariable | The address of the data member. |
Definition at line 237 of file attribute-accessor-helper.h.
Referenced by ns3::MakeAccessorHelper().
|
inline |
MakeAccessorHelper implementation for a class get functor method.
V | [explicit] The specific AttributeValue type to use to represent the Attribute. |
T | [deduced] The class holding the get functor method. |
U | [deduced] The return type of the get functor method. |
[in] | getter | The address of the class get functor method. |
Definition at line 302 of file attribute-accessor-helper.h.
References ns3::AccessorHelper< T, U >::Set().
|
inline |
MakeAccessorHelper implementation for a class set method returning void.
V | [explicit] The specific AttributeValue type to use to represent the Attribute. |
T | [deduced] The class holding the set method. |
U | [deduced] The argument type of the set method. |
[in] | setter | The address of the class set method, returning void. |
Definition at line 361 of file attribute-accessor-helper.h.
|
inline |
MakeAccessorHelper implementation with a class get functor method and a class set method returning bool .
The two versions of this function differ only in argument order.
W | [explicit] The specific AttributeValue type to use to represent the Attribute. |
T | [deduced] The class holding the functor methods. |
U | [deduced] The argument type of the set method. |
V | [deduced] The return type of the get functor method. |
[in] | setter | The address of the class set method, returning bool. |
[in] | getter | The address of the class get functor method. |
Definition at line 517 of file attribute-accessor-helper.h.
|
inline |
MakeAccessorHelper implementation with a class get functor method and a class set method returning bool .
The two versions of this function differ only in argument order.
W | [explicit] The specific AttributeValue type to use to represent the Attribute. |
T | [deduced] The class holding the functor methods. |
U | [deduced] The argument type of the set method. |
V | [deduced] The return type of the get functor method. |
[in] | setter | The address of the class set method, returning bool. |
[in] | getter | The address of the class get functor method. |
Definition at line 580 of file attribute-accessor-helper.h.
References ns3::DoMakeAccessorHelperTwo().
|
inline |
MakeAccessorHelper implementation with a class get functor method and a class set method returning void .
The two versions of this function differ only in argument order.
W | [explicit] The specific AttributeValue type to use to represent the Attribute. |
T | [deduced] The class holding the functor methods. |
U | [deduced] The argument type of the set method. |
V | [deduced] The return type of the get functor method. |
[in] | setter | The address of the class set method, returning void. |
[in] | getter | The address of the class get functor method. |
Definition at line 493 of file attribute-accessor-helper.h.
References ns3::DoMakeAccessorHelperTwo().
|
inline |
MakeAccessorHelper implementation with a class get functor method and a class set method returning void .
The two versions of this function differ only in argument order.
W | [explicit] The specific AttributeValue type to use to represent the Attribute. |
T | [deduced] The class holding the functor methods. |
U | [deduced] The argument type of the set method. |
V | [deduced] The return type of the get functor method. |
[in] | setter | The address of the class set method, returning void. |
[in] | getter | The address of the class get functor method. |
Definition at line 430 of file attribute-accessor-helper.h.
References ns3::AccessorHelper< T, U >::Set().
Referenced by ns3::DoMakeAccessorHelperTwo(), ns3::DoMakeAccessorHelperTwo(), and ns3::MakeAccessorHelper().
|
inline |
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
The get functor method should have a signature like
where T is the class and U is the type of the return value.
The set method should have one of these signatures:
where T is the class and U is the type of the value to set the attribute to, which should be compatible with the specific AttributeValue type V which holds the value (or the type implied by the name Make<V>Accessor
of this function.) In the case of a setter returning bool, the return value should be true
if the value could be set successfully.
V | [explicit] (If present) The specific AttributeValue type to use to represent the Attribute. (If not present, the type V is implicit in the name of this function, as "Make<V>Accessor" |
T1 | [deduced] The type of the class data member, or the type of the class get functor or set method. |
[in] | a1 | The address of the data member, or the get or set method. |
Definition at line 587 of file attribute-accessor-helper.h.
References ns3::DoMakeAccessorHelperOne().
Referenced by ns3::MakeAttributeContainerAccessor(), ns3::MakeAttributeContainerAccessor(), ns3::MakeEnumAccessor(), ns3::MakeEnumAccessor(), ns3::MakePairAccessor(), ns3::internal::TupleHelper< Args >::MakeTupleAccessor(), ns3::internal::TupleHelper< Args >::MakeTupleAccessor(), ns3::internal::TupleHelper< std::tuple< Args... > >::MakeTupleAccessor(), and ns3::internal::TupleHelper< std::tuple< Args... > >::MakeTupleAccessor().
|
inline |
Create an AttributeAccessor using a pair of get functor and set methods from a class.
The get functor method should have a signature like
where T is the class and U is the type of the return value.
The set method should have one of these signatures:
where T is the class and U is the type of the value to set the attribute to, which should be compatible with the specific AttributeValue type V which holds the value (or the type implied by the name Make<V>Accessor
of this function.) In the case of a setter returning bool, the return value should be true if the value could be set successfully.
In practice the setter and getter arguments can appear in either order, but setter first is preferred.
V | [explicit] (If present) The specific AttributeValue type to use to represent the Attribute. (If not present, the type V is implicit in the name of this function as "Make<V>Accessor" |
T1 | [deduced] The type of the class data member, or the type of the class get functor or set method. |
T2 | [deduced] The type of the getter class functor method. |
[in] | a2 | The address of the class method to set the attribute. |
[in] | a1 | The address of the data member, or the get or set method. |
Definition at line 594 of file attribute-accessor-helper.h.
References ns3::DoMakeAccessorHelperTwo().
Ptr< AttributeChecker > ns3::MakeSimpleAttributeChecker | ( | std::string | name, |
std::string | underlying ) |
A simple string-based attribute checker.
T | [explicit] The specific AttributeValue type used to represent the Attribute. |
BASE | [explicit] The AttributeChecker type corresponding to T . |
[in] | name | The name of the AttributeValue type, essentially the string form of T . |
[in] | underlying | Underlying type name. |
String-based AttributeChecker implementation.
Definition at line 88 of file attribute-helper.h.
References ns3::Copy(), and ns3::Create().
Referenced by ns3::MakeAttributeContainerChecker(), and ns3::MakePairChecker().
std::string ns3::TypeNameGet | ( | ) |
Type name strings for AttributeValue types.
Custom classes should add a template specialization of this function using the macro TYPENAMEGET_DEFINE(T)
.
T | [explicit] The type. |
Definition at line 36 of file type-name.h.
References NS_FATAL_ERROR.
Referenced by ns3::CounterCalculator< T >::GetTypeId(), ns3::MinMaxAvgTotalCalculator< T >::GetTypeId(), TracedValueCallbackTestCase::CheckTvCb< T >::GetTypeId(), ns3::MakeDoubleChecker(), ns3::MakeDoubleChecker(), ns3::MakeDoubleChecker(), ns3::MakeIntegerChecker(), ns3::MakeIntegerChecker(), ns3::MakeIntegerChecker(), ns3::MakeUintegerChecker(), ns3::MakeUintegerChecker(), and ns3::MakeUintegerChecker().
ns3::TYPENAMEGET_DEFINE | ( | bool | ) |
ns3::TypeNameGet() specialization for numeric types.
ns3::TYPENAMEGET_DEFINE | ( | double | ) |
ns3::TypeNameGet() specialization for numeric types.
ns3::TYPENAMEGET_DEFINE | ( | float | ) |
ns3::TypeNameGet() specialization for numeric types.
ns3::TYPENAMEGET_DEFINE | ( | int16_t | ) |
ns3::TypeNameGet() specialization for numeric types.
ns3::TYPENAMEGET_DEFINE | ( | int32_t | ) |
ns3::TypeNameGet() specialization for numeric types.
ns3::TYPENAMEGET_DEFINE | ( | int64_t | ) |
ns3::TypeNameGet() specialization for numeric types.
ns3::TYPENAMEGET_DEFINE | ( | int8_t | ) |
ns3::TypeNameGet() specialization for numeric types.
ns3::TYPENAMEGET_DEFINE | ( | long double | ) |
ns3::TypeNameGet() specialization for numeric types.
ns3::TYPENAMEGET_DEFINE | ( | uint16_t | ) |
ns3::TypeNameGet() specialization for numeric types.
ns3::TYPENAMEGET_DEFINE | ( | uint32_t | ) |
ns3::TypeNameGet() specialization for numeric types.
ns3::TYPENAMEGET_DEFINE | ( | uint64_t | ) |
ns3::TypeNameGet() specialization for numeric types.
ns3::TYPENAMEGET_DEFINE | ( | uint8_t | ) |
ns3::TypeNameGet() specialization for numeric types.