StateMachine< Identifier, Packet >::ConnectionPool Class Reference

#include <stateMachine.hpp>

Public Member Functions

 ConnectionPool ()
 
 ~ConnectionPool ()
 
void add (ConnectionID &cID, State &st)
 Add connection and state to the connection pool. More...
 
bool findAndErase (ConnectionID &cID, State *st)
 Try to find a state for a given connection ID. More...
 

Detailed Description

template<class Identifier, class Packet>
class StateMachine< Identifier, Packet >::ConnectionPool

Definition at line 246 of file stateMachine.hpp.

Constructor & Destructor Documentation

◆ ConnectionPool()

template<class Identifier, class Packet>
StateMachine< Identifier, Packet >::ConnectionPool::ConnectionPool ( )
inline

Definition at line 255 of file stateMachine.hpp.

◆ ~ConnectionPool()

template<class Identifier, class Packet>
StateMachine< Identifier, Packet >::ConnectionPool::~ConnectionPool ( )
inline

Definition at line 269 of file stateMachine.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ add()

template<class Identifier, class Packet>
void StateMachine< Identifier, Packet >::ConnectionPool::add ( ConnectionID &  cID,
State st 
)
inline

Add connection and state to the connection pool.

Parameters
cIDID of the connection
stState for the connection

Definition at line 287 of file stateMachine.hpp.

◆ findAndErase()

template<class Identifier, class Packet>
bool StateMachine< Identifier, Packet >::ConnectionPool::findAndErase ( ConnectionID &  cID,
State st 
)
inline

Try to find a state for a given connection ID.

This function tries to find the state for a given connection ID. If a state is found, it is written in *st, otherwise nothing is written. True is returned, if a state is found. False otherwise.

Parameters
cIDConnection ID to look for
stPointer to memory for the state
Returns
Found or not found

Definition at line 306 of file stateMachine.hpp.

Here is the call graph for this function:

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