Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

plist::Primitive< T > Class Template Reference

#include <plistPrimitives.h>

Inheritance diagram for plist::Primitive< T >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<typename T>
class plist::Primitive< T >

Implements type-specific functionality through template specialization, mainly involving value conversion and stringification formatting.

Provides smart-pointer style functionality for transparent access to the value storage, as well as automatic casting to and from the value type so you can almost always treat the Primitive as if it was the value itself.

Definition at line 35 of file plistPrimitives.h.

Public Member Functions

 Primitive ()
 constructor
 Primitive (const T &v)
 constructor, provides automatic casting from the value type
Primitiveoperator= (const T &v)
 assignment from value type (template specializations add in-place modiciation (e.g. +=, *=))
Primitiveoperator+= (const T &v)
 add in-place
Primitiveoperator-= (const T &v)
 subtract in-place
Primitiveoperator *= (const T &v)
 multiply in-place
Primitiveoperator/= (const T &v)
 divide in-place
const T & operator * () const
 smart pointer access to value
const T * operator-> () const
 smart pointer access to value
 operator T () const
 automatic casting to the value type
virtual Primitive< T > * clone () const __attribute__((warn_unused_result))
 implements the clone function for Primitive<T>

Protected Attributes

val
 value storage


Constructor & Destructor Documentation

template<typename T>
plist::Primitive< T >::Primitive (  )  [inline]

constructor

Definition at line 38 of file plistPrimitives.h.

template<typename T>
plist::Primitive< T >::Primitive ( const T &  v  )  [inline]

constructor, provides automatic casting from the value type

Definition at line 40 of file plistPrimitives.h.


Member Function Documentation

template<class T>
Primitive< T > * plist::Primitive< T >::clone (  )  const [virtual]

implements the clone function for Primitive<T>

Implements plist::ObjectBase.

Definition at line 56 of file plistPrimitives.cc.

template<typename T>
const T& plist::Primitive< T >::operator * (  )  const [inline]

smart pointer access to value

Definition at line 50 of file plistPrimitives.h.

template<typename T>
Primitive& plist::Primitive< T >::operator *= ( const T &  v  )  [inline]

multiply in-place

Definition at line 46 of file plistPrimitives.h.

template<typename T>
plist::Primitive< T >::operator T (  )  const [inline]

automatic casting to the value type

Definition at line 55 of file plistPrimitives.h.

template<typename T>
Primitive& plist::Primitive< T >::operator+= ( const T &  v  )  [inline]

add in-place

Definition at line 44 of file plistPrimitives.h.

template<typename T>
Primitive& plist::Primitive< T >::operator-= ( const T &  v  )  [inline]

subtract in-place

Definition at line 45 of file plistPrimitives.h.

template<typename T>
const T* plist::Primitive< T >::operator-> (  )  const [inline]

smart pointer access to value

Definition at line 52 of file plistPrimitives.h.

template<typename T>
Primitive& plist::Primitive< T >::operator/= ( const T &  v  )  [inline]

divide in-place

Definition at line 47 of file plistPrimitives.h.

template<typename T>
Primitive& plist::Primitive< T >::operator= ( const T &  v  )  [inline]

assignment from value type (template specializations add in-place modiciation (e.g. +=, *=))

Definition at line 42 of file plistPrimitives.h.

Referenced by plist::Primitive< std::string >::set().


Member Data Documentation


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

Tekkotsu v3.0
Generated Wed Oct 4 00:05:23 2006 by Doxygen 1.4.7