BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlde::Base64EncoderOptions Class Reference

#include <bdlde_base64encoderoptions.h>

Public Types

enum  { k_MIME_MAX_LINE_LENGTH = 76 }
 

Public Member Functions

 Base64EncoderOptions (const Base64EncoderOptions &)=default
 Default copy constructor.
 
 ~Base64EncoderOptions ()=default
 Destroy this object.
 
Base64EncoderOptionsoperator= (const Base64EncoderOptions &)=default
 Default operator=().
 
void setAlphabet (Base64Alphabet::Enum value)
 
void setIsPadded (bool value)
 Set the isPadded attribute to the specified value.
 
void setMaxLineLength (int value)
 
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
 
Base64Alphabet::Enum alphabet () const
 Return the value of the alphabet attribute.
 
bool isPadded () const
 Return the value of the isPadded attribute.
 
int maxLineLength () const
 Return the value of the maxLineLength attribute.
 

Static Public Member Functions

static Base64EncoderOptions custom (int maxLineLength, Base64Alphabet::Enum alphabet, bool padded)
 
static Base64EncoderOptions mime ()
 
static Base64EncoderOptions standard (bool padded=true)
 
static Base64EncoderOptions urlSafe (bool padded=false)
 

Detailed Description

This class stores the configuration of a Base64Encoder.

See bdlde_base64encoderoptions

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
k_MIME_MAX_LINE_LENGTH 

Constructor & Destructor Documentation

◆ Base64EncoderOptions()

bdlde::Base64EncoderOptions::Base64EncoderOptions ( const Base64EncoderOptions )
default

◆ ~Base64EncoderOptions()

bdlde::Base64EncoderOptions::~Base64EncoderOptions ( )
default

Member Function Documentation

◆ alphabet()

Base64Alphabet::Enum bdlde::Base64EncoderOptions::alphabet ( ) const
inline

◆ custom()

Base64EncoderOptions bdlde::Base64EncoderOptions::custom ( int  maxLineLength,
Base64Alphabet::Enum  alphabet,
bool  padded 
)
inlinestatic

Return a Base64EncoderOptions object having the specified maxLineLength, alphabet, andisPadded' attribute values. The behavior is unless 0 <= maxLineLength and 'alphabet is a defined value of Base64Alphabet::Enum.

◆ isPadded()

bool bdlde::Base64EncoderOptions::isPadded ( ) const
inline

◆ maxLineLength()

int bdlde::Base64EncoderOptions::maxLineLength ( ) const
inline

◆ mime()

Base64EncoderOptions bdlde::Base64EncoderOptions::mime ( )
inlinestatic

Return a Base64EncoderOptions object having the attributes maxLineLength == 76, alphabet == Base64Alphabet::e_BASIC, and isPadded == true. This conforms to RFC 2045.

◆ operator=()

Base64EncoderOptions & bdlde::Base64EncoderOptions::operator= ( const Base64EncoderOptions )
default

◆ print()

bsl::ostream & bdlde::Base64EncoderOptions::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.

◆ setAlphabet()

void bdlde::Base64EncoderOptions::setAlphabet ( Base64Alphabet::Enum  value)
inline

Set the alphabet attribute to the specified value. The behavior is undefined unless value is either e_BASIC or e_UTL.

◆ setIsPadded()

void bdlde::Base64EncoderOptions::setIsPadded ( bool  value)
inline

◆ setMaxLineLength()

void bdlde::Base64EncoderOptions::setMaxLineLength ( int  value)
inline

Set the maxLineLength attribute to the specified value. The behavior is undefined unless 0 <= value.

◆ standard()

Base64EncoderOptions bdlde::Base64EncoderOptions::standard ( bool  padded = true)
inlinestatic

Return a Base64EncoderOptions object having the attributes maxLineLength == 0, alphabet == Base64Alphabet::e_BASIC, and isPadded == false. If padded is not specified, it defaults to true. This conforms to RFC 4648 section 4.

◆ urlSafe()

Base64EncoderOptions bdlde::Base64EncoderOptions::urlSafe ( bool  padded = false)
inlinestatic

Return a Base64EncoderOptions object having the attributes maxLineLength == 0, alphabet == Base64Alphabet::e_URL, and the specified padded. If padded is not specified, it defaults to false. This conforms to RFC 4648 section 5.


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