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

#include <Integer64.hpp>

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

Public Member Functions

virtual ~Integer64 ()
 
const S64getValue () const
 
void setValue (const S64 &value)
 
virtual std::string getFormatName () const
 
virtual int getSize () const
 
std::string asPrintableString () noexcept(false)
 
std::string asString () noexcept(false)
 
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)
 
std::string asDataBlockString () noexcept(false)
 
std::string asHexString () noexcept(false)
 
void fromPrintableString (const char *printableString) noexcept(false)
 
void fromHexString (const std::string &hexString) noexcept(false)
 

Additional Inherited Members

- 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 Integer64 container

Constructor & Destructor Documentation

◆ ~Integer64()

virtual anna::diameter::codec::basetypes::Integer64::~Integer64 ( )
inlinevirtual
43 {;}

Member Function Documentation

◆ asPrintableString()

std::string anna::diameter::codec::basetypes::Integer64::asPrintableString ( )
inlinevirtualnoexcept

Gets the natural/smart string representation for avp data (format-dependent content) Used in diameter message 'data' field Default implementation launch exception when data is not printable

Returns
Natural/smart string representation for avp data

Reimplemented from anna::diameter::codec::basetypes::AvpData.

72  {
73  return anna::functions::asString((anna::S64)a_value);
74  }
int64_t S64
Definition: defines.hpp:84
static std::string asString(const int number)
Here is the call graph for this function:

◆ asString()

std::string anna::diameter::codec::basetypes::Integer64::asString ( void  )
inlinevirtualnoexcept

Class string representation Default implementation invokes raw DataBlock 'asString' method, but it should be different specially with complex application data types.

Returns
String with class content

Reimplemented from anna::diameter::codec::basetypes::AvpData.

76  {
77  return asPrintableString();
78  }
std::string asPrintableString() noexcept(false)
Definition: Integer64.hpp:72
Here is the call graph for this function:

◆ decode()

void anna::diameter::codec::basetypes::Integer64::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.

◆ getFormatName()

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

Gets the avp data format name

Returns
avp data format name

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

66 { return "Integer64"; }

◆ getSize()

virtual int anna::diameter::codec::basetypes::Integer64::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.

67 { return 8; }

◆ getValue()

const S64& anna::diameter::codec::basetypes::Integer64::getValue ( ) const
inline

Gets the Integer64 value

Returns
Integer64 value
52 { return a_value; }

◆ setValue()

void anna::diameter::codec::basetypes::Integer64::setValue ( const S64 value)
inline

Sets the Integer64 value

Parameters
valueInteger64 value
59 { a_value = value; }

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