ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Member Functions | Protected Member Functions | List of all members
anna::diameter::codec::basetypes::OctetString Class Reference

#include <OctetString.hpp>

Inheritance diagram for anna::diameter::codec::basetypes::OctetString:
Inheritance graph
[legend]
Collaboration diagram for anna::diameter::codec::basetypes::OctetString:
Collaboration graph
[legend]

Public Member Functions

virtual ~OctetString ()
 
const std::string & getValue () const
 
void setValue (const std::string &value)
 
virtual std::string getFormatName () const
 
virtual int getSize () const
 
void decode (const char *buffer, const int size) noexcept(false)
 
- Public Member Functions inherited from anna::diameter::codec::basetypes::AvpData
 AvpData ()
 
void code (char *buffer, int &size) noexcept(false)
 
virtual std::string asPrintableString () noexcept(false)
 
std::string asDataBlockString () noexcept(false)
 
virtual std::string asString () noexcept(false)
 
std::string asHexString () noexcept(false)
 
void fromPrintableString (const char *printableString) noexcept(false)
 
void fromHexString (const std::string &hexString) noexcept(false)
 

Protected Member Functions

void assertPrintable () const noexcept(false)
 
- Protected Member Functions inherited from anna::diameter::codec::basetypes::AvpData
std::string assertPrintable (const char *buffer, const int size) const noexcept(false)
 

Detailed Description

Diameter OctetString container

Constructor & Destructor Documentation

◆ ~OctetString()

virtual anna::diameter::codec::basetypes::OctetString::~OctetString ( )
inlinevirtual
45 {;}

Member Function Documentation

◆ assertPrintable()

void anna::diameter::codec::basetypes::OctetString::assertPrintable ( ) const
protectednoexcept

◆ decode()

void anna::diameter::codec::basetypes::OctetString::decode ( const char *  buffer,
const int  size 
)
virtualnoexcept

Decodes provided buffer/size

Derived types must invoke base class 'decode()' at the end in order to keep coherence with parent members. This base class decodification actually sets the base class members with the same buffer provided, being more comfortable than using base class setters.

Parameters
bufferRaw avp data
sizeRaw avp data length

Implements anna::diameter::codec::basetypes::AvpData.

Reimplemented in anna::diameter::codec::basetypes::Time, anna::diameter::helpers::tme::codectypes::Unsigned16, anna::diameter::helpers::tme::codectypes::ISDNNumber, anna::diameter::helpers::tme::codectypes::ISDNAddress, anna::diameter::codec::basetypes::QoSFilterRule, and anna::diameter::codec::basetypes::UTF8String.

◆ getFormatName()

virtual std::string anna::diameter::codec::basetypes::OctetString::getFormatName ( ) const
inlinevirtual

◆ getSize()

virtual int anna::diameter::codec::basetypes::OctetString::getSize ( ) const
inlinevirtual

Gets the avp data size based on basic container. The AVP Data field is zero or more octets.

Returns
avp data size

Implements anna::diameter::codec::basetypes::AvpData.

69 { return a_value.size(); }
Here is the call graph for this function:

◆ getValue()

const std::string& anna::diameter::codec::basetypes::OctetString::getValue ( ) const
inline

Gets the OctetString value

Returns
OctetString value
54 { return a_value; }

◆ setValue()

void anna::diameter::codec::basetypes::OctetString::setValue ( const std::string &  value)
inline

Sets the OctetString value

Parameters
valueOctetString value
61 { a_value = value; }

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