AFI
Advanced Forwarding Interface
|
![]() |
Base class for all Aft nodes. More...
#include <AftNode.h>
Public Member Functions | |
AftNode (const AftNode &node) | |
Copy constructor for a basic node. More... | |
AftNode (const AftNodeToken newToken=AFT_NODE_TOKEN_NONE, const AftNodeToken newNext=AFT_NODE_TOKEN_NONE, const std::string newName="") | |
Construct an entry for a basic node. More... | |
operator const AftNodeToken () const | |
const AftNodeToken | nodeToken () const |
const std::string | nodeName () const |
const AftTypeIndex | nodeTypeIndex () const |
void | setNodeNext (AftNodeToken newNext) |
Set the (optional) next node. More... | |
const AftNodeToken | nodeNext () const |
void | setNodeParameters (const AftParameters::Ptr &newParams) |
Set the optional parameters of the node. More... | |
const AftParameters::Ptr | nodeParameters () const |
template<class T > | |
std::shared_ptr< T > | nodeParameter (const std::string &name) |
Convenience parameter access template. Use this to access node parameters. More... | |
void | setNodeParameter (const std::string &name, const AftDataPtr &data) |
Convenience parameter setter. Use this to set node parameters. More... | |
virtual const std::string | nodeType () const |
virtual const bool | nodeIsContainer () const |
@ returns true if node can take entries | |
virtual const bool | nodeIsDelete () const |
@ returns true if node is a delete | |
virtual const bool | nodeIsValid (const AftValidatorPtr &validator, std::ostream &os) |
@ returns true if node is valid | |
virtual void | nextNodes (AftTokenVector &nextTokens) |
virtual std::ostream & | description (std::ostream &os) const |
Append a description of the node to an output stream. More... | |
Static Public Member Functions | |
template<class T > | |
static std::shared_ptr< T > | downcast (const AftNodePtr &node) |
Convenience downcast template. Use this instead of manual casting if required. More... | |
Protected Member Functions | |
void | setNodeName (std::string newName) |
Set the name of the node. More... | |
void | setNodeToken (AftNodeToken newToken) |
Set the token value of the node. More... | |
void | setNodeTypeIndex (AftTypeIndex newTypeIndex) |
Set the sandbox node type index. More... | |
Protected Attributes | |
friend | AftInsert |
AftInsert accesses the setNodeName and setNodeToken methods. | |
friend | AftSandbox |
AftSandbox accesses the setNodeName and setNodeToken methods. | |
friend | AfiNodeRpc |
AfiNodeRpc accesses the setNodeName and setNodeToken methods. | |
AftNodeToken | _nodeToken |
Unique token value for node. | |
AftNodeToken | _nodeNext |
Optional value of next node. | |
std::string | _nodeName |
Optional name of node. | |
AftParameters::Ptr | _nodeParams |
Optional node parameters. | |
AftTypeIndex | _nodeTypeIndex |
Scalar index type for node. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const AftNode &node) |
Define << class operator to append description to an output stream. More... | |
Base class for all Aft nodes.
This is the base class for all Aft nodes and forms the basic footprint of fundamental class methods that all nodes must support. We never create AftNode objects directly. The class is instantiated by inheriting from it in specific node classes and constructed via the derived classes own constructor.
|
inline |
Copy constructor for a basic node.
[in] | node | Node to copy |
|
inline |
Construct an entry for a basic node.
[in] | newToken | Unique token for node |
[in] | newNext | Optional Next token for node |
[in] | newName | Optional searchable name for node |
|
inlinevirtual |
Append a description of the node to an output stream.
[in] | os | Reference to output stream to append description to |
Reimplemented in AftPlaceholder, AftSandboxLink, AftVariable, AftWrite, AftEncap, AftDecap, AftIndirect, AftLookup, AftTable, AftTree, AftContinue, AftReceive, AftDiscard, AftPolicer, AftLoadBalance, AftIndexedList, AftList, and AftPort.
|
inlinestatic |
Convenience downcast template. Use this instead of manual casting if required.
[in] | node | Node to downcast |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
Convenience parameter access template. Use this to access node parameters.
[in] | name | Parameter name to look for |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in AftPlaceholder, AftSandboxLink, AftVariable, AftWrite, AftEncap, AftDecap, AftIndirect, AftLookup, AftTable, AftTree, AftSwitch, AftMatch, AftContinue, AftReceive, AftDiscard, AftPolicer, AftCounter, AftLoadBalance, AftIndexedList, AftList, AftOutputPort, AftInputPort, AftPort, AftDeleteNode, AftFilter, and AftFilterTemplate.
|
inline |
|
inline |
|
inlineprotected |
Set the name of the node.
[in] | newName | Name of the node |
|
inline |
Set the (optional) next node.
[in] | newNextNode | Token for the next node |
|
inline |
Convenience parameter setter. Use this to set node parameters.
[in] | name | Parameter name to set |
[in] | data | Reference to data to associate with name |
|
inline |
Set the optional parameters of the node.
[in] | newParams | Pointer to parameters for node |
|
inlineprotected |
Set the token value of the node.
[in] | newToken | Value of the token |
|
inlineprotected |
Set the sandbox node type index.
[in] | newTypeIndex | Node type index |
|
friend |
Define << class operator to append description to an output stream.
[in] | os | Reference to output stream to append to |
[in] | node | Reference to node to append description of to stream |