A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
PrivateStructTestData Struct Reference

Structure with private fields used by the StructValue tests. More...

Collaboration diagram for PrivateStructTestData:

Public Member Functions

 PrivateStructTestData ()=default
 Default constructor.
 PrivateStructTestData (std::string name, uint16_t count, double value)
 Construct an instance with the given field values.
uint16_t GetCount () const
double GetValue () const
bool operator== (const PrivateStructTestData &) const =default
 Compare two structures.
void SetCount (uint16_t count)
 Set the count field.
void SetValue (double value)
 Set the value field.

Static Public Member Functions

static PrivateStructTestData Create (std::string name, uint16_t count, double value)
 Construct an instance from its field values.

Public Attributes

std::string m_name
 Name field (publicly accessible).

Private Attributes

uint16_t m_count {}
 Count field.
double m_value {}
 Value field.

Detailed Description

Structure with private fields used by the StructValue tests.

Definition at line 46 of file struct-value-test-suite.cc.

Constructor & Destructor Documentation

◆ PrivateStructTestData() [1/2]

PrivateStructTestData::PrivateStructTestData ( )
default

Default constructor.

Referenced by Create(), and operator==().

Here is the caller graph for this function:

◆ PrivateStructTestData() [2/2]

PrivateStructTestData::PrivateStructTestData ( std::string name,
uint16_t count,
double value )
inline

Construct an instance with the given field values.

Parameters
nameThe name field.
countThe count field.
valueThe value field.

Definition at line 59 of file struct-value-test-suite.cc.

References m_count, m_name, and m_value.

Member Function Documentation

◆ Create()

PrivateStructTestData PrivateStructTestData::Create ( std::string name,
uint16_t count,
double value )
inlinestatic

Construct an instance from its field values.

Parameters
nameThe name field.
countThe count field.
valueThe value field.
Returns
the constructed instance

Definition at line 74 of file struct-value-test-suite.cc.

References PrivateStructTestData().

Here is the call graph for this function:

◆ GetCount()

uint16_t PrivateStructTestData::GetCount ( ) const
inline
Returns
the count field

Definition at line 80 of file struct-value-test-suite.cc.

References m_count.

◆ GetValue()

double PrivateStructTestData::GetValue ( ) const
inline
Returns
the value field

Definition at line 96 of file struct-value-test-suite.cc.

References m_value.

◆ operator==()

bool PrivateStructTestData::operator== ( const PrivateStructTestData & ) const
default

Compare two structures.

Returns
true if all fields are equal

References PrivateStructTestData().

Here is the call graph for this function:

◆ SetCount()

void PrivateStructTestData::SetCount ( uint16_t count)
inline

Set the count field.

Parameters
countThe count to set.

Definition at line 90 of file struct-value-test-suite.cc.

References m_count.

◆ SetValue()

void PrivateStructTestData::SetValue ( double value)
inline

Set the value field.

Parameters
valueThe value to set.

Definition at line 106 of file struct-value-test-suite.cc.

References m_value.

Member Data Documentation

◆ m_count

uint16_t PrivateStructTestData::m_count {}
private

Count field.

Definition at line 121 of file struct-value-test-suite.cc.

Referenced by PrivateStructTestData(), GetCount(), and SetCount().

◆ m_name

std::string PrivateStructTestData::m_name

Name field (publicly accessible).

Definition at line 118 of file struct-value-test-suite.cc.

Referenced by PrivateStructTestData().

◆ m_value

double PrivateStructTestData::m_value {}
private

Value field.

Definition at line 122 of file struct-value-test-suite.cc.

Referenced by PrivateStructTestData(), GetValue(), and SetValue().


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