Odyssey::Local< TypeT, TraitsT > Class Template Reference

This is a utility type for wrapping a known type with conversion routines. More...

#include <variable.h>

List of all members.

Public Member Functions

 Local ()
 Constructs an empty instance.
template<class T>
 Local (T t)
 Constructs an instance with an initial value.
template<class T, class U>
 Local (const Local< T, U > &rhs)
 Constructs an instance with a value copied from the given Local.
 Local (const Variable &v)
 Constructs an instance of this local copied from within a Variable.
size_t getSize () const
 Returns the size in bytes of the value held.
const std::type_info & getTypeInfo () const
 Returns the type info of the type held.
void lock ()
 Locks the Local so that it cannot be written to.
void unlock ()
 Unlocks write access to the Local.
bool isLocked () const
 Returns true if this instance is locked.
void _fromAny (const Odyssey::Any &val)
Odyssey::Any _toAny () const
 Converts to an Any variable holding a value of type value_t (from traits).
void _fromString (const Odyssey::String &val)
 Converts from a string.
Odyssey::String _toString () const
 Converts to a string.
Localoperator= (const Variable &rhs)
template<class T, class U>
Localoperator= (const Local< T, U > &rhs)
template<class T>
Localoperator= (T t)
template<class T>
 operator T () const

Friends

template<class T, class U, class V, class W>
std::basic_istream< T, U > & operator>> (std::basic_istream< T, U > &, Local< U, V > &)


Detailed Description

template<class TypeT, class TraitsT = variable_traits<TypeT>>
class Odyssey::Local< TypeT, TraitsT >

This is a utility type for wrapping a known type with conversion routines.

This generic data type implements all the generic data conversion routines and is a wrapper for known types. It is useful for providing a conversion mechanism for simple types to interact with Variable and Property.


Constructor & Destructor Documentation

template<class TypeT, class TraitsT = variable_traits<TypeT>>
Odyssey::Local< TypeT, TraitsT >::Local  )  [inline]
 

Constructs an empty instance.

template<class TypeT, class TraitsT = variable_traits<TypeT>>
template<class T>
Odyssey::Local< TypeT, TraitsT >::Local t  )  [inline]
 

Constructs an instance with an initial value.

template<class TypeT, class TraitsT = variable_traits<TypeT>>
template<class T, class U>
Odyssey::Local< TypeT, TraitsT >::Local const Local< T, U > &  rhs  )  [inline]
 

Constructs an instance with a value copied from the given Local.

template<class TypeT, class TraitsT = variable_traits<TypeT>>
Odyssey::Local< TypeT, TraitsT >::Local const Variable v  )  [inline]
 

Constructs an instance of this local copied from within a Variable.


Member Function Documentation

template<class TypeT, class TraitsT = variable_traits<TypeT>>
void Odyssey::Local< TypeT, TraitsT >::_fromAny const Odyssey::Any val  )  [inline]
 

Converts from an Any variable holding a value of type param_t (from traits).

template<class TypeT, class TraitsT = variable_traits<TypeT>>
void Odyssey::Local< TypeT, TraitsT >::_fromString const Odyssey::String val  )  [inline]
 

Converts from a string.

template<class TypeT, class TraitsT = variable_traits<TypeT>>
Odyssey::Any Odyssey::Local< TypeT, TraitsT >::_toAny  )  const [inline]
 

Converts to an Any variable holding a value of type value_t (from traits).

template<class TypeT, class TraitsT = variable_traits<TypeT>>
Odyssey::String Odyssey::Local< TypeT, TraitsT >::_toString  )  const [inline]
 

Converts to a string.

template<class TypeT, class TraitsT = variable_traits<TypeT>>
size_t Odyssey::Local< TypeT, TraitsT >::getSize  )  const [inline]
 

Returns the size in bytes of the value held.

template<class TypeT, class TraitsT = variable_traits<TypeT>>
const std::type_info& Odyssey::Local< TypeT, TraitsT >::getTypeInfo  )  const [inline]
 

Returns the type info of the type held.

template<class TypeT, class TraitsT = variable_traits<TypeT>>
bool Odyssey::Local< TypeT, TraitsT >::isLocked  )  const [inline]
 

Returns true if this instance is locked.

template<class TypeT, class TraitsT = variable_traits<TypeT>>
void Odyssey::Local< TypeT, TraitsT >::lock  )  [inline]
 

Locks the Local so that it cannot be written to.

template<class TypeT, class TraitsT = variable_traits<TypeT>>
template<class T>
Odyssey::Local< TypeT, TraitsT >::operator T  )  const [inline]
 

template<class TypeT, class TraitsT = variable_traits<TypeT>>
template<class T>
Local& Odyssey::Local< TypeT, TraitsT >::operator= t  )  [inline]
 

template<class TypeT, class TraitsT = variable_traits<TypeT>>
template<class T, class U>
Local& Odyssey::Local< TypeT, TraitsT >::operator= const Local< T, U > &  rhs  )  [inline]
 

template<class TypeT, class TraitsT = variable_traits<TypeT>>
Local& Odyssey::Local< TypeT, TraitsT >::operator= const Variable rhs  )  [inline]
 

template<class TypeT, class TraitsT = variable_traits<TypeT>>
void Odyssey::Local< TypeT, TraitsT >::unlock  )  [inline]
 

Unlocks write access to the Local.


Friends And Related Function Documentation

template<class TypeT, class TraitsT = variable_traits<TypeT>>
template<class T, class U, class V, class W>
std::basic_istream<T,U>& operator>> std::basic_istream< T, U > &  ,
Local< U, V > & 
[friend]
 


The documentation for this class was generated from the following file:
Generated on Sun Jan 7 01:18:53 2007 for Odyssey Meta-Engine by  doxygen 1.4.6-NO