A Discrete-Event Network Simulator
API
AttributeObjectTest Class Reference

Class used to check attributes. More...

+ Inheritance diagram for AttributeObjectTest:
+ Collaboration diagram for AttributeObjectTest:

Public Types

enum  Test_e { TEST_A , TEST_B , TEST_C }
 Test enumerator. More...
 

Public Member Functions

 AttributeObjectTest (void)
 
virtual ~AttributeObjectTest (void)
 
void AddToMap1 (uint32_t i)
 Adds an object to the first map. More...
 
void AddToVector1 (void)
 Add an object to the first vector. More...
 
void AddToVector2 (void)
 Add an object to the second vector. More...
 
void InvokeCb (double a, int b, float c)
 Invoke the m_cb callback. More...
 
void InvokeCbValue (int8_t a)
 Invoke the m_cbValue callback. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o[[maybe_unused]])
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= ([[maybe_unused]] const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Types

typedef void(* NumericTracedCallback) (double, int, float)
 Traced callbacks for (double, int, float) values. More...
 

Private Member Functions

Test_e DoGetEnum (void) const
 Get the m_enumSetGet value. More...
 
int16_t DoGetInt16 (void) const
 Get the m_int16SetGet value. More...
 
int8_t DoGetIntSrc (void) const
 Get the m_intSrc2 value. More...
 
bool DoGetTestA (void) const
 Get the m_boolTestA value. More...
 
Ptr< DerivedDoGetVector (std::size_t i) const
 Get the i-th item of m_vector2. More...
 
std::size_t DoGetVectorN (void) const
 Get the length of m_vector2. More...
 
bool DoSetEnum (Test_e v)
 Set the m_enumSetGet value. More...
 
void DoSetInt16 (int16_t v)
 Set the m_int16SetGet value. More...
 
bool DoSetIntSrc (int8_t v)
 Set the m_intSrc2 value. More...
 
void DoSetTestA (bool v)
 Set the m_boolTestA value. More...
 

Private Attributes

TracedValue< bool > m_boolSrc
 bool Traced value. More...
 
bool m_boolTest
 Boolean test. More...
 
bool m_boolTestA
 Boolean test A. More...
 
bool m_boolTestDeprecated
 Boolean test deprecated. More...
 
TracedCallback< double, int, float > m_cb
 TracedCallback (double, int, float). More...
 
Callback< void, int8_t > m_cbValue
 Callback accepting an integer. More...
 
TracedValue< double > m_doubleSrc
 double Traced value. More...
 
enum Test_e m_enum
 Enum. More...
 
enum Test_e m_enumSetGet
 Enum set-get. More...
 
TracedValue< enum Test_em_enumSrc
 enum Traced value. More...
 
float m_float
 float. More...
 
int16_t m_int16
 16-bit integer. More...
 
int16_t m_int16SetGet
 16-bit integer set-get. More...
 
int16_t m_int16WithBounds
 16-bit integer with bounds. More...
 
TracedValue< int8_t > m_intSrc1
 First int8_t Traced value. More...
 
TracedValue< int8_t > m_intSrc2
 Second int8_t Traced value. More...
 
std::map< uint32_t, Ptr< Derived > > m_map1
 Map of uint32_t, derived objects. More...
 
Ptr< Derivedm_ptr
 Pointer to Derived class. More...
 
Ptr< Derivedm_ptrInitialized
 Pointer to Derived class. More...
 
Ptr< Derivedm_ptrInitialized2
 Pointer to Derived class. More...
 
Ptr< RandomVariableStreamm_random
 Random number generator. More...
 
Time m_timeWithBounds
 Time with bounds. More...
 
uint8_t m_uint8
 8-bit integer. More...
 
TracedValue< uint8_t > m_uintSrc
 uint8_t Traced value. More...
 
TracedValue< ValueClassTestm_valueSrc
 ValueClassTest Traced value. More...
 
std::vector< Ptr< Derived > > m_vector1
 First vector of derived objects. More...
 
std::vector< Ptr< Derived > > m_vector2
 Second vector of derived objects. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoDispose (void)
 Destructor implementation. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

Class used to check attributes.

Definition at line 144 of file attribute-test-suite.cc.

Member Typedef Documentation

◆ NumericTracedCallback

typedef void(* AttributeObjectTest::NumericTracedCallback) (double, int, float)
private

Traced callbacks for (double, int, float) values.

Definition at line 449 of file attribute-test-suite.cc.

Member Enumeration Documentation

◆ Test_e

Test enumerator.

Enumerator
TEST_A 

Test value A.

TEST_B 

Test value B.

TEST_C 

Test value C.

Definition at line 148 of file attribute-test-suite.cc.

Constructor & Destructor Documentation

◆ AttributeObjectTest()

AttributeObjectTest::AttributeObjectTest ( void  )
inline

Definition at line 293 of file attribute-test-suite.cc.

◆ ~AttributeObjectTest()

virtual AttributeObjectTest::~AttributeObjectTest ( void  )
inlinevirtual

Definition at line 297 of file attribute-test-suite.cc.

Member Function Documentation

◆ AddToMap1()

void AttributeObjectTest::AddToMap1 ( uint32_t  i)
inline

Adds an object to the first map.

Parameters
iThe index to assign to the object.

Definition at line 315 of file attribute-test-suite.cc.

◆ AddToVector1()

void AttributeObjectTest::AddToVector1 ( void  )
inline

Add an object to the first vector.

Definition at line 301 of file attribute-test-suite.cc.

◆ AddToVector2()

void AttributeObjectTest::AddToVector2 ( void  )
inline

Add an object to the second vector.

Definition at line 306 of file attribute-test-suite.cc.

◆ DoGetEnum()

Test_e AttributeObjectTest::DoGetEnum ( void  ) const
inlineprivate

Get the m_enumSetGet value.

Returns
the value of m_enumSetGet.

Definition at line 425 of file attribute-test-suite.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ DoGetInt16()

int16_t AttributeObjectTest::DoGetInt16 ( void  ) const
inlineprivate

Get the m_int16SetGet value.

Returns
the value of m_int16SetGet.

Definition at line 364 of file attribute-test-suite.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ DoGetIntSrc()

int8_t AttributeObjectTest::DoGetIntSrc ( void  ) const
inlineprivate

Get the m_intSrc2 value.

Returns
the value of m_intSrc2.

Definition at line 407 of file attribute-test-suite.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ DoGetTestA()

bool AttributeObjectTest::DoGetTestA ( void  ) const
inlineprivate

Get the m_boolTestA value.

Returns
the value of m_boolTestA.

Definition at line 356 of file attribute-test-suite.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ DoGetVector()

Ptr<Derived> AttributeObjectTest::DoGetVector ( std::size_t  i) const
inlineprivate

Get the i-th item of m_vector2.

Parameters
iThe index of the element to get.
Returns
i-th item of m_vector2.

Definition at line 389 of file attribute-test-suite.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ DoGetVectorN()

std::size_t AttributeObjectTest::DoGetVectorN ( void  ) const
inlineprivate

Get the length of m_vector2.

Returns
the vector size.

Definition at line 380 of file attribute-test-suite.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ DoSetEnum()

bool AttributeObjectTest::DoSetEnum ( Test_e  v)
inlineprivate

Set the m_enumSetGet value.

Parameters
vThe value to set.
Returns
true.

Definition at line 416 of file attribute-test-suite.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ DoSetInt16()

void AttributeObjectTest::DoSetInt16 ( int16_t  v)
inlineprivate

Set the m_int16SetGet value.

Parameters
vThe value to set.

Definition at line 372 of file attribute-test-suite.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ DoSetIntSrc()

bool AttributeObjectTest::DoSetIntSrc ( int8_t  v)
inlineprivate

Set the m_intSrc2 value.

Parameters
vThe value to set.
Returns
true.

Definition at line 398 of file attribute-test-suite.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ DoSetTestA()

void AttributeObjectTest::DoSetTestA ( bool  v)
inlineprivate

Set the m_boolTestA value.

Parameters
vThe value to set.

Definition at line 348 of file attribute-test-suite.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTypeId()

◆ InvokeCb()

void AttributeObjectTest::InvokeCb ( double  a,
int  b,
float  c 
)
inline

Invoke the m_cb callback.

Parameters
aThe first argument of the callback.
bThe second argument of the callback.
cThe third argument of the callback.

Definition at line 326 of file attribute-test-suite.cc.

◆ InvokeCbValue()

void AttributeObjectTest::InvokeCbValue ( int8_t  a)
inline

Invoke the m_cbValue callback.

Parameters
aThe argument of the callback.

Definition at line 335 of file attribute-test-suite.cc.

Member Data Documentation

◆ m_boolSrc

TracedValue<bool> AttributeObjectTest::m_boolSrc
private

bool Traced value.

Definition at line 458 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_boolTest

bool AttributeObjectTest::m_boolTest
private

Boolean test.

Definition at line 431 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_boolTestA

bool AttributeObjectTest::m_boolTestA
private

Boolean test A.

Definition at line 430 of file attribute-test-suite.cc.

◆ m_boolTestDeprecated

bool AttributeObjectTest::m_boolTestDeprecated
private

Boolean test deprecated.

Definition at line 432 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_cb

TracedCallback<double, int, float> AttributeObjectTest::m_cb
private

TracedCallback (double, int, float).

Definition at line 450 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_cbValue

Callback<void,int8_t> AttributeObjectTest::m_cbValue
private

Callback accepting an integer.

Definition at line 444 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_doubleSrc

TracedValue<double> AttributeObjectTest::m_doubleSrc
private

double Traced value.

Definition at line 457 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_enum

enum Test_e AttributeObjectTest::m_enum
private

Enum.

Definition at line 437 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_enumSetGet

enum Test_e AttributeObjectTest::m_enumSetGet
private

Enum set-get.

Definition at line 437 of file attribute-test-suite.cc.

◆ m_enumSrc

TracedValue<enum Test_e> AttributeObjectTest::m_enumSrc
private

enum Traced value.

Definition at line 456 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_float

float AttributeObjectTest::m_float
private

float.

Definition at line 437 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_int16

int16_t AttributeObjectTest::m_int16
private

16-bit integer.

Definition at line 433 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_int16SetGet

int16_t AttributeObjectTest::m_int16SetGet
private

16-bit integer set-get.

Definition at line 435 of file attribute-test-suite.cc.

◆ m_int16WithBounds

int16_t AttributeObjectTest::m_int16WithBounds
private

16-bit integer with bounds.

Definition at line 434 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_intSrc1

TracedValue<int8_t> AttributeObjectTest::m_intSrc1
private

First int8_t Traced value.

Definition at line 445 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_intSrc2

TracedValue<int8_t> AttributeObjectTest::m_intSrc2
private

Second int8_t Traced value.

Definition at line 446 of file attribute-test-suite.cc.

◆ m_map1

std::map<uint32_t, Ptr<Derived> > AttributeObjectTest::m_map1
private

Map of uint32_t, derived objects.

Definition at line 443 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_ptr

Ptr<Derived> AttributeObjectTest::m_ptr
private

Pointer to Derived class.

Definition at line 452 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_ptrInitialized

Ptr<Derived> AttributeObjectTest::m_ptrInitialized
private

Pointer to Derived class.

Definition at line 453 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_ptrInitialized2

Ptr<Derived> AttributeObjectTest::m_ptrInitialized2
private

Pointer to Derived class.

Definition at line 454 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_random

Ptr<RandomVariableStream> AttributeObjectTest::m_random
private

Random number generator.

Definition at line 440 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_timeWithBounds

Time AttributeObjectTest::m_timeWithBounds
private

Time with bounds.

Definition at line 459 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_uint8

uint8_t AttributeObjectTest::m_uint8
private

8-bit integer.

Definition at line 436 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_uintSrc

TracedValue<uint8_t> AttributeObjectTest::m_uintSrc
private

uint8_t Traced value.

Definition at line 455 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_valueSrc

TracedValue<ValueClassTest> AttributeObjectTest::m_valueSrc
private

ValueClassTest Traced value.

Definition at line 451 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_vector1

std::vector<Ptr<Derived> > AttributeObjectTest::m_vector1
private

First vector of derived objects.

Definition at line 441 of file attribute-test-suite.cc.

Referenced by GetTypeId().

◆ m_vector2

std::vector<Ptr<Derived> > AttributeObjectTest::m_vector2
private

Second vector of derived objects.

Definition at line 442 of file attribute-test-suite.cc.


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