A Discrete-Event Network Simulator
API
Public Member Functions | Private Types | Private Attributes | List of all members
ns3::TestVectors< T > Class Template Reference

A simple way to store test vectors (for stimulus or from responses) More...

#include "test.h"

+ Inheritance diagram for ns3::TestVectors< T >:

Public Member Functions

 TestVectors ()
 Constructor. More...
 
virtual ~TestVectors ()
 Virtual destructor. More...
 
std::size_t Add (T vector)
 
Get (std::size_t i) const
 Get the i'th test vector. More...
 
std::size_t GetN (void) const
 Get the total number of test vectors. More...
 
void Reserve (uint32_t reserve)
 Set the expected length of this vector. More...
 

Private Types

typedef std::vector< T > TestVector
 Container type. More...
 

Private Attributes

TestVector m_vectors
 The list of test vectors. More...
 

Additional Inherited Members

- Private Member Functions inherited from ns3::NonCopyable
 NonCopyable ()
 Constructor. More...
 
 ~NonCopyable ()
 Destructor. More...
 

Detailed Description

template<typename T>
class ns3::TestVectors< T >

A simple way to store test vectors (for stimulus or from responses)

Definition at line 1405 of file test.h.

Member Typedef Documentation

◆ TestVector

template<typename T>
typedef std::vector<T> ns3::TestVectors< T >::TestVector
private

Container type.

Definition at line 1444 of file test.h.

Constructor & Destructor Documentation

◆ TestVectors()

template<typename T >
ns3::TestVectors< T >::TestVectors ( )

Constructor.

Definition at line 1449 of file test.h.

◆ ~TestVectors()

template<typename T >
ns3::TestVectors< T >::~TestVectors ( )
virtual

Virtual destructor.

Definition at line 1462 of file test.h.

Member Function Documentation

◆ Add()

template<typename T>
std::size_t ns3::TestVectors< T >::Add ( vector)

◆ Get()

template<typename T >
T ns3::TestVectors< T >::Get ( std::size_t  i) const

Get the i'th test vector.

Parameters
[in]iThe requested vector index
Returns
The requested vector

Definition at line 1484 of file test.h.

Referenced by Ns3TcpNoDelayTestCase::DoRun(), Ns3TcpSocketTestCase1::DoRun(), NscTcpLossTestCase1::DoRun(), Ns3TcpSocketTestCase2::DoRun(), and NscTcpLossTestCase2::DoRun().

◆ GetN()

template<typename T >
std::size_t ns3::TestVectors< T >::GetN ( void  ) const

Get the total number of test vectors.

Returns
The number of test vectors

Definition at line 1477 of file test.h.

Referenced by Ns3TcpNoDelayTestCase::DoRun(), Ns3TcpSocketTestCase1::DoRun(), NscTcpLossTestCase1::DoRun(), Ns3TcpSocketTestCase2::DoRun(), and NscTcpLossTestCase2::DoRun().

◆ Reserve()

template<typename T >
void ns3::TestVectors< T >::Reserve ( uint32_t  reserve)

Set the expected length of this vector.

Parameters
[in]reserveThe number of entries to reserve

Definition at line 1456 of file test.h.

Member Data Documentation

◆ m_vectors

template<typename T>
TestVector ns3::TestVectors< T >::m_vectors
private

The list of test vectors.

Definition at line 1445 of file test.h.


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