BDE 4.14.0 Production release
Loading...
Searching...
No Matches
balber::BerUtil_CharacterImpUtil Struct Reference

#include <balber_berutil.h>

Public Types

typedef BerUtil_IntegerImpUtil IntegerUtil
 
typedef BerUtil_LengthImpUtil LengthUtil
 

Static Public Member Functions

static int getCharValue (char *value, bsl::streambuf *streamBuf, int length)
 
static int getSignedCharValue (signed char *value, bsl::streambuf *streamBuf, int length)
 
static int getUnsignedCharValue (unsigned char *value, bsl::streambuf *streamBuf, int length)
 
static int putCharValue (bsl::streambuf *streamBuf, char value)
 
static int putSignedCharValue (bsl::streambuf *streamBuf, signed char value)
 
static int putUnsignedCharValue (bsl::streambuf *streamBuf, unsigned char value)
 

Detailed Description

This component-private utility struct provides a namespace for a suite of functions used by BerUtil to implement BER encoding and decoding operations for byte values. Within the definition of this struct:

: the specification: : Refers to the August 2015 revision of the ITU-T Recommendation X.690.

Member Typedef Documentation

◆ IntegerUtil

IntegerUtil is an alias to a namespace for a suite of functions used to implement BER encoding and decoding operations for integer values.

◆ LengthUtil

LengthUtil is an alias to a namespace for a suite of functions used to implement BER encoding and decoding operations for length quantities.

Member Function Documentation

◆ getCharValue()

int balber::BerUtil_CharacterImpUtil::getCharValue ( char *  value,
bsl::streambuf *  streamBuf,
int  length 
)
inlinestatic

Read the specified length number of bytes from the input sequence of the specified streamBuf and load to the specified value the interpretation of those bytes as the value of the contents octets of a BER-encoded integer according to the specification. Return 0 if successful, and a non-zero value otherwise. The operation succeeds if length bytes are successfully read from the input sequence of the streamBuf without the read position becoming unavailable, and the bytes read contain a valid representation of the contents octets of an integer value according to the specification. Note that the signedness of the interpreted integer value is the same as the signedness of char according to the current platform.

◆ getSignedCharValue()

int balber::BerUtil_CharacterImpUtil::getSignedCharValue ( signed char *  value,
bsl::streambuf *  streamBuf,
int  length 
)
inlinestatic

Read the specified length number of bytes from the input sequence of the specified streamBuf and load to the specified value the interpretation of those bytes as the value of the contents octets of a BER-encoded integer according to the specification. Return 0 if successful, and a non-zero value otherwise. The operation succeeds if length bytes are successfully read from the input sequence of the streamBuf without the read position becoming unavailable, and the bytes read contain a valid representation of the contents octets of an integer value according to the specification.

◆ getUnsignedCharValue()

int balber::BerUtil_CharacterImpUtil::getUnsignedCharValue ( unsigned char *  value,
bsl::streambuf *  streamBuf,
int  length 
)
inlinestatic

Read the specified length number of bytes from the input sequence of the specified streamBuf and load to the specified value the interpretation of those bytes as the value of the contents octets of a BER-encoded integer according to the specification. Return 0 if successful, and a non-zero value otherwise. The operation succeeds if length bytes are successfully read from the input sequence of the streamBuf without the read position becoming unavailable, and the bytes read contain a valid representation of the contents octets of an integer value according to the specification.

◆ putCharValue()

int balber::BerUtil_CharacterImpUtil::putCharValue ( bsl::streambuf *  streamBuf,
char  value 
)
inlinestatic

Write the length and contents octets of the BER encoding of the specified integer value (as defined in the specification) to the output sequence of the specified streamBuf. Return 0 if successful, and a non-zero value otherwise. The operation succeeds if all bytes corresponding to the length and contents octets are written to the streamBuf without the write position becoming unavailable.

◆ putSignedCharValue()

int balber::BerUtil_CharacterImpUtil::putSignedCharValue ( bsl::streambuf *  streamBuf,
signed char  value 
)
inlinestatic

Write the length and contents octets of the BER encoding of the specified integer value (as defined in the specification) to the output sequence of the specified streamBuf. Return 0 if successful, and a non-zero value otherwise. The operation succeeds if all bytes corresponding to the length and contents octets are written to the streamBuf without the write position becoming unavailable.

◆ putUnsignedCharValue()

int balber::BerUtil_CharacterImpUtil::putUnsignedCharValue ( bsl::streambuf *  streamBuf,
unsigned char  value 
)
inlinestatic

Write the length and contents octets of the BER encoding of the specified integer value (as defined in the specification) to the output sequence of the specified streamBuf. Return 0 if successful, and a non-zero value otherwise. The operation succeeds if all bytes corresponding to the length and contents octets are written to the streamBuf without the write position becoming unavailable.


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