Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bdld::DatumUdt Class Reference

#include <bdld_datumudt.h>

List of all members.

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (DatumUdt, bsl::is_trivially_copyable)
 BSLMF_NESTED_TRAIT_DECLARATION (DatumUdt, bdlb::HasPrintMethod)
 DatumUdt (void *data, int type)
 DatumUdt (const DatumUdt &origin)
 ~DatumUdt ()
DatumUdtoperator= (const DatumUdt &rhs)
void * data () const
int type () const
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const

Detailed Description

This class provides a type to represent a pointer to an object of some user-defined type and an integer value denoting what actual type is represented.

See Component bdld_datumudt


Constructor & Destructor Documentation

bdld::DatumUdt::DatumUdt ( void *  data,
int  type 
)

Create a DatumUdt object having the specified data and type. Note that the pointer to the data is just copied bitwise. Also note that the memory pointed by data is never accessed by a DatumUdt object.

bdld::DatumUdt::DatumUdt ( const DatumUdt origin  ) 
bdld::DatumUdt::~DatumUdt (  ) 

Member Function Documentation

bdld::DatumUdt::BSLMF_NESTED_TRAIT_DECLARATION ( DatumUdt  ,
bsl::is_trivially_copyable   
)
bdld::DatumUdt::BSLMF_NESTED_TRAIT_DECLARATION ( DatumUdt  ,
bdlb::HasPrintMethod   
)
DatumUdt& bdld::DatumUdt::operator= ( const DatumUdt rhs  ) 
void* bdld::DatumUdt::data (  )  const

Return the pointer to the user-defined object.

int bdld::DatumUdt::type (  )  const

Return the type of the user-defined object.

bsl::ostream& bdld::DatumUdt::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const

Write the value of this object to the specified output stream in a human-readable format, and return a reference to the modifyable stream. Optionally specify an initial indentation level, whose absolute value is incremented recursively for nested objects. If level is specified, optionally specify spacesPerLevel, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect. Note that this human-readable format is not fully specified, and can change without notice.


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