A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
Struct Attribute

AttributeValue implementation for structures. More...

Collaboration diagram for Struct Attribute:

Files

file  struct.h
 Guidelines for defining attributes represented by structures.

Classes

class  ns3::StructChecker
 Checker for attribute values representing structures. More...
class  ns3::internal::StructChecker< T >
 Internal StructChecker implementation. More...
class  ns3::internal::StructChecker< StructValue< T, Fields... > >
 StructChecker specialization for a StructValue. More...
class  ns3::StructValue< T, Descriptors >
 AttributeValue implementation for structures. More...

Functions

template<typename T, typename T1>
Ptr< const AttributeAccessor > ns3::MakeStructAccessor (T1 a1)
 Create an AttributeAccessor for a structure data member, or for a lone class get functor or set method.
template<typename T, typename T1, typename T2>
Ptr< const AttributeAccessor > ns3::MakeStructAccessor (T1 a1, T2 a2)
 Create an AttributeAccessor using a pair of get functor and set methods.
template<typename T, typename... Ts>
Ptr< const AttributeChecker > ns3::MakeStructChecker (Ts... checkers)
 Create a StructChecker from the AttributeCheckers associated with the fields.

Detailed Description

AttributeValue implementation for structures.

Function Documentation

◆ MakeStructAccessor() [1/2]

template<typename T, typename T1>
Ptr< const AttributeAccessor > ns3::MakeStructAccessor ( T1 a1)

Create an AttributeAccessor for a structure data member, or for a lone class get functor or set method.

Template Parameters
TThe StructValue type used by the attribute.
T1The type of the class data member, get functor, or set method.
Parameters
a1The address of the data member, get functor, or set method.
Returns
the AttributeAccessor

Definition at line 765 of file struct.h.

References MakeAccessorHelper().

Referenced by ns3::ObjectWithTimeSpanAttribute::GetTypeId(), and StructObject::GetTypeId().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeStructAccessor() [2/2]

template<typename T, typename T1, typename T2>
Ptr< const AttributeAccessor > ns3::MakeStructAccessor ( T1 a1,
T2 a2 )

Create an AttributeAccessor using a pair of get functor and set methods.

Template Parameters
TThe StructValue type used by the attribute.
T1The type of the first method.
T2The type of the second method.
Parameters
a1The address of the first method.
a2The address of the second method.
Returns
the AttributeAccessor

Definition at line 772 of file struct.h.

References MakeAccessorHelper().

Here is the call graph for this function:

◆ MakeStructChecker()

template<typename T, typename... Ts>
Ptr< const AttributeChecker > ns3::MakeStructChecker ( Ts... checkers)

Create a StructChecker from the AttributeCheckers associated with the fields.

Template Parameters
TThe StructValue type to check.
TsThe AttributeChecker types.
Parameters
checkersAttributeCheckers for the individual fields.
Returns
pointer to the StructChecker instance

Definition at line 758 of file struct.h.

References Create().

Referenced by StructValueTestCase::DoRun(), ns3::ObjectWithTimeSpanAttribute::GetTypeId(), and StructObject::GetTypeId().

Here is the call graph for this function:
Here is the caller graph for this function: