Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Token.h File Reference

#include <string>
Include dependency graph for Token.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Kodu::TokenBase

Namespaces

namespace  Kodu

Defines

#define TOKEN_SUPER_CLASS(DataType)
#define TOKEN_DERIVED_CLASS(DerivedClassName, SuperClassName, DataType)

Functions

 Kodu::TOKEN_SUPER_CLASS (std::string)
 Token<std::string>
 Kodu::TOKEN_SUPER_CLASS (float)
 Token<float>
 Kodu::TOKEN_DERIVED_CLASS (KeywordToken, Token< std::string >, std::string)
 KeywordToken.
 Kodu::TOKEN_DERIVED_CLASS (NumericToken, Token< float >, float)
 NumericToken.
 Kodu::TOKEN_DERIVED_CLASS (StringToken, Token< std::string >, std::string)
 StringToken.

Define Documentation

#define TOKEN_DERIVED_CLASS ( DerivedClassName,
SuperClassName,
DataType   ) 
Value:
class DerivedClassName : public SuperClassName {                        \
    public:                                                                 \
        explicit DerivedClassName(const DataType& kData)                    \
          : SuperClassName(kData)                                           \
        { }                                                                 \
                                                                            \
        explicit DerivedClassName(const DerivedClassName& kToken)           \
          : SuperClassName(kToken)                                          \
        { }                                                                 \
                                                                            \
        ~DerivedClassName() { }                                             \
                                                                            \
        DerivedClassName& operator=(const DerivedClassName& kToken) {       \
            if (this != &kToken) {                                          \
                SuperClassName::operator=(kToken);                          \
            }                                                               \
            return *this;                                                   \
        }                                                                   \
    };

Definition at line 84 of file Token.h.

#define TOKEN_SUPER_CLASS ( DataType   ) 
Value:
template<>                                                      \
    class Token<DataType> : public TokenBase {                      \
    public:                                                         \
        explicit Token<DataType>(const DataType& kData)             \
          : TokenBase(),                                            \
            data(kData)                                             \
        { }                                                         \
                                                                    \
        explicit Token<DataType>(const Token<DataType>& kToken)     \
          : TokenBase(kToken),                                      \
            data(kToken.data)                                       \
        { }                                                         \
                                                                    \
        virtual ~Token<DataType>() { }                              \
                                                                    \
        Token<DataType>& operator=(const Token<DataType>& kToken) { \
            if (this != &kToken) {                                  \
                TokenBase::operator=(kToken);                       \
                data = kToken.data;                                 \
            }                                                       \
            return *this;                                           \
        }                                                           \
                                                                    \
        const DataType& getData() const {                           \
            return data;                                            \
        }                                                           \
                                                                    \
    protected:                                                      \
        DataType data;                                              \
    };

Definition at line 51 of file Token.h.


Tekkotsu v5.1CVS
Generated Mon May 9 04:59:03 2016 by Doxygen 1.6.3