A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
 TestVectors (const TestVectors &)=delete
 
virtual ~TestVectors ()
 Virtual destructor.
 
std::size_t Add (T vector)
 
std::vector< T >::iterator begin ()
 
std::vector< T >::const_iterator begin () const
 
std::vector< T >::iterator end ()
 
std::vector< T >::const_iterator end () const
 
Get (std::size_t i) const
 Get the i'th test vector.
 
std::size_t GetN () const
 Get the total number of test vectors.
 
TestVectorsoperator= (const TestVectors &)=delete
 
void Reserve (uint32_t reserve)
 Set the expected length of this vector.
 

Private Types

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

Private Attributes

TestVector m_vectors
 The list of test vectors.
 

Detailed Description

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

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

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

Constructor & Destructor Documentation

◆ TestVectors() [1/2]

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

Constructor.

Definition at line 1427 of file test.h.

◆ ~TestVectors()

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

Virtual destructor.

Definition at line 1440 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 ( T vector)
Parameters
[in]vectorThe test vector to add
Returns
The new test vector index

Definition at line 1446 of file test.h.

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

+ Here is the caller graph for this function:

◆ begin() [1/2]

template<typename T >
std::vector< T >::iterator ns3::TestVectors< T >::begin ( )
inline
Returns
The underlying data structure begin iterator

Definition at line 1392 of file test.h.

◆ begin() [2/2]

template<typename T >
std::vector< T >::const_iterator ns3::TestVectors< T >::begin ( ) const
inline
Returns
The underlying data structure const begin iterator

Definition at line 1408 of file test.h.

◆ end() [1/2]

template<typename T >
std::vector< T >::iterator ns3::TestVectors< T >::end ( )
inline
Returns
The underlying data structure end iterator

Definition at line 1400 of file test.h.

Referenced by grid.TimelinesRenderer::draw_events(), and grid.TimelinesRenderer::draw_ranges().

+ Here is the caller graph for this function:

◆ end() [2/2]

template<typename T >
std::vector< T >::const_iterator ns3::TestVectors< T >::end ( ) const
inline
Returns
The underlying data structure const end iterator

Definition at line 1416 of file test.h.

Referenced by grid.TimelinesRenderer::draw_events(), and grid.TimelinesRenderer::draw_ranges().

+ 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 1462 of file test.h.

References NS_ABORT_MSG_UNLESS.

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

+ Here is the caller graph for this function:

◆ GetN()

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

Get the total number of test vectors.

Returns
The number of test vectors

Definition at line 1455 of file test.h.

Referenced by Ns3TcpNoDelayTestCase::DoRun(), Ns3TcpSocketTestCaseCsma::DoRun(), and Ns3TcpSocketTestCaseP2P::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 1434 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 1423 of file test.h.


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