#include <balber_berdecoder.h>
This class contains the parameterized decode functions that decode data (in BER format) from an incoming stream into bdlat types.
See balber_berdecoder
◆ ErrorSeverity
| Enumerator |
|---|
| e_BER_SUCCESS | |
| e_BER_ERROR | |
| BDEM_BER_SUCCESS | |
| BDEM_BER_ERROR | |
◆ BerDecoder()
Construct a decoder object. Optionally specify decoder options. If options is 0, BerDecoderOptions() is used. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.
◆ ~BerDecoder()
| balber::BerDecoder::~BerDecoder |
( |
| ) |
|
Destroy this object. This destruction has no effect on objects pointed-to by the pointers provided at construction.
◆ decode() [1/2]
template<typename TYPE >
| int balber::BerDecoder::decode |
( |
bsl::istream & |
stream, |
|
|
TYPE * |
variable |
|
) |
| |
|
inline |
Decode an object of parameterized TYPE from the specified stream and load the result into the specified modifiable variable. Return 0 on success, and a non-zero value otherwise. If the decoding fails stream will be invalidated.
◆ decode() [2/2]
template<typename TYPE >
| int balber::BerDecoder::decode |
( |
bsl::streambuf * |
streamBuf, |
|
|
TYPE * |
variable |
|
) |
| |
Decode an object of parameterized TYPE from the specified streamBuf and load the result into the specified variable. Return 0 on success, and a non-zero value otherwise.
◆ decodeAny() [1/4]
| int balber::BerDecoder::decodeAny |
( |
bsl::istream & |
stream, |
|
|
bdlar::AnyRef * |
variable |
|
) |
| |
◆ decodeAny() [2/4]
template<typename TYPE >
| int balber::BerDecoder::decodeAny |
( |
bsl::istream & |
stream, |
|
|
TYPE * |
variable |
|
) |
| |
|
inline |
Decode an object of parameterized TYPE from the specified stream and load the result into the specified modifiable variable. Return 0 on success, and a non-zero value otherwise. If the decoding fails stream will be invalidated.
- Note
- Note that this function behaves identically to
decode, but does not instantiate any templates at compile time at the expense of being slightly slower at runtime; see the balber package documentation for more details.
◆ decodeAny() [3/4]
| int balber::BerDecoder::decodeAny |
( |
bsl::streambuf * |
streamBuf, |
|
|
bdlar::AnyRef * |
variable |
|
) |
| |
◆ decodeAny() [4/4]
template<typename TYPE >
| int balber::BerDecoder::decodeAny |
( |
bsl::streambuf * |
streamBuf, |
|
|
TYPE * |
variable |
|
) |
| |
|
inline |
Decode an object of parameterized TYPE from the specified streamBuf and load the result into the specified variable. Return 0 on success, and a non-zero value otherwise.
- Note
- Note that this function behaves identically to
decode, but does not instantiate any templates at compile time at the expense of being slightly slower at runtime; see the balber package documentation for more details.
◆ decoderOptions()
Return the address of the BER decoder options.
◆ errorSeverity()
Return the severity of the most severe log or error message encountered during the last call to the decode method. The severity is reset each time decode is called.
◆ loggedMessages()
Return a string containing any error or trace messages that were logged during the last call to the decode method. The log is reset each time decode is called.
◆ maxDepthExceeded()
| bool balber::BerDecoder::maxDepthExceeded |
( |
| ) |
const |
|
inline |
Return 'true' if the maximum depth level is exceeded and 'false' otherwise.
◆ numUnknownElementsSkipped()
| int balber::BerDecoder::numUnknownElementsSkipped |
( |
| ) |
const |
|
inline |
Return the number of unknown elements that were skipped during the previous decoding operation.
- Note
- Note that unknown elements are skipped only if
true == options()->skipUnknownElements().
◆ setNumUnknownElementsSkipped()
| void balber::BerDecoder::setNumUnknownElementsSkipped |
( |
int |
value | ) |
|
|
inline |
Set the number of unknown elements skipped by the decoder during the current decoding operation to the specified value.
- Precondition
- The behavior is undefined unless
0 <= value.
◆ BerDecoder_Node
The documentation for this class was generated from the following file: