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

Base class for all Aft data classes. More...

#include <AftData.h>

Inheritance diagram for AftData:
AftDataEtherAddr AftDataInt AftDataIP4Addr AftDataIP6Addr AftDataLabel AftDataPrefix AftDataString

Public Member Functions

 AftData (uint32_t newBitLength)
 Base constructor for data objects. More...
 
const uint32_t bitLength () const
 
const uint32_t byteLength () const
 
bool operator== (const AftData &aData) const
 Comparator for data. More...
 
virtual uint32_t append (AftDataBytes &newData)
 Append contents of data object to AftDataBytes vector. More...
 
virtual const std::string dataClass () const
 
virtual std::ostream & description (std::ostream &os) const
 Append a description of the data to an output stream. More...
 
virtual int compare (const AftData &aData) const
 Compare data. More...
 

Protected Member Functions

void setBitLength (uint32_t newBitLength)
 Set the bitlength of the data. More...
 

Protected Attributes

uint32_t _bitLength
 Size of encapsulated data in bits.
 

Friends

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

Detailed Description

Base class for all Aft data classes.

Constructor & Destructor Documentation

AftData::AftData ( uint32_t  newBitLength)
inline

Base constructor for data objects.

Parameters
[in]newBitLengthLength in bits of data

Member Function Documentation

virtual uint32_t AftData::append ( AftDataBytes newData)
inlinevirtual

Append contents of data object to AftDataBytes vector.

Parameters
[in]dataReference to AftDataBytes vector to append to

Reimplemented in AftDataLabel, AftDataEtherAddr, AftDataIP6Addr, AftDataIP4Addr, AftDataPrefix, AftDataString, and AftDataInt.

const uint32_t AftData::bitLength ( ) const
inline
Returns
Length in bits of data
const uint32_t AftData::byteLength ( ) const
inline
Returns
Length in bytes of data
virtual int AftData::compare ( const AftData aData) const
inlinevirtual

Compare data.

Parameters
[in]aDataReference to data to compare against
Returns
Zero if data is the same

Reimplemented in AftDataEtherAddr, AftDataIP6Addr, AftDataIP4Addr, AftDataPrefix, AftDataString, and AftDataInt.

virtual const std::string AftData::dataClass ( ) const
inlinevirtual
Returns
String description of data type

Reimplemented in AftDataLabel, AftDataEtherAddr, AftDataIP6Addr, AftDataIP4Addr, AftDataPrefix, AftDataString, and AftDataInt.

virtual std::ostream& AftData::description ( std::ostream &  os) const
inlinevirtual

Append a description of the data to an output stream.

Parameters
[in]osReference to output stream to append description to
Returns
Reference to output stream with text description of data appended

Reimplemented in AftDataLabel, AftDataEtherAddr, AftDataIP6Addr, AftDataIP4Addr, AftDataPrefix, AftDataString, and AftDataInt.

bool AftData::operator== ( const AftData aData) const
inline

Comparator for data.

Parameters
[in]aDataReference to data to compare against
void AftData::setBitLength ( uint32_t  newBitLength)
inlineprotected

Set the bitlength of the data.

Parameters
[in]bitLengthValue to set the bitlength to

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const AftData aData 
)
friend

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

Parameters
[in]osReference to output stream to append to
[in]aDataReference to data object to append description of to stream

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