Cafu Engine
ExpressionT::ResultT Struct Reference

A helper structure for returning both the type and the value of an expression. More...

#include "Expression.hpp"

Public Member Functions

 ResultT (float Value)
 Constructor. More...
 
 ResultT (int Value)
 Constructor. More...
 
float GetAsFloat () const
 
int GetAsInt () const
 

Public Attributes

TypeT Type
 The type of the result, can only be FloatNumber or IntNumber. More...
 
float ValueFloat
 If Type==FloatNumber, this is the value of the result. Otherwise it is undefined. More...
 
int ValueInt
 If Type==IntNumber, this is the value of the result. Otherwise it is undefined. More...
 

Detailed Description

A helper structure for returning both the type and the value of an expression.

Constructor & Destructor Documentation

ExpressionT::ResultT::ResultT ( float  Value)
inline

Constructor.

ExpressionT::ResultT::ResultT ( int  Value)
inline

Constructor.

Member Data Documentation

TypeT ExpressionT::ResultT::Type

The type of the result, can only be FloatNumber or IntNumber.

float ExpressionT::ResultT::ValueFloat

If Type==FloatNumber, this is the value of the result. Otherwise it is undefined.

int ExpressionT::ResultT::ValueInt

If Type==IntNumber, this is the value of the result. Otherwise it is undefined.


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