A Discrete-Event Network Simulator
API
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 >:
+ Collaboration diagram for ns3::TestVectors< T >:

Public Member Functions

 TestVectors ()
 Constructor. More...
 
 TestVectors (const TestVectors &)=delete
 
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 () const
 Get the total number of test vectors. More...
 
TestVectorsoperator= (const TestVectors &)=delete
 
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...
 

Detailed Description

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

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

Definition at line 1318 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 1361 of file test.h.

Constructor & Destructor Documentation

◆ TestVectors() [1/2]

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

Constructor.

Definition at line 1366 of file test.h.

◆ ~TestVectors()

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

Virtual destructor.

Definition at line 1379 of file test.h.

◆ TestVectors() [2/2]

template<typename T >
ns3::TestVectors< T >::TestVectors ( const TestVectors< T > &  )
delete

Member Function Documentation

◆ Add()

template<typename T >
std::size_t ns3::TestVectors< T >::Add ( vector)
Parameters
[in]vectorThe test vector to add
Returns
The new test vector index

Definition at line 1385 of file test.h.

Referenced by Ns3TcpNoDelayTestCase::DoRun(), Ns3TcpSocketTestCaseP2P::DoRun(), Ns3TcpSocketTestCaseCsma::DoRun(), Ns3TcpNoDelayTestCase::SinkRx(), Ns3TcpSocketTestCaseP2P::SinkRx(), and Ns3TcpSocketTestCaseCsma::SinkRx().

+ Here is the caller graph for this function:

◆ 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 1401 of file test.h.

References NS_ABORT_MSG_UNLESS.

Referenced by Ns3TcpNoDelayTestCase::DoRun(), Ns3TcpSocketTestCaseP2P::DoRun(), and Ns3TcpSocketTestCaseCsma::DoRun().

+ Here is the caller graph for this function:

◆ GetN()

template<typename T >
std::size_t ns3::TestVectors< T >::GetN

Get the total number of test vectors.

Returns
The number of test vectors

Definition at line 1394 of file test.h.

Referenced by Ns3TcpNoDelayTestCase::DoRun(), Ns3TcpSocketTestCaseP2P::DoRun(), and Ns3TcpSocketTestCaseCsma::DoRun().

+ Here is the caller graph for this function:

◆ operator=()

template<typename T >
TestVectors& ns3::TestVectors< T >::operator= ( const TestVectors< T > &  )
delete

◆ 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 1373 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 1362 of file test.h.


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