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

#include <balber_beruniversaltagnumber.h>

Public Types

enum  Value {
  e_BER_INVALID = -1 , e_BER_BOOL = 0x01 , e_BER_INT = 0x02 , e_BER_OCTET_STRING = 0x04 ,
  e_BER_REAL = 0x09 , e_BER_ENUMERATION = 0x0A , e_BER_UTF8_STRING = 0x0C , e_BER_SEQUENCE = 0x10 ,
  e_BER_VISIBLE_STRING = 0x1A , BDEM_BER_INVALID = e_BER_INVALID , BDEM_BER_BOOL = e_BER_BOOL , BDEM_BER_INT = e_BER_INT ,
  BDEM_BER_OCTET_STRING = e_BER_OCTET_STRING , BDEM_BER_REAL = e_BER_REAL , BDEM_BER_ENUMERATION = e_BER_ENUMERATION , BDEM_BER_UTF8_STRING = e_BER_UTF8_STRING ,
  BDEM_BER_SEQUENCE = e_BER_SEQUENCE , BDEM_BER_VISIBLE_STRING = e_BER_VISIBLE_STRING
}
 
enum  { k_LENGTH = 8 , BDEM_LENGTH = k_LENGTH , NUM_ENUMERATORS = k_LENGTH }
 

Static Public Member Functions

static const char * toString (Value value)
 
static int fromString (Value *result, const char *string, int stringLength)
 
static int fromInt (Value *result, int number)
 
static bsl::ostream & print (bsl::ostream &stream, Value value)
 
template<typename TYPE >
static Value select (const TYPE &object, int formattingMode, int *alternateTag)
 
template<typename TYPE >
static Value select (const TYPE &object, int formattingMode, const BerEncoderOptions *options)
 

Detailed Description

This struct contains an enumeration of the universal tag numbers for BER encoding.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
k_LENGTH 
BDEM_LENGTH 
NUM_ENUMERATORS 

◆ Value

Enumerator
e_BER_INVALID 
e_BER_BOOL 
e_BER_INT 
e_BER_OCTET_STRING 
e_BER_REAL 
e_BER_ENUMERATION 
e_BER_UTF8_STRING 
e_BER_SEQUENCE 
e_BER_VISIBLE_STRING 
BDEM_BER_INVALID 
BDEM_BER_BOOL 
BDEM_BER_INT 
BDEM_BER_OCTET_STRING 
BDEM_BER_REAL 
BDEM_BER_ENUMERATION 
BDEM_BER_UTF8_STRING 
BDEM_BER_SEQUENCE 
BDEM_BER_VISIBLE_STRING 

Member Function Documentation

◆ fromInt()

int balber::BerUniversalTagNumber::fromInt ( BerUniversalTagNumber::Value result,
int  number 
)
inlinestatic

Load into the specified result the enumerator matching the specified number. Return 0 on success, and a non-zero value with no effect on result otherwise (i.e., number does not match any enumerator).

◆ fromString()

static int balber::BerUniversalTagNumber::fromString ( Value result,
const char *  string,
int  stringLength 
)
static

Load into the specified result the enumerator matching the specified string of the specified stringLength. Return 0 on success, and a non-zero value with no effect on result otherwise (i.e., string does not match any enumerator).

◆ print()

bsl::ostream & balber::BerUniversalTagNumber::print ( bsl::ostream &  stream,
BerUniversalTagNumber::Value  value 
)
inlinestatic

Write to the specified stream the string representation of the specified enumeration value. Return a reference to the modifiable stream.

◆ select() [1/2]

template<typename TYPE >
BerUniversalTagNumber::Value balber::BerUniversalTagNumber::select ( const TYPE &  object,
int  formattingMode,
const BerEncoderOptions options 
)
inlinestatic

Return the universal tag number for the specified object with the specified formattingMode using the specified options. The behavior is undefined if the type category of object and the formattingMode do not permit a universal tag number (see {DESCRIPTION} for allowed type categories and formatting modes).

◆ select() [2/2]

template<typename TYPE >
BerUniversalTagNumber::Value balber::BerUniversalTagNumber::select ( const TYPE &  object,
int  formattingMode,
int *  alternateTag 
)
inlinestatic

Return the universal tag number for the specified object using the specified formattingMode, and load into the specified alternateTag any alternative tag numbers corresponding to object. The behavior is undefined if the type category of object and the formattingMode does not permit a universal tag number (see {DESCRIPTION} for allowed type categories and formatting modes). Note that if an alternate tag number does not exist for object then alternateTag is not modified.

◆ toString()

static const char * balber::BerUniversalTagNumber::toString ( Value  value)
static

Return the string representation exactly matching the enumerator name corresponding to the specified enumeration value.


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