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

AttributeValue implementation for Tuple. More...

+ Collaboration diagram for Tuple Attribute:

Classes

class  ns3::TupleChecker
 Checker for attribute values storing tuples. More...
 
class  ns3::internal::TupleChecker< Args >
 Internal checker class templated to each AttributeChecker for each entry in the tuple. More...
 
struct  ns3::internal::TupleHelper< Args >
 Helper class defining static methods for MakeTupleChecker and MakeTupleAccessor that are called when user specifies the list of AttributeValue types included in a TupleValue type. More...
 
struct  ns3::internal::TupleHelper< std::tuple< Args... > >
 Helper class defining static methods for MakeTupleValue, MakeTupleChecker and MakeTupleAccessor that are called when user provides a std::tuple of the AttributeValue types included in a TupleValue type. More...
 
class  ns3::TupleValue< Args >
 AttributeValue implementation for Tuple. More...
 

Functions

template<class... Args, class T1 >
Ptr< const AttributeAccessorns3::MakeTupleAccessor (T1 a1)
 Create an AttributeAccessor for a class data member of type tuple, or a lone class get functor or set method.
 
template<class... Args, class T1 , class T2 >
Ptr< const AttributeAccessorns3::MakeTupleAccessor (T1 a1, T2 a2)
 Create an AttributeAccessor using a pair of get functor and set methods from a class.
 
template<class... Args, class... Ts>
Ptr< const AttributeCheckerns3::MakeTupleChecker (Ts... checkers)
 Create a TupleChecker from AttributeCheckers associated with TupleValue elements.
 
template<class T1 , class T2 >
auto ns3::MakeTupleValue (T2 t)
 Create a TupleValue object.
 

Detailed Description

AttributeValue implementation for Tuple.

Function Documentation

◆ MakeTupleAccessor() [1/2]

template<class... Args, class T1 >
Ptr< const AttributeAccessor > ns3::MakeTupleAccessor ( T1  a1)

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

Template Parameters
Args[explicit] Attribute value types
T1[deduced] The type of the class data member, or the type of the class get functor or set method.
Parameters
a1The address of the data member, or the get or set method.
Returns
the AttributeAccessor

Definition at line 547 of file tuple.h.

References ns3::MakeTupleAccessor().

Referenced by ns3::WifiPhy::GetTypeId(), and ns3::MakeTupleAccessor().

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

◆ MakeTupleAccessor() [2/2]

template<class... Args, class T1 , class T2 >
Ptr< const AttributeAccessor > ns3::MakeTupleAccessor ( T1  a1,
T2  a2 
)

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

Template Parameters
Args[explicit] Attribute value types
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.
Parameters
a2The address of the class method to set the attribute.
a1The address of the data member, or the get or set method.
Returns
the AttributeAccessor

Definition at line 554 of file tuple.h.

References ns3::MakeTupleAccessor().

+ Here is the call graph for this function:

◆ MakeTupleChecker()

template<class... Args, class... Ts>
Ptr< const AttributeChecker > ns3::MakeTupleChecker ( Ts...  checkers)

Create a TupleChecker from AttributeCheckers associated with TupleValue elements.

Template Parameters
Args[explicit] Attribute value types
Ts[deduced] Attribute checker types
Parameters
checkersattribute checkers
Returns
Pointer to TupleChecker instance.

Definition at line 540 of file tuple.h.

References ns3::MakeTupleChecker().

Referenced by ns3::WifiPhy::GetTypeId(), and ns3::MakeTupleChecker().

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

◆ MakeTupleValue()

template<class T1 , class T2 >
auto ns3::MakeTupleValue ( T2  t)

Create a TupleValue object.

Enable to write code like this snippet:

typedef std::tuple<uint16_t, double> Tuple;
typedef std::tuple<UintegerValue, DoubleValue> Pack;
TupleValue<UintegerValue, DoubleValue> t = MakeTupleValue<Pack> (Tuple {10, 1.5});
AttributeValue implementation for Tuple.
Definition: tuple.h:78
Template Parameters
T1[explicit] A std::tuple of the AttributeValue types included in TupleValue
T2[deduced] A std::tuple of the type of elements stored by TupleValue
Parameters
tthe tuple of elements stored by TupleValue
Returns
a TupleValue object

Definition at line 533 of file tuple.h.

References ns3::MakeTupleValue().

Referenced by ns3::MakeTupleValue().

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