|
Quick Links: |
#include <bmqt_compressionalgorithmtype.h>
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 |
This struct defines various types of compression algorithms.
See Component bmqt_compressionalgorithmtype
| 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:
bsl::cout << CompressionAlgorithmType::toAscii( CompressionAlgorithmType::e_NONE);
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:
CompressionAlgorithmType::fromAscii(out, NONE);
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.
const int bmqt::CompressionAlgorithmType::k_LOWEST_SUPPORTED_TYPE = e_NONE [static] |
const int bmqt::CompressionAlgorithmType::k_HIGHEST_SUPPORTED_TYPE = e_ZLIB [static] |
1.7.1