Savarese Software Research Corporation
NumberVisitor< T > Class Template Reference

NumberVisitor extracts numerical values from a Properties instance, cast to the desired numerical type. More...

#include <NumberVisitor.h>

Inheritance diagram for NumberVisitor< T >:

List of all members.

Public Member Functions

 NumberVisitor (T value)
const T get () const
void operator() (bool v) const
void operator() (std::int32_t v) const
void operator() (std::uint32_t v) const
void operator() (std::int64_t v) const
void operator() (std::uint64_t v) const
void operator() (double v) const
template<typename V >
void operator() (V &v) const

Detailed Description

template<typename T>
class NumberVisitor< T >

NumberVisitor extracts numerical values from a Properties instance, cast to the desired numerical type.

This class is necessary because you don't always know the exact type a numerical value has (e.g., when a Properties instance is loaded from a Lua table).

Definition at line 38 of file NumberVisitor.h.


Constructor & Destructor Documentation

template<typename T>
NumberVisitor< T >::NumberVisitor ( value) [inline]

Definition at line 43 of file NumberVisitor.h.


Member Function Documentation

template<typename T>
const T NumberVisitor< T >::get ( ) const [inline]

Definition at line 45 of file NumberVisitor.h.

Referenced by get_number().

template<typename T>
void NumberVisitor< T >::operator() ( bool  v) const [inline]

Definition at line 49 of file NumberVisitor.h.

template<typename T>
void NumberVisitor< T >::operator() ( std::int32_t  v) const [inline]

Definition at line 53 of file NumberVisitor.h.

template<typename T>
void NumberVisitor< T >::operator() ( std::uint32_t  v) const [inline]

Definition at line 57 of file NumberVisitor.h.

template<typename T>
void NumberVisitor< T >::operator() ( std::int64_t  v) const [inline]

Definition at line 61 of file NumberVisitor.h.

template<typename T>
void NumberVisitor< T >::operator() ( std::uint64_t  v) const [inline]

Definition at line 65 of file NumberVisitor.h.

template<typename T>
void NumberVisitor< T >::operator() ( double  v) const [inline]

Definition at line 69 of file NumberVisitor.h.

template<typename T>
template<typename V >
void NumberVisitor< T >::operator() ( V &  v) const [inline]

Definition at line 74 of file NumberVisitor.h.


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

Savarese Software Research Corporation
Copyright © 2006-2011 Savarese Software Research Corporation. All rights reserved.