Quick Links:

bal | bbl | bdl | bsl

Public Types | Static Public Member Functions

balber::BerUniversalTagNumber Struct Reference

#include <balber_beruniversaltagnumber.h>

List of all members.

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.

See Component balber_beruniversaltagnumber


Member Enumeration Documentation

Enumerator:
e_BER_INVALID 

Universal tag numbers as per X.680 section 8.

e_BER_BOOL 

( 1) Boolean type

e_BER_INT 

( 2) Integer type

e_BER_OCTET_STRING 

( 4) Octet string type

e_BER_REAL 

( 9) Real type

e_BER_ENUMERATION 

(10) Enumerated type

e_BER_UTF8_STRING 

(12) UTF8 string type

e_BER_SEQUENCE 

(16) Sequence and Sequence-of types

e_BER_VISIBLE_STRING 

(26) VisibleString type (7-bit ASCII)

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 
anonymous enum
Enumerator:
k_LENGTH 

the number of enumerations in the Value enumeration

BDEM_LENGTH 
NUM_ENUMERATORS 

Member Function Documentation

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

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

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).

static int balber::BerUniversalTagNumber::fromInt ( Value result,
int  number 
) [static]

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).

static bsl::ostream& balber::BerUniversalTagNumber::print ( bsl::ostream &  stream,
Value  value 
) [static]

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

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

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.

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

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).


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