Represents an Integer as descibed in RFC 2741. More...
#include <Integer.hpp>
Public Member Functions | |
| Integer (uint32_t _value) | |
| Create an Integer object. | |
| uint32_t | get_value () |
| Get the value. | |
| void | set_value (uint32_t v) |
| Set the value. | |
| virtual data_t | serialize () const |
| Encode the object as described in RFC 2741, section 5.4. | |
| Integer (data_t::const_iterator &pos, const data_t::const_iterator &end, bool big_endian=true) | |
| Construct the object from input stream. | |
Protected Attributes | |
| uint32_t | value |
| The Integer value. | |
Private Member Functions | |
| Integer () | |
| hide default constructor | |
Represents an Integer as descibed in RFC 2741.
Definition at line 32 of file Integer.hpp.
| agentxcpp::Integer::Integer | ( | uint32_t | _value | ) | [inline] |
Create an Integer object.
Definition at line 44 of file Integer.hpp.
| Integer::Integer | ( | data_t::const_iterator & | pos, |
| const data_t::const_iterator & | end, | ||
| bool | big_endian = true |
||
| ) |
Construct the object from input stream.
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.
| pos | Iterator pointing to the current stream position. The iterator is advanced while reading the header. |
| end | Iterator pointing one element past the end of the current stream. This is needed to mark the end of the buffer. |
| big_endian | Whether the input stream is in big endian format |
Definition at line 38 of file Integer.cpp.
References value.
| agentxcpp::Integer::Integer | ( | ) | [private] |
hide default constructor
| uint32_t agentxcpp::Integer::get_value | ( | ) | [inline] |
| data_t Integer::serialize | ( | ) | const [virtual] |
Encode the object as described in RFC 2741, section 5.4.
This function uses big endian.
Implements variable.
Definition at line 24 of file Integer.cpp.
References value.
| void agentxcpp::Integer::set_value | ( | uint32_t | v | ) | [inline] |
uint32_t agentxcpp::Integer::value [protected] |
The Integer value.
Definition at line 38 of file Integer.hpp.
Referenced by get_value(), Integer(), serialize(), and set_value().