Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes

balber::BerEncoderOptions Class Reference

#include <balber_berencoderoptions.h>

List of all members.

Public Types

enum  {
  ATTRIBUTE_ID_TRACE_LEVEL = 0, ATTRIBUTE_ID_BDE_VERSION_CONFORMANCE = 1, ATTRIBUTE_ID_ENCODE_EMPTY_ARRAYS = 2, ATTRIBUTE_ID_ENCODE_DATE_AND_TIME_TYPES_AS_BINARY = 3,
  ATTRIBUTE_ID_DATETIME_FRACTIONAL_SECOND_PRECISION = 4, ATTRIBUTE_ID_DISABLE_UNSELECTED_CHOICE_ENCODING = 5, ATTRIBUTE_ID_PRESERVE_SIGN_OF_NEGATIVE_ZERO = 6
}
enum  { NUM_ATTRIBUTES = 7 }
enum  {
  ATTRIBUTE_INDEX_TRACE_LEVEL = 0, ATTRIBUTE_INDEX_BDE_VERSION_CONFORMANCE = 1, ATTRIBUTE_INDEX_ENCODE_EMPTY_ARRAYS = 2, ATTRIBUTE_INDEX_ENCODE_DATE_AND_TIME_TYPES_AS_BINARY = 3,
  ATTRIBUTE_INDEX_DATETIME_FRACTIONAL_SECOND_PRECISION = 4, ATTRIBUTE_INDEX_DISABLE_UNSELECTED_CHOICE_ENCODING = 5, ATTRIBUTE_INDEX_PRESERVE_SIGN_OF_NEGATIVE_ZERO = 6
}

Public Member Functions

 BerEncoderOptions ()
 BerEncoderOptions (const BerEncoderOptions &original)
 ~BerEncoderOptions ()
BerEncoderOptionsoperator= (const BerEncoderOptions &rhs)
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 setTraceLevel (int value)
int & bdeVersionConformance ()
void setEncodeEmptyArrays (bool value)
void setEncodeDateAndTimeTypesAsBinary (bool value)
void setDatetimeFractionalSecondPrecision (int value)
void setDisableUnselectedChoiceEncoding (bool value)
void setPreserveSignOfNegativeZero (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
int traceLevel () const
int bdeVersionConformance () const
bool encodeEmptyArrays () const
bool encodeDateAndTimeTypesAsBinary () const
int datetimeFractionalSecondPrecision () const
bool disableUnselectedChoiceEncoding () const
bool preserveSignOfNegativeZero () const

Static Public Member Functions

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 []
static const int DEFAULT_INITIALIZER_TRACE_LEVEL
static const int DEFAULT_INITIALIZER_BDE_VERSION_CONFORMANCE
static const bool DEFAULT_INITIALIZER_ENCODE_EMPTY_ARRAYS
static const bool DEFAULT_INITIALIZER_ENCODE_DATE_AND_TIME_TYPES_AS_BINARY
static const int DEFAULT_INITIALIZER_DATETIME_FRACTIONAL_SECOND_PRECISION
static const bool DEFAULT_INITIALIZER_DISABLE_UNSELECTED_CHOICE_ENCODING
static const bool DEFAULT_INITIALIZER_PRESERVE_SIGN_OF_NEGATIVE_ZERO
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY []

Detailed Description

BER encoding options

See Component balber_berencoderoptions


Member Enumeration Documentation

anonymous enum
Enumerator:
ATTRIBUTE_ID_TRACE_LEVEL 
ATTRIBUTE_ID_BDE_VERSION_CONFORMANCE 
ATTRIBUTE_ID_ENCODE_EMPTY_ARRAYS 
ATTRIBUTE_ID_ENCODE_DATE_AND_TIME_TYPES_AS_BINARY 
ATTRIBUTE_ID_DATETIME_FRACTIONAL_SECOND_PRECISION 
ATTRIBUTE_ID_DISABLE_UNSELECTED_CHOICE_ENCODING 
ATTRIBUTE_ID_PRESERVE_SIGN_OF_NEGATIVE_ZERO 
anonymous enum
Enumerator:
NUM_ATTRIBUTES 
anonymous enum
Enumerator:
ATTRIBUTE_INDEX_TRACE_LEVEL 
ATTRIBUTE_INDEX_BDE_VERSION_CONFORMANCE 
ATTRIBUTE_INDEX_ENCODE_EMPTY_ARRAYS 
ATTRIBUTE_INDEX_ENCODE_DATE_AND_TIME_TYPES_AS_BINARY 
ATTRIBUTE_INDEX_DATETIME_FRACTIONAL_SECOND_PRECISION 
ATTRIBUTE_INDEX_DISABLE_UNSELECTED_CHOICE_ENCODING 
ATTRIBUTE_INDEX_PRESERVE_SIGN_OF_NEGATIVE_ZERO 

Constructor & Destructor Documentation

balber::BerEncoderOptions::BerEncoderOptions (  ) 

Create an object of type BerEncoderOptions having the default value.

balber::BerEncoderOptions::BerEncoderOptions ( const BerEncoderOptions original  ) 

Create an object of type BerEncoderOptions having the value of the specified original object.

balber::BerEncoderOptions::~BerEncoderOptions (  ) 

Destroy this object.


Member Function Documentation

static int balber::BerEncoderOptions::maxSupportedBdexVersion (  )  [static]

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.

static const bdlat_AttributeInfo* balber::BerEncoderOptions::lookupAttributeInfo ( int  id  )  [static]

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

static const bdlat_AttributeInfo* balber::BerEncoderOptions::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.

BerEncoderOptions& balber::BerEncoderOptions::operator= ( const BerEncoderOptions rhs  ) 

Assign to this object the value of the specified rhs object.

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

Assign to this object the value read from the specified input stream using the specified version format and return a reference to the modifiable stream. If stream is initially invalid, this operation has no effect. If stream becomes invalid during this operation, this object is valid, but its value is undefined. If version is not supported, stream is marked invalid and this object is unaltered. 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.

void balber::BerEncoderOptions::reset (  ) 

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

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

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

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

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.

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

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.

void balber::BerEncoderOptions::setTraceLevel ( int  value  ) 

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

int& balber::BerEncoderOptions::bdeVersionConformance (  ) 

Return a reference to the modifiable "BdeVersionConformance" attribute of this object.

void balber::BerEncoderOptions::setEncodeEmptyArrays ( bool  value  ) 

Set the "EncodeEmptyArrays" attribute of this object to the specified value.

void balber::BerEncoderOptions::setEncodeDateAndTimeTypesAsBinary ( bool  value  ) 

Set the "EncodeDateAndTimeTypesAsBinary" attribute of this object to the specified value.

void balber::BerEncoderOptions::setDatetimeFractionalSecondPrecision ( int  value  ) 

Set the "DatetimeFractionalSecondPrecision" attribute of this object to the specified value.

void balber::BerEncoderOptions::setDisableUnselectedChoiceEncoding ( bool  value  ) 

Set the "DisableUnselectedChoiceEncoding" attribute of this object to the specified value.

void balber::BerEncoderOptions::setPreserveSignOfNegativeZero ( bool  value  ) 

Set the "PreserveSignOfNegativeZero" attribute of this object to the specified value.

bsl::ostream& balber::BerEncoderOptions::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.

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

Write the value of this object to the specified output stream using the specified version format and return a reference to the modifiable stream. If version is not supported, stream is 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.

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

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

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

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.

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

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.

int balber::BerEncoderOptions::traceLevel (  )  const

Return the value of the "TraceLevel" attribute of this object.

int balber::BerEncoderOptions::bdeVersionConformance (  )  const

Return the value of the "BdeVersionConformance" attribute of this object.

bool balber::BerEncoderOptions::encodeEmptyArrays (  )  const

Return the value of the "EncodeEmptyArrays" attribute of this object.

bool balber::BerEncoderOptions::encodeDateAndTimeTypesAsBinary (  )  const

Return the value of the "EncodeDateAndTimeTypesAsBinary" attribute of this object.

int balber::BerEncoderOptions::datetimeFractionalSecondPrecision (  )  const

Return the value of the "DatetimeFractionalSecondPrecision" attribute of this object.

bool balber::BerEncoderOptions::disableUnselectedChoiceEncoding (  )  const

Return the value of the "DisableUnselectedChoiceEncoding" attribute of this object.

bool balber::BerEncoderOptions::preserveSignOfNegativeZero (  )  const

Return the value of the "PreserveSignOfNegativeZero" attribute of this object.


Member Data Documentation


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