A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::internal::TupleChecker< Args > Class Template Reference

Internal checker class templated to each AttributeChecker for each entry in the tuple. More...

#include "tuple.h"

+ Inheritance diagram for ns3::internal::TupleChecker< Args >:
+ Collaboration diagram for ns3::internal::TupleChecker< Args >:

Public Member Functions

template<class... Ts>
 TupleChecker (Ts... checkers)
 Constructor.
 
bool Check (const AttributeValue &value) const override
 
bool Copy (const AttributeValue &source, AttributeValue &destination) const override
 Copy the source to the destination.
 
Ptr< AttributeValueCreate () const override
 
const std::vector< Ptr< const AttributeChecker > > & GetCheckers () const override
 Get the checkers for all tuple elements.
 
std::string GetUnderlyingTypeInformation () const override
 
std::string GetValueTypeName () const override
 
bool HasUnderlyingTypeInformation () const override
 
- Public Member Functions inherited from ns3::AttributeChecker
 AttributeChecker ()
 
virtual ~AttributeChecker ()
 
Ptr< AttributeValueCreateValidValue (const AttributeValue &value) const
 Create a valid value from the argument value, or reinterpret the argument as a string.
 
- Public Member Functions inherited from ns3::SimpleRefCount< AttributeChecker >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 

Private Attributes

std::vector< Ptr< const AttributeChecker > > m_checkers
 attribute checkers
 

Detailed Description

template<class... Args>
class ns3::internal::TupleChecker< Args >

Internal checker class templated to each AttributeChecker for each entry in the tuple.

Definition at line 363 of file tuple.h.

Constructor & Destructor Documentation

◆ TupleChecker()

template<class... Args>
template<class... Ts>
ns3::internal::TupleChecker< Args >::TupleChecker ( Ts... checkers)
inline

Constructor.

Template Parameters
Ts[deduced] the type of the attribute checkers
Parameters
checkersthe attribute checkers for individual elements of the tuple

Definition at line 372 of file tuple.h.

Member Function Documentation

◆ Check()

template<class... Args>
bool ns3::internal::TupleChecker< Args >::Check ( const AttributeValue & value) const
inlineoverridevirtual
Parameters
[in]valueA pointer to the value to check
Returns
true if the input value is both of the right type and if its value is within the requested range. Returns false otherwise.

Implements ns3::AttributeChecker.

Definition at line 382 of file tuple.h.

References ns3::internal::TupleChecker< Args >::Check(), and ns3::internal::TupleChecker< Args >::m_checkers.

Referenced by ns3::internal::TupleChecker< Args >::Check().

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

◆ Copy()

template<class... Args>
bool ns3::internal::TupleChecker< Args >::Copy ( const AttributeValue & source,
AttributeValue & destination ) const
inlineoverridevirtual

Copy the source to the destination.

Parameters
[in]sourceSource AttributeValue
[out]destinationDestination AttributeValue
Returns
true if copy was successful

Implements ns3::AttributeChecker.

Definition at line 417 of file tuple.h.

◆ Create()

template<class... Args>
Ptr< AttributeValue > ns3::internal::TupleChecker< Args >::Create ( ) const
inlineoverridevirtual
Returns
a new instance of an AttributeValue (wrapper in an Attribute instance) which matches the type of the underlying attribute.

This method is typically used to create a temporary variable prior to calling Attribute::DeserializeFromString.

Implements ns3::AttributeChecker.

Definition at line 412 of file tuple.h.

References ns3::Create().

+ Here is the call graph for this function:

◆ GetCheckers()

template<class... Args>
const std::vector< Ptr< const AttributeChecker > > & ns3::internal::TupleChecker< Args >::GetCheckers ( ) const
inlineoverridevirtual

Get the checkers for all tuple elements.

Returns
the checkers for all tuple elements

Implements ns3::TupleChecker.

Definition at line 377 of file tuple.h.

References ns3::internal::TupleChecker< Args >::m_checkers.

◆ GetUnderlyingTypeInformation()

template<class... Args>
std::string ns3::internal::TupleChecker< Args >::GetUnderlyingTypeInformation ( ) const
inlineoverridevirtual
Returns
a human-readable representation of information about the underlying C++ type.

Implements ns3::AttributeChecker.

Definition at line 407 of file tuple.h.

◆ GetValueTypeName()

template<class... Args>
std::string ns3::internal::TupleChecker< Args >::GetValueTypeName ( ) const
inlineoverridevirtual
Returns
the c++ fully-qualified typename of the subclass of the ns3::AttributeValue base class which is associated to this checker.

A typical return value here is FooValue where Foo is the name of the type being wrapped.

Implements ns3::AttributeChecker.

Definition at line 397 of file tuple.h.

◆ HasUnderlyingTypeInformation()

template<class... Args>
bool ns3::internal::TupleChecker< Args >::HasUnderlyingTypeInformation ( ) const
inlineoverridevirtual
Returns
true if this checker has information about the underlying C++ type, false otherwise.

If this method returns false, the return value of the GetUnderlyingTypeInformation method cannot be relied upon.

Implements ns3::AttributeChecker.

Definition at line 402 of file tuple.h.

Member Data Documentation

◆ m_checkers

template<class... Args>
std::vector<Ptr<const AttributeChecker> > ns3::internal::TupleChecker< Args >::m_checkers
private

attribute checkers

Definition at line 430 of file tuple.h.

Referenced by ns3::internal::TupleChecker< Args >::Check(), and ns3::internal::TupleChecker< Args >::GetCheckers().


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