A Discrete-Event Network Simulator
API
ns3::internal::TupleHelper< std::tuple< Args... > > Struct Template Reference

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...

#include "tuple.h"

Static Public Member Functions

template<class T1 >
static Ptr< const AttributeAccessorMakeTupleAccessor (T1 a1)
 Create an AttributeAccessor for a class data member of type tuple, or a lone class get functor or set method. More...
 
template<class T1 , class T2 >
static Ptr< const AttributeAccessorMakeTupleAccessor (T1 a1, T2 a2)
 Create an AttributeAccessor using a pair of get functor and set methods from a class. More...
 
template<class... Ts>
static Ptr< const AttributeCheckerMakeTupleChecker (Ts... checkers)
 Create a TupleChecker from AttributeCheckers associated with TupleValue elements. More...
 
static TupleValue< Args... > MakeTupleValue (const typename TupleValue< Args... >::result_type &t)
 Create a TupleValue object. More...
 

Detailed Description

template<class... Args>
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.

This struct is a partial specialization of struct TupleHelper.

Definition at line 467 of file tuple.h.

Member Function Documentation

◆ MakeTupleAccessor() [1/2]

template<class... Args>
template<class T1 >
static Ptr<const AttributeAccessor> ns3::internal::TupleHelper< std::tuple< Args... > >::MakeTupleAccessor ( T1  a1)
inlinestatic

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 488 of file tuple.h.

References ns3::MakeAccessorHelper().

+ Here is the call graph for this function:

◆ MakeTupleAccessor() [2/2]

template<class... Args>
template<class T1 , class T2 >
static Ptr<const AttributeAccessor> ns3::internal::TupleHelper< std::tuple< Args... > >::MakeTupleAccessor ( T1  a1,
T2  a2 
)
inlinestatic

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 496 of file tuple.h.

References ns3::MakeAccessorHelper().

+ Here is the call graph for this function:

◆ MakeTupleChecker()

template<class... Args>
template<class... Ts>
static Ptr<const AttributeChecker> ns3::internal::TupleHelper< std::tuple< Args... > >::MakeTupleChecker ( Ts...  checkers)
inlinestatic

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 480 of file tuple.h.

References ns3::Create().

+ Here is the call graph for this function:

◆ MakeTupleValue()

template<class... Args>
static TupleValue<Args...> ns3::internal::TupleHelper< std::tuple< Args... > >::MakeTupleValue ( const typename TupleValue< Args... >::result_type &  t)
inlinestatic

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});
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 472 of file tuple.h.


The documentation for this struct was generated from the following file: