ISIS Core Library 0.7.2 (api 3.0.0)
Public Member Functions | Protected Member Functions | Friends

isis::util::_internal::GenericReference< TYPE_TYPE > Class Template Reference

Base class to store and handle references to Value and ValueArray objects. More...

#include <generic_value.hpp>

Inheritance diagram for isis::util::_internal::GenericReference< TYPE_TYPE >:
isis::data::Chunk isis::util::PropertyValue isis::data::MemChunk< TYPE > isis::data::MemChunkNonDel< TYPE > isis::util::ProgParameter

Public Member Functions

 GenericReference ()
 Default contructor. Creates an empty reference.
 GenericReference (const GenericReference &src)
 Copy constructor This operator creates a copy of the referenced Value-Object.
 GenericReference (const TYPE_TYPE &src)
bool isEmpty () const
TYPE_TYPE & operator* () const
TYPE_TYPE * operator-> () const
 reexport parts of scoped_ptr's interface
GenericReference< TYPE_TYPE > & operator= (const TYPE_TYPE &src)
 Copy operator This operator replaces the current content by a copy of src.
GenericReference< TYPE_TYPE > & operator= (const GenericReference< TYPE_TYPE > &src)
 Copy operator This operator replaces the current content by a copy of the content of src.
const std::string toString (bool label=false) const

Protected Member Functions

 GenericReference (TYPE_TYPE *t)

Friends

class data::ValueArray
class Value

Detailed Description

template<typename TYPE_TYPE>
class isis::util::_internal::GenericReference< TYPE_TYPE >

Base class to store and handle references to Value and ValueArray objects.

The values are refernced as smart pointers to their base class. So the references are counted and data are automatically deleted if necessary. The usual dereferencing pointer interface ("*" and "->") is supported. This class is designed as base class for specialisations, it should not be used directly. Because of that, the contructors of this class are protected.

Definition at line 83 of file generic_value.hpp.


Constructor & Destructor Documentation

template<typename TYPE_TYPE>
isis::util::_internal::GenericReference< TYPE_TYPE >::GenericReference ( TYPE_TYPE *  t) [inline, protected]

Definition at line 89 of file generic_value.hpp.

template<typename TYPE_TYPE>
isis::util::_internal::GenericReference< TYPE_TYPE >::GenericReference ( ) [inline]

Default contructor. Creates an empty reference.

Definition at line 95 of file generic_value.hpp.

template<typename TYPE_TYPE>
isis::util::_internal::GenericReference< TYPE_TYPE >::GenericReference ( const GenericReference< TYPE_TYPE > &  src) [inline]

Copy constructor This operator creates a copy of the referenced Value-Object.

So its NO cheap copy. (At least not if the copy-operator of the contained type is not cheap)

Definition at line 101 of file generic_value.hpp.

template<typename TYPE_TYPE>
isis::util::_internal::GenericReference< TYPE_TYPE >::GenericReference ( const TYPE_TYPE &  src) [inline]

Definition at line 104 of file generic_value.hpp.


Member Function Documentation

template<typename TYPE_TYPE>
bool isis::util::_internal::GenericReference< TYPE_TYPE >::isEmpty ( ) const [inline]
Returns:
true if "contained" type has no value (a.k.a. is undefined)

Definition at line 128 of file generic_value.hpp.

template<typename TYPE_TYPE>
TYPE_TYPE& isis::util::_internal::GenericReference< TYPE_TYPE >::operator* ( ) const [inline]

Definition at line 93 of file generic_value.hpp.

template<typename TYPE_TYPE>
TYPE_TYPE* isis::util::_internal::GenericReference< TYPE_TYPE >::operator-> ( ) const [inline]

reexport parts of scoped_ptr's interface

Definition at line 92 of file generic_value.hpp.

template<typename TYPE_TYPE>
GenericReference<TYPE_TYPE>& isis::util::_internal::GenericReference< TYPE_TYPE >::operator= ( const TYPE_TYPE &  src) [inline]

Copy operator This operator replaces the current content by a copy of src.

Returns:
reference to the (just changed) target

Definition at line 123 of file generic_value.hpp.

template<typename TYPE_TYPE>
GenericReference<TYPE_TYPE>& isis::util::_internal::GenericReference< TYPE_TYPE >::operator= ( const GenericReference< TYPE_TYPE > &  src) [inline]

Copy operator This operator replaces the current content by a copy of the content of src.

So its NO cheap copy. (At least not if the copy-operator of the contained type is not cheap) If the source is empty the target will drop its content. Thus it will become empty as well.

Returns:
reference to the (just changed) target

Definition at line 114 of file generic_value.hpp.

template<typename TYPE_TYPE>
const std::string isis::util::_internal::GenericReference< TYPE_TYPE >::toString ( bool  label = false) const [inline]

Definition at line 131 of file generic_value.hpp.


Friends And Related Function Documentation

template<typename TYPE_TYPE>
friend class data::ValueArray [friend]

Definition at line 85 of file generic_value.hpp.

template<typename TYPE_TYPE>
friend class Value [friend]

Definition at line 86 of file generic_value.hpp.


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