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

Data class for byte-array prefixes. More...

#include <AftData.h>

Inheritance diagram for AftDataPrefix:
AftData

Public Types

typedef std::shared_ptr
< AftDataPrefix
Ptr
 Pointer type for all AftData prefixes.
 

Public Member Functions

 AftDataPrefix (AftDataBytes newData, uint32_t newBitLength)
 Constructor for generic byte buffer data. More...
 
 AftDataPrefix (uint8_t *newData, uint32_t newBitLength)
 Constructor for generic byte buffer data. More...
 
const AftDataBytesdata () const
 
const uint8_t * dataArray () const
 
virtual uint32_t append (AftDataBytes &aData)
 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...
 
- Public Member Functions inherited from AftData
 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...
 

Static Public Member Functions

static AftDataPrefix::Ptr create ()
 Factory generator for zero length prefix.
 
static AftDataPrefix::Ptr create (AftDataBytes newData, uint32_t newBitLength)
 Factory generator for generic byte buffer data. More...
 
static AftDataPrefix::Ptr create (uint8_t *newData, uint32_t newBitLength)
 Factory generator for generic byte buffer data. More...
 

Protected Attributes

AftDataBytes _data
 Byte vector of prefix.
 
- Protected Attributes inherited from AftData
uint32_t _bitLength
 Size of encapsulated data in bits.
 

Additional Inherited Members

- Protected Member Functions inherited from AftData
void setBitLength (uint32_t newBitLength)
 Set the bitlength of the data. More...
 

Detailed Description

Data class for byte-array prefixes.

Constructor & Destructor Documentation

AftDataPrefix::AftDataPrefix ( AftDataBytes  newData,
uint32_t  newBitLength 
)
inline

Constructor for generic byte buffer data.

Parameters
[in]newDataVector of bytes to repesent as data
[in]newBitLengthLength in bits of data
AftDataPrefix::AftDataPrefix ( uint8_t *  newData,
uint32_t  newBitLength 
)
inline

Constructor for generic byte buffer data.

Parameters
[in]newDataPointer to uint8_t data to represent as data
[in]newBitLengthLength in bits of data

Member Function Documentation

virtual uint32_t AftDataPrefix::append ( AftDataBytes newData)
inlinevirtual

Append contents of data object to AftDataBytes vector.

Parameters
[in]dataReference to AftDataBytes vector to append to

Reimplemented from AftData.

virtual int AftDataPrefix::compare ( const AftData aData) const
inlinevirtual

Compare data.

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

Reimplemented from AftData.

static AftDataPrefix::Ptr AftDataPrefix::create ( AftDataBytes  newData,
uint32_t  newBitLength 
)
inlinestatic

Factory generator for generic byte buffer data.

Parameters
[in]newDataVector of bytes to repesent as data
[in]newBitLengthLength in bits of data
static AftDataPrefix::Ptr AftDataPrefix::create ( uint8_t *  newData,
uint32_t  newBitLength 
)
inlinestatic

Factory generator for generic byte buffer data.

Parameters
[in]newDataPointer to uint8_t data to represent as data
[in]newBitLengthLength in bits of data
const AftDataBytes& AftDataPrefix::data ( ) const
inline
Returns
Reference to uint8_t based data vector
const uint8_t* AftDataPrefix::dataArray ( ) const
inline
Returns
Reference to base of prefix as uint8_t pointer
virtual const std::string AftDataPrefix::dataClass ( ) const
inlinevirtual
Returns
String description of data type

Reimplemented from AftData.

virtual std::ostream& AftDataPrefix::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 from AftData.


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