BDE 4.14.0 Production release
Loading...
Searching...
No Matches
balber::BerDecoderOptions Class Reference

#include <balber_berdecoderoptions.h>

Public Types

enum  { k_NUM_ATTRIBUTES = 5 , NUM_ATTRIBUTES = k_NUM_ATTRIBUTES }
 
enum  {
  e_ATTRIBUTE_INDEX_MAX_DEPTH = 0 , e_ATTRIBUTE_INDEX_SKIP_UNKNOWN_ELEMENTS = 1 , e_ATTRIBUTE_INDEX_TRACE_LEVEL = 2 , e_ATTRIBUTE_INDEX_MAX_SEQUENCE_SIZE = 3 ,
  e_ATTRIBUTE_INDEX_DEFAULT_EMPTY_STRINGS = 4 , ATTRIBUTE_INDEX_MAX_DEPTH , ATTRIBUTE_INDEX_SKIP_UNKNOWN_ELEMENTS , ATTRIBUTE_INDEX_TRACE_LEVEL ,
  ATTRIBUTE_INDEX_MAX_SEQUENCE_SIZE , ATTRIBUTE_INDEX_DEFAULT_EMPTY_STRINGS
}
 
enum  {
  e_ATTRIBUTE_ID_MAX_DEPTH = 0 , e_ATTRIBUTE_ID_SKIP_UNKNOWN_ELEMENTS = 1 , e_ATTRIBUTE_ID_TRACE_LEVEL = 2 , e_ATTRIBUTE_ID_MAX_SEQUENCE_SIZE = 3 ,
  e_ATTRIBUTE_ID_DEFAULT_EMPTY_STRINGS = 4 , ATTRIBUTE_ID_MAX_DEPTH = e_ATTRIBUTE_ID_MAX_DEPTH , ATTRIBUTE_ID_SKIP_UNKNOWN_ELEMENTS , ATTRIBUTE_ID_TRACE_LEVEL = e_ATTRIBUTE_ID_TRACE_LEVEL ,
  ATTRIBUTE_ID_MAX_SEQUENCE_SIZE = e_ATTRIBUTE_ID_MAX_SEQUENCE_SIZE , ATTRIBUTE_ID_DEFAULT_EMPTY_STRINGS
}
 

Public Member Functions

 BerDecoderOptions ()
 
 BerDecoderOptions (const BerDecoderOptions &original)=default
 
 ~BerDecoderOptions ()=default
 Destroy this object.
 
BerDecoderOptionsoperator= (const BerDecoderOptions &rhs)=default
 Assign to this object the value of the specified 'rhs' object.
 
template<class STREAM >
STREAM & bdexStreamIn (STREAM &stream, int version)
 
void reset ()
 
template<class MANIPULATOR >
int manipulateAttributes (MANIPULATOR &manipulator)
 
template<class MANIPULATOR >
int manipulateAttribute (MANIPULATOR &manipulator, int id)
 
template<class MANIPULATOR >
int manipulateAttribute (MANIPULATOR &manipulator, const char *name, int nameLength)
 
void setMaxDepth (int value)
 
void setSkipUnknownElements (bool value)
 
void setTraceLevel (int value)
 
void setMaxSequenceSize (int value)
 
void setDefaultEmptyStrings (bool value)
 
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
 
template<class STREAM >
STREAM & bdexStreamOut (STREAM &stream, int version) const
 
template<class ACCESSOR >
int accessAttributes (ACCESSOR &accessor) const
 
template<class ACCESSOR >
int accessAttribute (ACCESSOR &accessor, int id) const
 
template<class ACCESSOR >
int accessAttribute (ACCESSOR &accessor, const char *name, int nameLength) const
 
const int & maxDepth () const
 
const bool & skipUnknownElements () const
 
const int & traceLevel () const
 
const int & maxSequenceSize () const
 
const bool & defaultEmptyStrings () const
 

Static Public Member Functions

static int maxSupportedBdexVersion (int versionSelector)
 
static int maxSupportedBdexVersion ()
 
static const bdlat_AttributeInfolookupAttributeInfo (int id)
 
static const bdlat_AttributeInfolookupAttributeInfo (const char *name, int nameLength)
 

Static Public Attributes

static const char CLASS_NAME []
 the name of this class (i.e., "BerDecoderOptions")
 
static const int DEFAULT_MAX_DEPTH
 default value of MaxDepth attribute
 
static const bool DEFAULT_SKIP_UNKNOWN_ELEMENTS
 default value of SkipUnknownElements attribute
 
static const int DEFAULT_TRACE_LEVEL
 default value of TraceLevel attribute
 
static const int DEFAULT_MAX_SEQUENCE_SIZE
 default value of MaxSequenceSize attribute
 
static const bool DEFAULT_DEFAULT_EMPTY_STRINGS
 default value of DefaultEmptyStrings attribute
 
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY []
 attribute information for each attribute
 

Detailed Description

BER decoding options

See balber_berdecoderoptions

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
k_NUM_ATTRIBUTES 
NUM_ATTRIBUTES 

◆ anonymous enum

anonymous enum
Enumerator
e_ATTRIBUTE_INDEX_MAX_DEPTH 

index for "MaxDepth" attribute

e_ATTRIBUTE_INDEX_SKIP_UNKNOWN_ELEMENTS 
e_ATTRIBUTE_INDEX_TRACE_LEVEL 
e_ATTRIBUTE_INDEX_MAX_SEQUENCE_SIZE 
e_ATTRIBUTE_INDEX_DEFAULT_EMPTY_STRINGS 
ATTRIBUTE_INDEX_MAX_DEPTH 
ATTRIBUTE_INDEX_SKIP_UNKNOWN_ELEMENTS 
ATTRIBUTE_INDEX_TRACE_LEVEL 
ATTRIBUTE_INDEX_MAX_SEQUENCE_SIZE 
ATTRIBUTE_INDEX_DEFAULT_EMPTY_STRINGS 

◆ anonymous enum

anonymous enum
Enumerator
e_ATTRIBUTE_ID_MAX_DEPTH 

id for MaxDepth attribute

e_ATTRIBUTE_ID_SKIP_UNKNOWN_ELEMENTS 
e_ATTRIBUTE_ID_TRACE_LEVEL 
e_ATTRIBUTE_ID_MAX_SEQUENCE_SIZE 
e_ATTRIBUTE_ID_DEFAULT_EMPTY_STRINGS 
ATTRIBUTE_ID_MAX_DEPTH 
ATTRIBUTE_ID_SKIP_UNKNOWN_ELEMENTS 
ATTRIBUTE_ID_TRACE_LEVEL 
ATTRIBUTE_ID_MAX_SEQUENCE_SIZE 
ATTRIBUTE_ID_DEFAULT_EMPTY_STRINGS 

Constructor & Destructor Documentation

◆ BerDecoderOptions() [1/2]

balber::BerDecoderOptions::BerDecoderOptions ( )
inline

Create an object of type BerDecoderOptions having the default value.

◆ BerDecoderOptions() [2/2]

balber::BerDecoderOptions::BerDecoderOptions ( const BerDecoderOptions original)
default

Create a 'BderDecoderOptons' object having the same value as the specified 'original'.

◆ ~BerDecoderOptions()

balber::BerDecoderOptions::~BerDecoderOptions ( )
default

Member Function Documentation

◆ accessAttribute() [1/2]

template<class ACCESSOR >
int balber::BerDecoderOptions::accessAttribute ( ACCESSOR &  accessor,
const char *  name,
int  nameLength 
) const
inline

Invoke the specified accessor on the (non-modifiable) attribute of this object indicated by the specified name of the specified nameLength, supplying accessor with the corresponding attribute information structure. Return the value returned from the invocation of accessor if name identifies an attribute of this class, and -1 otherwise.

◆ accessAttribute() [2/2]

template<class ACCESSOR >
int balber::BerDecoderOptions::accessAttribute ( ACCESSOR &  accessor,
int  id 
) const
inline

Invoke the specified accessor on the (non-modifiable) attribute of this object indicated by the specified id, supplying accessor with the corresponding attribute information structure. Return the value returned from the invocation of accessor if id identifies an attribute of this class, and -1 otherwise.

◆ accessAttributes()

template<class ACCESSOR >
int balber::BerDecoderOptions::accessAttributes ( ACCESSOR &  accessor) const
inline

Invoke the specified accessor sequentially on each (non-modifiable) attribute of this object, supplying accessor with the corresponding attribute information structure until such invocation returns a non-zero value. Return the value from the last invocation of accessor (i.e., the invocation that terminated the sequence).

◆ bdexStreamIn()

template<class STREAM >
STREAM & balber::BerDecoderOptions::bdexStreamIn ( STREAM &  stream,
int  version 
)
inline

Assign to this object the value read from the specified input stream using the specified version format, and return a reference to stream. If stream is initially invalid, this operation has no effect. If version is not supported, this object is unaltered and stream is invalidated, but otherwise unmodified. If version is supported but stream becomes invalid during this operation, this object has an undefined, but valid, state. Note that no version is read from stream. See the bslx package-level documentation for more information on BDEX streaming of value-semantic types and containers.

◆ bdexStreamOut()

template<class STREAM >
STREAM & balber::BerDecoderOptions::bdexStreamOut ( STREAM &  stream,
int  version 
) const
inline

Write the value of this object, using the specified version format, to the specified output stream, and return a reference to stream. If stream is initially invalid, this operation has no effect. If version is not supported, stream is invalidated, but otherwise unmodified. Note that version is not written to stream. See the bslx package-level documentation for more information on BDEX streaming of value-semantic types and containers.

◆ defaultEmptyStrings()

const bool & balber::BerDecoderOptions::defaultEmptyStrings ( ) const
inline

Return a reference to the non-modifiable "DefaultEmptyStrings" attribute of this object.

◆ lookupAttributeInfo() [1/2]

static const bdlat_AttributeInfo * balber::BerDecoderOptions::lookupAttributeInfo ( const char *  name,
int  nameLength 
)
static

Return attribute information for the attribute indicated by the specified name of the specified nameLength if the attribute exists, and 0 otherwise.

◆ lookupAttributeInfo() [2/2]

static const bdlat_AttributeInfo * balber::BerDecoderOptions::lookupAttributeInfo ( int  id)
static

Return attribute information for the attribute indicated by the specified id if the attribute exists, and 0 otherwise.

◆ manipulateAttribute() [1/2]

template<class MANIPULATOR >
int balber::BerDecoderOptions::manipulateAttribute ( MANIPULATOR &  manipulator,
const char *  name,
int  nameLength 
)
inline

Invoke the specified manipulator on the address of the (modifiable) attribute indicated by the specified name of the specified nameLength, supplying manipulator with the corresponding attribute information structure. Return the value returned from the invocation of manipulator if name identifies an attribute of this class, and -1 otherwise.

◆ manipulateAttribute() [2/2]

template<class MANIPULATOR >
int balber::BerDecoderOptions::manipulateAttribute ( MANIPULATOR &  manipulator,
int  id 
)
inline

Invoke the specified manipulator on the address of the (modifiable) attribute indicated by the specified id, supplying manipulator with the corresponding attribute information structure. Return the value returned from the invocation of manipulator if id identifies an attribute of this class, and -1 otherwise.

◆ manipulateAttributes()

template<class MANIPULATOR >
int balber::BerDecoderOptions::manipulateAttributes ( MANIPULATOR &  manipulator)
inline

Invoke the specified manipulator sequentially on the address of each (modifiable) attribute of this object, supplying manipulator with the corresponding attribute information structure until such invocation returns a non-zero value. Return the value from the last invocation of manipulator (i.e., the invocation that terminated the sequence).

◆ maxDepth()

const int & balber::BerDecoderOptions::maxDepth ( ) const
inline

Return a reference to the non-modifiable "MaxDepth" attribute of this object.

◆ maxSequenceSize()

const int & balber::BerDecoderOptions::maxSequenceSize ( ) const
inline

Return a reference to the non-modifiable "MaxSequenceSize" attribute of this object.

◆ maxSupportedBdexVersion() [1/2]

int balber::BerDecoderOptions::maxSupportedBdexVersion ( )
inlinestatic

Return the most current BDEX streaming version number supported by this class. See the bslx package-level documentation for more information on BDEX streaming of value-semantic types and containers.

◆ maxSupportedBdexVersion() [2/2]

int balber::BerDecoderOptions::maxSupportedBdexVersion ( int  versionSelector)
inlinestatic

Return the maximum valid BDEX format version, as indicated by the specified versionSelector, to be passed to the bdexStreamOut method. Note that it is highly recommended that versionSelector be formatted as "YYYYMMDD", a date representation. Also note that versionSelector should be a compile-time-chosen value that selects a format version supported by both externalizer and unexternalizer. See the bslx package-level documentation for more information on BDEX streaming of value-semantic types and containers.

◆ operator=()

BerDecoderOptions & balber::BerDecoderOptions::operator= ( const BerDecoderOptions rhs)
default

◆ print()

bsl::ostream & balber::BerDecoderOptions::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const

Format this object to the specified output stream at the optionally specified indentation level and return a reference to the modifiable stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. Each line is indented by the absolute value of level * spacesPerLevel. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, suppress line breaks and format the entire output on one line. If stream is initially invalid, this operation has no effect. Note that a trailing newline is provided in multiline mode only.

◆ reset()

void balber::BerDecoderOptions::reset ( )
inline

Reset this object to the default value (i.e., its value upon default construction).

◆ setDefaultEmptyStrings()

void balber::BerDecoderOptions::setDefaultEmptyStrings ( bool  value)
inline

Set the DefaultEmptyStrings attribute of this object to the specified value.

◆ setMaxDepth()

void balber::BerDecoderOptions::setMaxDepth ( int  value)
inline

Set the MaxDepth attribute of this object to the specified value.

◆ setMaxSequenceSize()

void balber::BerDecoderOptions::setMaxSequenceSize ( int  value)
inline

Set the MaxSequenceSize attribute of this object to the specified value.

◆ setSkipUnknownElements()

void balber::BerDecoderOptions::setSkipUnknownElements ( bool  value)
inline

Set the SkipUnknownElements attribute of this object to the specified value.

◆ setTraceLevel()

void balber::BerDecoderOptions::setTraceLevel ( int  value)
inline

Set the TraceLevel attribute of this object to the specified value.

◆ skipUnknownElements()

const bool & balber::BerDecoderOptions::skipUnknownElements ( ) const
inline

Return a reference to the non-modifiable "SkipUnknownElements" attribute of this object.

◆ traceLevel()

const int & balber::BerDecoderOptions::traceLevel ( ) const
inline

Return a reference to the non-modifiable "TraceLevel" attribute of this object.

Member Data Documentation

◆ ATTRIBUTE_INFO_ARRAY

const bdlat_AttributeInfo balber::BerDecoderOptions::ATTRIBUTE_INFO_ARRAY[]
static

◆ CLASS_NAME

const char balber::BerDecoderOptions::CLASS_NAME[]
static

◆ DEFAULT_DEFAULT_EMPTY_STRINGS

const bool balber::BerDecoderOptions::DEFAULT_DEFAULT_EMPTY_STRINGS
static

◆ DEFAULT_MAX_DEPTH

const int balber::BerDecoderOptions::DEFAULT_MAX_DEPTH
static

◆ DEFAULT_MAX_SEQUENCE_SIZE

const int balber::BerDecoderOptions::DEFAULT_MAX_SEQUENCE_SIZE
static

◆ DEFAULT_SKIP_UNKNOWN_ELEMENTS

const bool balber::BerDecoderOptions::DEFAULT_SKIP_UNKNOWN_ELEMENTS
static

◆ DEFAULT_TRACE_LEVEL

const int balber::BerDecoderOptions::DEFAULT_TRACE_LEVEL
static

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