AFI
Advanced Forwarding Interface
|
![]() |
Primary class for managing Aft nodes and entries. More...
#include <AftSandbox.h>
Public Member Functions | |
AftSandbox (const std::string &newName) | |
Default constructor for sandboxes. More... | |
AftSandbox (const AftSandbox &sandbox) | |
Default copy constructor for sandboxes. More... | |
const bool | find (std::string nodeType, const std::string &nodeName, AftNodeToken &nodeToken) |
const bool | isValid (AftNodeToken nodeToken) |
const bool | isValid (const AftField &field) |
const bool | isOfType (AftNodeToken nodeToken, std::string nodeType) |
AftNodeToken | defaultToken (std::string nodeType) |
bool | send (const AftInsertPtr &insert) |
bool | send (const AftInsertPtr &insert, AftRemovePtr &remove) |
bool | send (const AftRemovePtr &remove) |
void | setMaxInputPort (AftIndex maxIndex) |
AftIndex | inputPortCount () |
bool | outputPortByIndex (AftIndex portIndex, AftNodeToken &portToken) |
bool | outputPortByName (const std::string &portName, AftNodeToken &portToken) |
void | setMaxOutputPort (AftIndex maxIndex) |
AftIndex | outputPortCount () |
void | setInputPortByIndex (AftIndex portIndex, AftNodeToken nextToken) |
void | setInputPortByName (const std::string &portName, AftNodeToken nextToken) |
AftNodeToken | allocate () |
const std::string | name () const |
void | setName (const std::string &newName) |
Set name of sandbox. More... | |
const AftPortTablePtr & | inputPortTable () const |
const AftPortTablePtr & | outputPortTable () const |
const AftTypeTablePtr & | typeTable () const |
const AftFieldTablePtr & | fieldTable () const |
void | setTransport (const AftTransportPtr &newTransport) |
Sets the underlying transport to be used by the sandbox. More... | |
AftTransportPtr | transport () |
bool | hasTransport () |
bool | receive (const AftNodePtr &node) |
Main receiver handler for incoming AftNode objects. More... | |
bool | receive (const AftEntryPtr &entry) |
Main receiver handler for incoming AftEntry objects. More... | |
bool | validate (const AftNodePtr &node) |
bool | validate (const AftEntryPtr &node) |
bool | validate (AftNodeToken nodeToken, std::ostream &os) |
bool | validate (const AftTokenVector &nodeTokens, std::ostream &os) |
bool | validate (const AftField &field, std::ostream &os) |
bool | validate (const AftFieldVector &fields, std::ostream &os) |
bool | validate (const AftKey &key, std::ostream &os) |
bool | validate (const AftKeyVector &keys, std::ostream &os) |
std::ostream & | description (std::ostream &os) const |
Static Public Member Functions | |
static AftSandboxPtr | create (const std::string &newName) |
static AftSandboxPtr | create (const AftSandboxPtr &sandbox) |
Protected Member Functions | |
void | _insert (const AftNodePtr &node) |
void | _remove (AftNodeToken nodeToken) |
void | release (AftNodeToken releasedToken) |
Protected Attributes | |
AftSandboxWeakPtr | _selfPtr |
Weak pointer to itself. | |
std::string | _name |
Name of the sandbox. | |
AftTransportPtr | _transport |
Transport responsible for the server connection. | |
AftNameTable | _nameTable |
Name lookup table for the sandbox. | |
AftTypeTablePtr | _typeTable |
Type lookup table for the sandbox. | |
AftTokenTablePtr | _tokenTable |
Token allocation table for the sandbox. | |
AftFieldTablePtr | _fieldTable |
Field name table for the sandbox. | |
AftPortTablePtr | _inputPorts |
Input port table for the sandbox. | |
AftPortTablePtr | _outputPorts |
Output port table for the sandbox. | |
AftEncapTablePtr | _encaps |
Table of available encapsulations. | |
AftDecapTablePtr | _decaps |
Table of available de-encapsulations. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const AftSandboxPtr &sandbox) |
Define << class operator to append description to an output stream. More... | |
Primary class for managing Aft nodes and entries.
AftSandbox::AftSandbox | ( | const std::string & | newName | ) |
Default constructor for sandboxes.
[in] | newName | Unique name of new sandbox |
AftSandbox::AftSandbox | ( | const AftSandbox & | sandbox | ) |
Default copy constructor for sandboxes.
[in] | sandbox | Sandbox to use as template for new sandbox |
|
inline |
|
inlinevirtual |
Implements AftReceiver.
|
inline |
|
inline |
|
inline |
|
virtual |
Main receiver handler for incoming AftNode objects.
[in] | node | Reference to node object to receive |
Implements AftReceiver.
|
virtual |
Main receiver handler for incoming AftEntry objects.
[in] | entry | Reference to entry object to receive |
Implements AftReceiver.
|
inline |
Set name of sandbox.
[in] | name | String to set sandbox name to |
|
inlinevirtual |
Sets the underlying transport to be used by the sandbox.
[in] | transport | Reference to transport pointer |
Implements AftReceiver.
|
inlinevirtual |
Implements AftReceiver.
|
inline |
|
friend |
Define << class operator to append description to an output stream.
[in] | os | Reference to output stream to append description to |
[in] | sandbox | Reference to sandbox to generate description for |