These are the internal implementation functions for the Attribute system. More...
Files | |
file | attribute-accessor-helper.h |
ns3::MakeAccessorHelper declarations and template implementations. | |
file | type-name.cc |
ns3::TypeNameGet() function 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... | |
Functions | |
template<typename V , typename T , typename U > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperOne (U T::*memberVariable) |
MakeAccessorHelper implementation for a class data member. More... | |
template<typename V , typename T , typename U > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperOne (U(T::*getter)(void) const) |
MakeAccessorHelper implementation for a class get functor method. More... | |
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. More... | |
template<typename W , typename T , typename U , typename V > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperTwo (void(T::*setter)(U), V(T::*getter)(void) const) |
MakeAccessorHelper implementation with a class get functor method and a class set method returning void . More... | |
template<typename W , typename T , typename U , typename V > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperTwo (V(T::*getter)(void) const, void(T::*setter)(U)) |
MakeAccessorHelper implementation with a class get functor method and a class set method returning void . More... | |
template<typename W , typename T , typename U , typename V > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperTwo (bool(T::*setter)(U), V(T::*getter)(void) const) |
MakeAccessorHelper implementation with a class get functor method and a class set method returning bool . More... | |
template<typename W , typename T , typename U , typename V > | |
Ptr< const AttributeAccessor > | ns3::DoMakeAccessorHelperTwo (V(T::*getter)(void) const, bool(T::*setter)(U)) |
MakeAccessorHelper implementation with a class get functor method and a class set method returning bool . More... | |
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. More... | |
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. More... | |
template<typename T , typename BASE > | |
Ptr< AttributeChecker > | ns3::MakeSimpleAttributeChecker (std::string name, std::string underlying) |
A simple string-based attribute checker. More... | |
template<typename T > | |
std::string | ns3::TypeNameGet (void) |
Type name strings for numeric AttributeValue types. More... | |
template<> | |
std::string | ns3::TypeNameGet< int8_t > (void) |
ns3::TypeNameGet(void) specializaton. More... | |
template<> | |
std::string | ns3::TypeNameGet< int16_t > (void) |
ns3::TypeNameGet(void) specializaton. More... | |
template<> | |
std::string | ns3::TypeNameGet< int32_t > (void) |
ns3::TypeNameGet(void) specializaton. More... | |
template<> | |
std::string | ns3::TypeNameGet< int64_t > (void) |
ns3::TypeNameGet(void) specializaton. More... | |
template<> | |
std::string | ns3::TypeNameGet< uint8_t > (void) |
ns3::TypeNameGet(void) specializaton. More... | |
template<> | |
std::string | ns3::TypeNameGet< uint16_t > (void) |
ns3::TypeNameGet(void) specializaton. More... | |
template<> | |
std::string | ns3::TypeNameGet< uint32_t > (void) |
ns3::TypeNameGet(void) specializaton. More... | |
template<> | |
std::string | ns3::TypeNameGet< uint64_t > (void) |
ns3::TypeNameGet(void) specializaton. More... | |
template<> | |
std::string | ns3::TypeNameGet< float > (void) |
ns3::TypeNameGet(void) specializaton. More... | |
template<> | |
std::string | ns3::TypeNameGet< double > (void) |
ns3::TypeNameGet(void) specializaton. More... | |
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
.
|
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 256 of file attribute-accessor-helper.h.
|
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 313 of file attribute-accessor-helper.h.
References NS_UNUSED.
|
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 365 of file attribute-accessor-helper.h.
References NS_UNUSED.
|
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 427 of file attribute-accessor-helper.h.
References ns3::AccessorHelper< T, U >::Set().
|
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 483 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 510 of file attribute-accessor-helper.h.
References ns3::AccessorHelper< T, U >::Set().
|
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 566 of file attribute-accessor-helper.h.
|
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 576 of file attribute-accessor-helper.h.
|
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 584 of file attribute-accessor-helper.h.
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 98 of file attribute-helper.h.
References ns3::Copy(), and ns3::Create().
std::string ns3::TypeNameGet | ( | void | ) |
Type name strings for numeric AttributeValue types.
T | [explicit] The numeric type. |
Definition at line 42 of file type-name.h.
std::string ns3::TypeNameGet< double > | ( | void | ) |
ns3::TypeNameGet(void) specializaton.
Definition at line 39 of file type-name.cc.
std::string ns3::TypeNameGet< float > | ( | void | ) |
ns3::TypeNameGet(void) specializaton.
Definition at line 38 of file type-name.cc.
std::string ns3::TypeNameGet< int16_t > | ( | void | ) |
ns3::TypeNameGet(void) specializaton.
Definition at line 31 of file type-name.cc.
std::string ns3::TypeNameGet< int32_t > | ( | void | ) |
ns3::TypeNameGet(void) specializaton.
Definition at line 32 of file type-name.cc.
std::string ns3::TypeNameGet< int64_t > | ( | void | ) |
ns3::TypeNameGet(void) specializaton.
Definition at line 33 of file type-name.cc.
std::string ns3::TypeNameGet< int8_t > | ( | void | ) |
ns3::TypeNameGet(void) specializaton.
Definition at line 30 of file type-name.cc.
std::string ns3::TypeNameGet< uint16_t > | ( | void | ) |
ns3::TypeNameGet(void) specializaton.
Definition at line 35 of file type-name.cc.
std::string ns3::TypeNameGet< uint32_t > | ( | void | ) |
ns3::TypeNameGet(void) specializaton.
Definition at line 36 of file type-name.cc.
std::string ns3::TypeNameGet< uint64_t > | ( | void | ) |
ns3::TypeNameGet(void) specializaton.
Definition at line 37 of file type-name.cc.
std::string ns3::TypeNameGet< uint8_t > | ( | void | ) |
ns3::TypeNameGet(void) specializaton.
Definition at line 34 of file type-name.cc.