A Discrete-Event Network Simulator
API
anonymous_namespace{traced-value-callback-typedef-test-suite.cc} Namespace Reference

Functions

template<typename T >
void TracedValueCbSink (T oldValue, T newValue)
 Template for TracedValue sink functions. More...
 
template<>
void TracedValueCbSink< SequenceNumber32 > (SequenceNumber32 oldValue, SequenceNumber32 newValue)
 TracedValueCbSink specialization for SequenceNumber32. More...
 
template<>
void TracedValueCbSink< Time > (Time oldValue, Time newValue)
 TracedValueCbSink specialization for Time. More...
 
Stringify the known TracedValue type names.
Returns
The TracedValueCallback type name.
template<typename T >
std::string TypeName (void)
 
template<>
std::string TypeName< bool > (void)
 
template<>
std::string TypeName< int8_t > (void)
 
template<>
std::string TypeName< int16_t > (void)
 
template<>
std::string TypeName< int32_t > (void)
 
template<>
std::string TypeName< int64_t > (void)
 
template<>
std::string TypeName< uint8_t > (void)
 
template<>
std::string TypeName< uint16_t > (void)
 
template<>
std::string TypeName< uint32_t > (void)
 
template<>
std::string TypeName< uint64_t > (void)
 
template<>
std::string TypeName< double > (void)
 
template<>
std::string TypeName< Time > (void)
 
template<>
std::string TypeName< SequenceNumber32 > (void)
 

Variables

std::string g_Result = ""
 Result of callback test. More...
 

Function Documentation

◆ TracedValueCbSink()

template<typename T >
void anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TracedValueCbSink ( oldValue,
newValue 
)

Template for TracedValue sink functions.

This generates a sink function for any underlying type.

Template Parameters
T[explicit] The type of the value being traced. Since the point of this template is to create a sink function, the template type must be given explicitly.
Parameters
[in]oldValueThe original value.
[in]newValueThe new value.

Definition at line 77 of file traced-value-callback-typedef-test-suite.cc.

References g_Result.

◆ TracedValueCbSink< SequenceNumber32 >()

template<>
void anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TracedValueCbSink< SequenceNumber32 > ( SequenceNumber32  oldValue,
SequenceNumber32  newValue 
)

TracedValueCbSink specialization for SequenceNumber32.

Definition at line 103 of file traced-value-callback-typedef-test-suite.cc.

References ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue().

+ Here is the call graph for this function:

◆ TracedValueCbSink< Time >()

template<>
void anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TracedValueCbSink< Time > ( Time  oldValue,
Time  newValue 
)

TracedValueCbSink specialization for Time.

Definition at line 94 of file traced-value-callback-typedef-test-suite.cc.

References ns3::Time::GetInteger().

+ Here is the call graph for this function:

◆ TypeName()

template<typename T >
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName ( void  )
inline

Definition at line 36 of file traced-value-callback-typedef-test-suite.cc.

◆ TypeName< bool >()

template<>
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName< bool > ( void  )
inline

Definition at line 38 of file traced-value-callback-typedef-test-suite.cc.

◆ TypeName< double >()

template<>
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName< double > ( void  )
inline

Definition at line 47 of file traced-value-callback-typedef-test-suite.cc.

◆ TypeName< int16_t >()

template<>
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName< int16_t > ( void  )
inline

Definition at line 40 of file traced-value-callback-typedef-test-suite.cc.

◆ TypeName< int32_t >()

template<>
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName< int32_t > ( void  )
inline

Definition at line 41 of file traced-value-callback-typedef-test-suite.cc.

◆ TypeName< int64_t >()

template<>
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName< int64_t > ( void  )
inline

Definition at line 42 of file traced-value-callback-typedef-test-suite.cc.

◆ TypeName< int8_t >()

template<>
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName< int8_t > ( void  )
inline

Definition at line 39 of file traced-value-callback-typedef-test-suite.cc.

◆ TypeName< SequenceNumber32 >()

template<>
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName< SequenceNumber32 > ( void  )
inline

Definition at line 49 of file traced-value-callback-typedef-test-suite.cc.

◆ TypeName< Time >()

template<>
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName< Time > ( void  )
inline

Definition at line 48 of file traced-value-callback-typedef-test-suite.cc.

◆ TypeName< uint16_t >()

template<>
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName< uint16_t > ( void  )
inline

Definition at line 44 of file traced-value-callback-typedef-test-suite.cc.

◆ TypeName< uint32_t >()

template<>
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName< uint32_t > ( void  )
inline

Definition at line 45 of file traced-value-callback-typedef-test-suite.cc.

◆ TypeName< uint64_t >()

template<>
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName< uint64_t > ( void  )
inline

Definition at line 46 of file traced-value-callback-typedef-test-suite.cc.

◆ TypeName< uint8_t >()

template<>
std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TypeName< uint8_t > ( void  )
inline

Definition at line 43 of file traced-value-callback-typedef-test-suite.cc.

Variable Documentation

◆ g_Result

std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::g_Result = ""

Result of callback test.

Since the sink function is outside the invoking class, which in this case is TracedValueCallbackTestCase, we can't use the test macros directly. Instead, we cache the result in the g_Result global value, then inspect it in the TracedValueCallbackTestCase::CheckType method.

Definition at line 62 of file traced-value-callback-typedef-test-suite.cc.

Referenced by TracedValueCallbackTestCase::CheckType(), TracedValueCallbackTestCase::CheckTvCb< T >::Invoke(), and TracedValueCbSink().