Quick Links:

bmqa | bmqpi | bmqt

Public Types | Static Public Member Functions | Static Public Attributes

bmqt::CompressionAlgorithmType Struct Reference

#include <bmqt_compressionalgorithmtype.h>

List of all members.

Public Types

enum  Enum { e_UNKNOWN = -1, e_NONE = 0, e_ZLIB = 1 }

Static Public Member Functions

static bsl::ostream & print (bsl::ostream &stream, CompressionAlgorithmType::Enum value, int level=0, int spacesPerLevel=4)
static const char * toAscii (CompressionAlgorithmType::Enum value)
static bool fromAscii (CompressionAlgorithmType::Enum *out, const bsl::string &str)
static bool isValid (const bsl::string *str, bsl::ostream &stream)

Static Public Attributes

static const int k_LOWEST_SUPPORTED_TYPE = e_NONE
static const int k_HIGHEST_SUPPORTED_TYPE = e_ZLIB

Detailed Description

This struct defines various types of compression algorithms.

See Component bmqt_compressionalgorithmtype


Member Enumeration Documentation

Enumerator:
e_UNKNOWN 
e_NONE 
e_ZLIB 

Member Function Documentation

static bsl::ostream& bmqt::CompressionAlgorithmType::print ( bsl::ostream &  stream,
CompressionAlgorithmType::Enum  value,
int  level = 0,
int  spacesPerLevel = 4 
) [static]

Write the string representation of the specified enumeration value to the specified output stream, and return a reference to stream. Optionally specify an initial indentation level, whose absolute value is incremented recursively for nested objects. If level is specified, optionally specify spacesPerLevel, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). See toAscii for what constitutes the string representation of a CompressionAlgorithmType::Enum value.

static const char* bmqt::CompressionAlgorithmType::toAscii ( CompressionAlgorithmType::Enum  value  )  [static]

Return the non-modifiable string representation corresponding to the specified enumeration value, if it exists, and a unique (error) string otherwise. The string representation of value matches its corresponding enumerator name with the "e_" prefix eluded. For example:

will print the following on standard output:

          NONE

Note that specifying a value that does not match any of the enumerators will result in a string representation that is distinct from any of those corresponding to the enumerators, but is otherwise unspecified.

static bool bmqt::CompressionAlgorithmType::fromAscii ( CompressionAlgorithmType::Enum out,
const bsl::string &  str 
) [static]

Update the specified out with correct enum corresponding to the specified string str, if it exists, and return true. Otherwise in case of an error or unidentified string, return false. The expected str is the enumerator name with the "e_" prefix excluded. For example:

will return true and the value of out will be:

          bmqt::CompresssionAlgorithmType::e_NONE

Note that specifying a str that does not match any of the enumerators excluding "e_" prefix will result in the function returning false and the specified out will not be touched.

static bool bmqt::CompressionAlgorithmType::isValid ( const bsl::string *  str,
bsl::ostream &  stream 
) [static]

Return true incase of valid specified str i.e. a enumerator name with the "e_" prefix excluded. Otherwise in case of invalid str return false and populate the specified stream with error message.


Member Data Documentation


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