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

Represents an Opaque object as described in RFC 2741, section 5.4. More...

#include <OpaqueValue.hpp>

Inheritance diagram for agentxcpp::OpaqueValue:
Collaboration diagram for agentxcpp::OpaqueValue:

Public Member Functions

binary serialize () const
 Encode the object as described in RFC 2741, section 5.4 / 5.3.
 OpaqueValue (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian=true)
 Parse Constructor.
 OpaqueValue (binary initial_value)
 Constructor for initializing with data.
- Public Member Functions inherited from agentxcpp::AbstractValue
virtual ~AbstractValue ()
 Destructor.

Public Attributes

binary value
 The string.

Detailed Description

Represents an Opaque object as described in RFC 2741, section 5.4.

This class represent binary data.

Note
There are no functions to convert the binary data to/from std::string. If that is needed, OctetStringValue might be a better choice.

Definition at line 37 of file OpaqueValue.hpp.

Constructor & Destructor Documentation

OpaqueValue::OpaqueValue ( 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 49 of file OpaqueValue.cpp.

References value.

agentxcpp::OpaqueValue::OpaqueValue ( binary  initial_value)
inline

Constructor for initializing with data.

Definition at line 89 of file OpaqueValue.hpp.

Member Function Documentation

binary OpaqueValue::serialize ( ) const
virtual

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

Note: We always use big endian.

Implements agentxcpp::AbstractValue.

Definition at line 24 of file OpaqueValue.cpp.

References value.

Member Data Documentation

binary agentxcpp::OpaqueValue::value

The string.

According to RFC 2578, Opaque is used to wrap any ASN.1-type.

Definition at line 45 of file OpaqueValue.hpp.

Referenced by OpaqueValue(), and serialize().


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