Public Member Functions

gnash::Optional< T > Class Template Reference

A type to hold a simple value but with an additional 'unset' state. More...

#include <TextFormat_as.h>

Inheritance diagram for gnash::Optional< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Optional ()
 Construct an Optional<T> with no value set.
 Optional (const T &t)
 Construct an Optional<T> with an initial value.
void unset ()
 Unset this value.
 operator const void * () const
 Relatively safe conversion to bool via void*.
const T * operator-> () const
 Access to value using operator->().
Optional< T > & operator= (const T &t)
 Assign a T to this Optional<T>.
const T & operator* () const
 Retrieve type only if set (converts to true).

Detailed Description

template<typename T>
class gnash::Optional< T >

A type to hold a simple value but with an additional 'unset' state.

Most TextFormat values can be 'uninitialized', meaning they are not taken into account when applying formatting. These values return null in ActionScript.


Constructor & Destructor Documentation

template<typename T>
gnash::Optional< T >::Optional (  )  [inline]

Construct an Optional<T> with no value set.

template<typename T>
gnash::Optional< T >::Optional ( const T &  t  )  [inline]

Construct an Optional<T> with an initial value.

Implicit construction is allowed.


Member Function Documentation

template<typename T>
gnash::Optional< T >::operator const void * (  )  const [inline]

Relatively safe conversion to bool via void*.

template<typename T>
const T& gnash::Optional< T >::operator* (  )  const [inline]

Retrieve type only if set (converts to true).

template<typename T>
const T* gnash::Optional< T >::operator-> (  )  const [inline]

Access to value using operator->().

template<typename T>
Optional<T>& gnash::Optional< T >::operator= ( const T &  t  )  [inline]

Assign a T to this Optional<T>.

template<typename T>
void gnash::Optional< T >::unset (  )  [inline]

Unset this value.


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