BloombergLP::bdlde::Base64Decoder::convert

convert overloads

Synopses

Declared in <bdlde_base64decoder.h>

Decode Base64 characters from [begin, end)] into out.

template<
    class OUTPUT_ITERATOR,
    class INPUT_ITERATOR>
int
convert(
    OUTPUT_ITERATOR out,
    INPUT_ITERATOR begin,
    INPUT_ITERATOR end);
» more...

Decode Base64 characters from [begin, end)] into out with limits.

template<
    class OUTPUT_ITERATOR,
    class INPUT_ITERATOR>
int
convert(
    OUTPUT_ITERATOR out,
    int* numOut,
    int* numIn,
    INPUT_ITERATOR begin,
    INPUT_ITERATOR end,
    int maxNumOut = -1);
» more...

Decode Base64 input for char * / const char * iterators.

template<>
int
convert<char*, char const*>(
    char* out,
    int* numOut,
    int* numIn,
    char const* begin,
    char const* end,
    int maxNumOut = -1);
» more...

Decode Base64 input for unsigned char * iterators.

template<>
int
convert<unsigned char*, unsigned char const*>(
    unsigned char* out,
    int* numOut,
    int* numIn,
    unsigned char const* begin,
    unsigned char const* end,
    int maxNumOut = -1);
» more...

Return Value

  • non-negative value on success, -1 on input error, and -2 if endConvert has already been called without an intervening resetState
  • non-negative value on success (positive count of retained output bytes if maxNumOut was reached), -1 on input error, and -2 if endConvert has already been called without an intervening resetState

Parameters

NameDescription
outdestination for decoded output bytes
beginbeginning of the Base64 input range
endend of the Base64 input range (exclusive)
numOutif non-null, receives the number of bytes written
numInif non-null, receives the number of input bytes consumed
maxNumOutmaximum bytes to write; negative means no limit