Información general
Ejemplos
Pantallas
Comparaciones
Aplicaciones
Descargar
Documentation
"El Mercado"
Estado y Plan de trabajo
Preguntas más frecuentes
Autores y Licencia
Foros
Financiación de U++
Busca en esta página
Idioma
español













SourceForge.net Logo



Esta página aún no ha sido traducida. ¿Quieres traducirla?

 

Any

 

class Any : private Moveable<Any>

Any is a special type of container capable of containing none or single element of any type. It also provides methods for querying the type stored and retrieving the content of specific type.

Any has pick semantics.

 

 

Constructor Detail

 

Any()

Constructs an empty Any.

 


 

Any(pick_ Any& s)

Pick constructor. Transfers content of source Any s while destroying its content by picking..

 


 

~Any()

Default destructor.

 

 

Public Method List

 

template <class T> T& Create()

Creates content of type T inside Any.

T

Type of content.

Return value

Reference to the newly created content.

 


 

template <class T> bool Is() const

Tests whether Any contains content of type T.

T

Required type.

Return value

true if there is content with type T in Any.

 


 

template <class T> T& Get()

Returns reference to content. Is<T> must be true, otherwise this operation is illegal.

T

Required type.

Return value

Reference to content.

 


 

template <class T> const T& Get() const

Returns constant reference to content. Is<T> must be true, otherwise this operation is illegal.

T

Required type.

Return value

Reference to content.

 


 

void Clear()

Removes (and destroys) content.

 


 

bool IsEmpty() const

Return value

true if there is no content.

 


 

bool IsPicked() const

Return value

true if Any is picked.

 


 

void operator=(pick_ Any& s)

Pick operator. Transfers content while destroying source.

s

Source Any.

 

 

Esta página está también en english. ¿Quieres ayudar?