AFI
Advanced Forwarding Interface
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
AftEntry Class Reference

Base class for all Aft entries. More...

#include <AftEntry.h>

Inheritance diagram for AftEntry:
AftDeleteEntry AftFilterTerm

Public Member Functions

 AftEntry (const AftNodeToken newParentNode, const AftKey newKey, const AftNodeToken newEntryNode)
 Construct an entry for a container node. More...
 
 _entryNode (newEntryNode)
 
 AftEntry (const AftNodeToken newParentNode, const AftKeyVector newKeys, const AftNodeToken newEntryNode)
 Construct an entry for a container node. More...
 
 AftEntry (const AftNodeToken newParentNode, const AftIndex newEntryIndex, const AftNodeToken newEntryNode)
 Construct an indexed entry. More...
 
const AftNodeToken parentNode () const
 
const AftKeyVectorentryKeys () const
 
const AftNodeToken entryNode () const
 
void setEntryParameters (const AftParameters::Ptr &newParams)
 Set the optional parameters of the entry. More...
 
const AftParameters::Ptr entryParameters () const
 
template<class T >
std::shared_ptr< T > entryParameter (const std::string &name)
 Convenience parameter access template. Use this to access entry parameters. More...
 
void setEntryParameter (const std::string &name, const AftDataPtr &data)
 Convenience parameter setter. Use this to set entry parameters. More...
 
virtual const std::string entryType () const
 
virtual const bool entryIsDelete () const
 @ returns true if entry is a delete
 
virtual const bool entryIsValid (const AftValidatorPtr &validator, std::ostream &os)
 @ returns true if entry is valid
 
virtual void nextNodes (AftTokenVector &nextTokens)
 
virtual std::ostream & description (std::ostream &os) const
 Append a description of the entry to an output stream. More...
 

Static Public Member Functions

static AftEntryPtr create (const AftNodeToken newParentNode, const AftKeyVector newKeys, const AftNodeToken newEntryNode)
 Factory generator for an entry for a container node. More...
 
static AftEntryPtr create (const AftNodeToken newParentNode, const AftKey newKey, const AftNodeToken newEntryNode)
 Factory generator for an entry for a container node. More...
 
static AftEntryPtr create (const AftNodeToken newParentNode, const AftIndex newEntryIndex, const AftNodeToken newEntryNode)
 Factory generator for an indexed entry. More...
 

Protected Attributes

AftNodeToken _parentNode
 Node token of the container for the entry.
 
AftKeyVector _entryKeys
 Unique key values for the entry.
 
AftNodeToken _entryNode
 Token for the first node to execute on a match.
 
AftParameters::Ptr _entryParams
 Optional parameters for the entry.
 

Friends

std::ostream & operator<< (std::ostream &os, const AftEntry &entry)
 Define << class operator to append description to an output stream. More...
 

Detailed Description

Base class for all Aft entries.

Constructor & Destructor Documentation

AftEntry::AftEntry ( const AftNodeToken  newParentNode,
const AftKey  newKey,
const AftNodeToken  newEntryNode 
)
inline

Construct an entry for a container node.

Parameters
[in]newParentNodeToken for parent node for entry
[in]newKeyUnique key for entry
[in]newEntryNodeToken value of next node
AftEntry::AftEntry ( const AftNodeToken  newParentNode,
const AftKeyVector  newKeys,
const AftNodeToken  newEntryNode 
)
inline

Construct an entry for a container node.

Parameters
[in]newParentNodeToken for parent node for entry
[in]newKeysVector of unique keys for entry
[in]newEntryNodeToken value of next node
AftEntry::AftEntry ( const AftNodeToken  newParentNode,
const AftIndex  newEntryIndex,
const AftNodeToken  newEntryNode 
)
inline

Construct an indexed entry.

Parameters
[in]newParentNodeToken for parent node insert into
[in]newEntryIndexIndex of entry to insert
[in]newEntryNodeToken for node to execute for this entry

Member Function Documentation

static AftEntryPtr AftEntry::create ( const AftNodeToken  newParentNode,
const AftKeyVector  newKeys,
const AftNodeToken  newEntryNode 
)
inlinestatic

Factory generator for an entry for a container node.

Parameters
[in]newParentNodeToken for parent node for entry
[in]newKeysVector of unique keys for entry
[in]newEntryNodeToken value of next node
static AftEntryPtr AftEntry::create ( const AftNodeToken  newParentNode,
const AftKey  newKey,
const AftNodeToken  newEntryNode 
)
inlinestatic

Factory generator for an entry for a container node.

Parameters
[in]newParentNodeToken for parent node for entry
[in]newKeyUnique key for entry
[in]newEntryNodeToken value of next node
static AftEntryPtr AftEntry::create ( const AftNodeToken  newParentNode,
const AftIndex  newEntryIndex,
const AftNodeToken  newEntryNode 
)
inlinestatic

Factory generator for an indexed entry.

Parameters
[in]newParentNodeToken for parent node for entry
[in]newEntryIndexIndex of entry to insert
[in]newEntryNodeToken for node to execute for this entry
virtual std::ostream& AftEntry::description ( std::ostream &  os) const
inlinevirtual

Append a description of the entry to an output stream.

Parameters
[in]osReference to output stream to append description to
Returns
Reference to output stream with text description of entry appended
const AftKeyVector& AftEntry::entryKeys ( ) const
inline
Returns
Vector of unique keys for entry
const AftNodeToken AftEntry::entryNode ( ) const
inline
Returns
Token of next node for entry
template<class T >
std::shared_ptr<T> AftEntry::entryParameter ( const std::string &  name)
inline

Convenience parameter access template. Use this to access entry parameters.

Parameters
[in]nameParameter name to look for
Returns
Pointer to AftData if parameter is found
const AftParameters::Ptr AftEntry::entryParameters ( ) const
inline
Returns
Optional parameters for entry
virtual const std::string AftEntry::entryType ( ) const
inlinevirtual
Returns
Class of entry as a string

Reimplemented in AftDeleteEntry, and AftFilterTerm.

virtual void AftEntry::nextNodes ( AftTokenVector nextTokens)
inlinevirtual
Returns
Appends valid next tokens to token vector
const AftNodeToken AftEntry::parentNode ( ) const
inline
Returns
Token for parent node of entry
void AftEntry::setEntryParameter ( const std::string &  name,
const AftDataPtr data 
)
inline

Convenience parameter setter. Use this to set entry parameters.

Parameters
[in]nameParameter name to set
[in]dataReference to data to associate with name
void AftEntry::setEntryParameters ( const AftParameters::Ptr newParams)
inline

Set the optional parameters of the entry.

Parameters
[in]newParamsPointer to parameters for entry

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const AftEntry entry 
)
friend

Define << class operator to append description to an output stream.

Parameters
[in]osReference to output stream to append to
[in]entryReference to entry to append description of to stream

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