Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends

balb::CustomInt Class Reference

#include <balb_testmessages.h>

List of all members.

Public Types

typedef int BaseType

Public Member Functions

 CustomInt ()
 CustomInt (const CustomInt &original)
 CustomInt (const int &value)
 ~CustomInt ()
CustomIntoperator= (const CustomInt &rhs)
template<class STREAM >
STREAM & bdexStreamIn (STREAM &stream, int version)
void reset ()
int fromInt (const int &value)
template<class STREAM >
STREAM & bdexStreamOut (STREAM &stream, int version) const
int maxSupportedBdexVersion () const
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
const int & toInt () const

Static Public Member Functions

static int checkRestrictions (const int &value)

Static Public Attributes

static const char CLASS_NAME []

Friends

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

Member Typedef Documentation


Constructor & Destructor Documentation

balb::CustomInt::CustomInt (  ) 

Create an object of type CustomInt having the default value.

balb::CustomInt::CustomInt ( const CustomInt original  ) 

Create an object of type CustomInt having the value of the specified original object.

balb::CustomInt::CustomInt ( const int &  value  )  [explicit]

Create an object of type CustomInt having the specified value.

balb::CustomInt::~CustomInt (  ) 

Destroy this object.


Member Function Documentation

CustomInt& balb::CustomInt::operator= ( const CustomInt rhs  ) 

Assign to this object the value of the specified rhs object.

template<class STREAM >
STREAM& balb::CustomInt::bdexStreamIn ( STREAM &  stream,
int  version 
)

Assign to this object the value read from the specified input stream using the specified version format and return a reference to the modifiable stream. If stream is initially invalid, this operation has no effect. If stream becomes invalid during this operation, this object is valid, but its value is undefined. If version is not supported, stream is marked invalid and this object is unaltered. Note that no version is read from stream. See the bslx package-level documentation for more information on bdex streaming of value-semantic types and containers.

void balb::CustomInt::reset (  ) 

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

int balb::CustomInt::fromInt ( const int &  value  ) 

Convert from the specified value to this type. Return 0 if successful and non-zero otherwise.

template<class STREAM >
STREAM& balb::CustomInt::bdexStreamOut ( STREAM &  stream,
int  version 
) const

Write the value of this object to the specified output stream using the specified version format and return a reference to the modifiable stream. If version is not supported, stream is unmodified. Note that version is not written to stream. See the bslx package-level documentation for more information on bdex streaming of value-semantic types and containers.

int balb::CustomInt::maxSupportedBdexVersion (  )  const

Return the most current bdex streaming version number supported by this class. See the bslx package-level documentation for more information on bdex streaming of value-semantic types and containers.

bsl::ostream& balb::CustomInt::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.

const int& balb::CustomInt::toInt (  )  const

Convert this value to int.

static int balb::CustomInt::checkRestrictions ( const int &  value  )  [static]

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


Friends And Related Function Documentation

bool operator== ( const CustomInt lhs,
const CustomInt 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.

bool operator!= ( const CustomInt lhs,
const CustomInt 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.


Member Data Documentation

const char balb::CustomInt::CLASS_NAME[] [static]

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