FSM Library - C++ version
Public Member Functions | Protected Attributes | Friends | List of all members
Trace Class Reference
Inheritance diagram for Trace:
Inheritance graph
[legend]

Public Member Functions

 Trace (const std::shared_ptr< FsmPresentationLayer > presentationLayer)
 
 Trace (const std::vector< int > &trace, const std::shared_ptr< FsmPresentationLayer > presentationLayer)
 
void add (const int e)
 
std::vector< int > get () const
 
std::vector< int >::const_iterator cbegin () const
 
std::vector< int >::const_iterator cend () const
 

Protected Attributes

std::vector< int > trace
 
const std::shared_ptr< FsmPresentationLayerpresentationLayer
 

Friends

bool operator== (Trace const &trace1, Trace const &trace2)
 
std::ostream & operator<< (std::ostream &out, const Trace &trace)
 

Constructor & Destructor Documentation

Trace::Trace ( const std::shared_ptr< FsmPresentationLayer presentationLayer)

Create an empty trace, with only one presentation layer

Parameters
presentationLayerThe presentation layer used by the trace
Trace::Trace ( const std::vector< int > &  trace,
const std::shared_ptr< FsmPresentationLayer presentationLayer 
)

Create a trace

Parameters
traceThe trace itself, represented by a list of int
presentationLayerThe presentation layer used by the trace

Member Function Documentation

void Trace::add ( const int  e)

Add an element, at the end of the trace

Here is the caller graph for this function:

std::vector< int >::const_iterator Trace::cbegin ( ) const

Getter for an iterator of the trace, pointing at the beginning

Returns
The iterator

Here is the caller graph for this function:

std::vector< int >::const_iterator Trace::cend ( ) const

Getter for an iterator of the trace, pointing at the end

Returns
The iterator

Here is the caller graph for this function:

std::vector< int > Trace::get ( ) const

Getter for the trace itself

Returns
The trace itself, represented by a list of int

Here is the caller graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Trace trace 
)
friend

Output the Trace to a standard output stream

Parameters
outThe standard output stream to use
traceThe Trace to print
Returns
The standard output stream used, to allow user to cascade <<
bool operator== ( Trace const &  trace1,
Trace const &  trace2 
)
friend

Check wheter or not, the 2 trace are the same

Parameters
trace1The first trace
trace2The second trace
Returns
True if they are the same, false otherwise

Member Data Documentation

const std::shared_ptr<FsmPresentationLayer> Trace::presentationLayer
protected

The presentation layer used by the trace

std::vector<int> Trace::trace
protected

The trace itself, represented by a list of int


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