Classes | Public Member Functions | Static Public Attributes | Private Attributes | Friends
karto::Any Class Reference

#include <Any.h>

List of all members.

Classes

class  Holder
class  PlaceHolder

Public Member Functions

 Any ()
template<typename T >
 Any (const T &rValue)
 Any (const Any &rOther)
const std::type_info & GetType () const
kt_bool IsEmpty () const
template<typename T >
Anyoperator= (const T &rOther)
Anyoperator= (const Any &rOther)
AnySwap (Any &rOther)
 ~Any ()

Static Public Attributes

static const Any Empty

Private Attributes

PlaceHolderm_pContent

Friends

template<typename T >
Tany_cast (Any *)

Detailed Description

The Any class can hold instances of any type that satisfies ValueType requirements.

Definition at line 55 of file Any.h.


Constructor & Destructor Documentation

karto::Any::Any ( ) [inline]

Default constructor

Definition at line 61 of file Any.h.

template<typename T >
karto::Any::Any ( const T rValue) [inline]

Makes a copy of value, so that the initial content of the new instance is equivalent in both type and value to value.

Parameters:
rValue

Definition at line 72 of file Any.h.

karto::Any::Any ( const Any rOther) [inline]

Copy constructor that copies content of other into new instance, so that any content is equivalent in both type and value to the content of other, or empty if other is empty.

Parameters:
rOther

Definition at line 83 of file Any.h.

karto::Any::~Any ( ) [inline]

Releases any and all resources used in management of instance.

Definition at line 91 of file Any.h.


Member Function Documentation

const std::type_info& karto::Any::GetType ( ) const [inline]

Gets the typeid of the contained value if instance is non-empty, otherwise typeid(void).

Definition at line 140 of file Any.h.

kt_bool karto::Any::IsEmpty ( ) const [inline]

Checks if instance is empty.

Returns:
true if instance is empty, otherwise false

Definition at line 132 of file Any.h.

template<typename T >
Any& karto::Any::operator= ( const T rOther) [inline]

Assignment operator.

Definition at line 112 of file Any.h.

Any& karto::Any::operator= ( const Any rOther) [inline]

Assignment operator.

Definition at line 121 of file Any.h.

Any& karto::Any::Swap ( Any rOther) [inline]

Exchange of the contents of *this and rOther.

Parameters:
rOtherother Any
Returns:
this Any swapped with rOther

Definition at line 102 of file Any.h.


Friends And Related Function Documentation

template<typename T >
T* any_cast ( Any pAny) [friend]

Cast for extracting a value of a given type from an Any

Parameters:
pAnyAny value to cast
Returns:
a qualified pointer to the value content if successful, otherwise NULL is returned

Definition at line 206 of file Any.h.


Member Data Documentation

const Any karto::Any::Empty [static]

Empty Any

Definition at line 191 of file Any.h.

Definition at line 197 of file Any.h.


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


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Sun Apr 2 2017 04:05:24