Provide an enumeration of the set of possible base 64 alphabets.
More...
Namespaces |
namespace | bdlde |
Detailed Description
- Outline
-
-
- Purpose:
- Provide an enumeration of the set of possible base 64 alphabets.
-
- Classes:
-
- See also:
- bdlde_base64encorderoptions, bdlde_base64decorderoptions, Component bdlde_base64encoder, Component bdlde_base64decoder
-
- Description:
- This component provides a namespace for the
enum
type bdlde::Base64Alphabet::Enum
, which enumerates the set of possible alphabets.
-
- Enumerators:
Name Description
--------------- ---------------------------------------------------
e_BASIC standard base64 alphabet
e_URL URL-safe base64 alphabet
-
- Usage:
- In this section we show intended use of this component.
-
- Example 1:
- The following snippets of code provide a simple illustration of
bdlde::Base64Alphabet
usage.
- First, we create variable of type
bdlde::Base64Alphabet::Enum
and initialize it with the enumerator values: Next, we store a pointer to their ASCII representation in variables of type const char *
: Now, we stream some Enum
s to ostream
s: Finally, we observe the output of the streaming: assert(ossBasic.str() == "BASIC");
assert(ossUrl.str() == "URL");
assert(ossBasic.str() == asciiBasic);
assert(ossUrl.str() == asciiUrl);