AgentXcpp  Revision:0.2
Internals Documentation
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Pages
agentxcpp::Counter64Value Class Reference

Represents an Counter64 as descibed in RFC 2741. More...

#include <Counter64Value.hpp>

Inheritance diagram for agentxcpp::Counter64Value:
Collaboration diagram for agentxcpp::Counter64Value:

Public Member Functions

 Counter64Value ()
 Create a counter without initialization.
 Counter64Value (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian=true)
 Parse Constructor.
virtual binary serialize () const
 Encode the object as described in RFC 2741, section 5.4.
- Public Member Functions inherited from agentxcpp::AbstractValue
virtual ~AbstractValue ()
 Destructor.

Public Attributes

uint64_t value
 The counter value.

Detailed Description

Represents an Counter64 as descibed in RFC 2741.

Definition at line 35 of file Counter64Value.hpp.

Constructor & Destructor Documentation

agentxcpp::Counter64Value::Counter64Value ( )
inline

Create a counter without initialization.

The value after creation is undefined.

Definition at line 53 of file Counter64Value.hpp.

Counter64Value::Counter64Value ( binary::const_iterator &  pos,
const binary::const_iterator &  end,
bool  big_endian = true 
)

Parse Constructor.

This constructor parses the serialized form of the object. It takes an iterator, starts parsing at the position of the iterator and advances the iterator to the position right behind the object.

The constructor expects valid data from the stream; if parsing fails, parse_error is thrown. In this case, the iterator position is undefined.

Parameters
posIterator pointing to the current stream position. The iterator is advanced while reading the header.
endIterator pointing one element past the end of the current stream. This is needed to mark the end of the buffer.
big_endianWhether the input stream is in big endian format

Definition at line 39 of file Counter64Value.cpp.

References agentxcpp::read64(), and value.

Member Function Documentation

binary Counter64Value::serialize ( ) const
virtual

Encode the object as described in RFC 2741, section 5.4.

This function uses big endian.

Implements agentxcpp::AbstractValue.

Definition at line 28 of file Counter64Value.cpp.

References value, and agentxcpp::write64().

Member Data Documentation

uint64_t agentxcpp::Counter64Value::value

The counter value.

According to RFC 2578, Counter64 is a non-negative 64-bit number.

Definition at line 44 of file Counter64Value.hpp.

Referenced by Counter64Value(), and serialize().


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