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
AftDataString Class Reference

Data class for strings. More...

#include <AftData.h>

Inheritance diagram for AftDataString:
AftData

Public Types

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

Public Member Functions

 AftDataString (const std::string &newString)
 Constructor for string data. More...
 
const std::string & data () 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 AftDataString::Ptr create ()
 Factory generator for zero length prefix.
 
static AftDataString::Ptr create (const std::string &newString)
 Factory generator for string data. More...
 

Protected Attributes

std::string _data
 String data.
 
- 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 strings.

Constructor & Destructor Documentation

AftDataString::AftDataString ( const std::string &  newString)
inline

Constructor for string data.

Parameters
[in]newStringReference to string to use for data

Member Function Documentation

virtual uint32_t AftDataString::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 AftDataString::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 AftDataString::Ptr AftDataString::create ( const std::string &  newString)
inlinestatic

Factory generator for string data.

Parameters
[in]newStringReference to string to use for data
const std::string& AftDataString::data ( ) const
inline
Returns
Reference to uint8_t based data vector
const uint8_t* AftDataString::dataArray ( ) const
inline
Returns
Reference to base of prefix as uint8_t pointer
virtual const std::string AftDataString::dataClass ( ) const
inlinevirtual
Returns
String description of data type

Reimplemented from AftData.

virtual std::ostream& AftDataString::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: