Token.h File Reference
#include <string>
Go to the source code of this file.
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.