LOOS  v2.3.2
loos::internal::Value Struct Reference

Value class for the LOOS Kernel (virtual machine) More...

#include <KernelValue.hpp>

Collaboration diagram for loos::internal::Value:

Public Types

enum  ValueType { NONE, STRING, INT, FLOAT }
 Type of data this Value contains...
 

Public Member Functions

void copy (const Value &v)
 Make a copy (clone) of a Value.
 
 Value (const Value &v)
 
const Valueoperator= (const Value &v)
 
 Value (const std::string s)
 
 Value (const float f)
 
 Value (const long i)
 
 Value (const int i)
 
void setString (const std::string s)
 
void setFloat (const float f)
 
void setInt (const long i)
 
std::string getString (void) const
 Retrieve data, throwing an error if the Value is of the incorrect type.
 
float getFloat (void) const
 Retrieve data, throwing an error if the Value is of the incorrect type.
 
long getInt (void) const
 Retrieve data, throwing an error if the Value is of the incorrect type.
 

Public Attributes

ValueType type
 
union {
   std::string *   str
 
   float   flt
 
   long   itg
 
}; 
 

Friends

std::ostream & operator<< (std::ostream &os, const Value &v)
 Output in pseudo-XML.
 

Detailed Description

Value class for the LOOS Kernel (virtual machine)

These are the "values" that are on the data stack for the Kernel...

Definition at line 51 of file KernelValue.hpp.


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