BDE 4.14.0 Production release
Loading...
Searching...
No Matches
s_baltst::CustomizedString Class Reference

#include <s_baltst_customizedstring.h>

Public Types

typedef bsl::string BaseType
 

Public Member Functions

 CustomizedString (bslma::Allocator *basicAllocator=0)
 
 CustomizedString (const CustomizedString &original, bslma::Allocator *basicAllocator=0)
 
 CustomizedString (const bsl::string &value, bslma::Allocator *basicAllocator=0)
 
 ~CustomizedString ()
 Destroy this object.
 
CustomizedStringoperator= (const CustomizedString &rhs)
 Assign to this object the value of the specified rhs object.
 
void reset ()
 
int fromString (const bsl::string &value)
 
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
 
const bsl::stringtoString () const
 Convert this value to bsl::string.
 

Static Public Member Functions

static int checkRestrictions (const bsl::string &value)
 

Static Public Attributes

static const char CLASS_NAME []
 

Friends

bool operator== (const CustomizedString &lhs, const CustomizedString &rhs)
 
bool operator!= (const CustomizedString &lhs, const CustomizedString &rhs)
 

Member Typedef Documentation

◆ BaseType

Constructor & Destructor Documentation

◆ CustomizedString() [1/3]

s_baltst::CustomizedString::CustomizedString ( bslma::Allocator basicAllocator = 0)
inlineexplicit

Create an object of type CustomizedString having the default value. Use the optionally specified basicAllocator to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

◆ CustomizedString() [2/3]

s_baltst::CustomizedString::CustomizedString ( const CustomizedString original,
bslma::Allocator basicAllocator = 0 
)
inline

Create an object of type CustomizedString having the value of the specified original object. Use the optionally specified basicAllocator to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

◆ CustomizedString() [3/3]

s_baltst::CustomizedString::CustomizedString ( const bsl::string value,
bslma::Allocator basicAllocator = 0 
)
inlineexplicit

Create an object of type CustomizedString having the specified value. Use the optionally specified basicAllocator to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

◆ ~CustomizedString()

s_baltst::CustomizedString::~CustomizedString ( )
inline

Member Function Documentation

◆ checkRestrictions()

static int s_baltst::CustomizedString::checkRestrictions ( const bsl::string value)
static

Check if the specified value satisfies the restrictions of this class (i.e., "CustomizedString"). Return 0 if successful (i.e., the restrictions are satisfied) and non-zero otherwise.

◆ fromString()

int s_baltst::CustomizedString::fromString ( const bsl::string value)
inline

Convert from the specified value to this type. Return 0 if successful and non-zero otherwise. Note that, if value is an invalid UTF-8 string and "CustomizedString" has length restrictions, this function will fail and keep the underlying string unchanged.

◆ operator=()

CustomizedString & s_baltst::CustomizedString::operator= ( const CustomizedString rhs)
inline

◆ print()

bsl::ostream & s_baltst::CustomizedString::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const
inline

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.

◆ reset()

void s_baltst::CustomizedString::reset ( )
inline

Reset this object to the default value (i.e., its value upon default construction).

◆ toString()

const bsl::string & s_baltst::CustomizedString::toString ( ) const
inline

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const CustomizedString lhs,
const CustomizedString rhs 
)
friend

Return true if the specified lhs and rhs attribute objects do not have the same value, and false otherwise. Two attribute objects do not have the same value if one or more respective attributes differ in values.

◆ operator==

bool operator== ( const CustomizedString lhs,
const CustomizedString rhs 
)
friend

Return true if the specified lhs and rhs attribute objects have the same value, and false otherwise. Two attribute objects have the same value if each respective attribute has the same value.

Member Data Documentation

◆ CLASS_NAME

const char s_baltst::CustomizedString::CLASS_NAME[]
static

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