Planeshift
MathScript Class Reference

A MathScript is a mini-program to run. More...

#include <mathscript.h>

Public Member Functions

void CopyAndDestroy (MathScript *other)
 
double Evaluate (MathEnvironment *env) const
 
const csString & Name () const
 
 ~MathScript ()
 

Static Public Member Functions

static MathScriptCreate (const char *name, const csString &script)
 
static void Destroy (MathScript *&mathScript)
 

Protected Member Functions

 MathScript (const char *name)
 

Protected Attributes

csString name
 
csArray< MathExpression * > scriptLines
 

Detailed Description

A MathScript is a mini-program to run.

It allows multiple lines. Each line must be in the form of: <var> = <formula>. When it parses, it makes a hashmap of all the variables for quick access.

Definition at line 442 of file mathscript.h.

Constructor & Destructor Documentation

MathScript::MathScript ( const char *  name)
inlineprotected

Definition at line 445 of file mathscript.h.

MathScript::~MathScript ( )

Member Function Documentation

void MathScript::CopyAndDestroy ( MathScript other)
static MathScript* MathScript::Create ( const char *  name,
const csString &  script 
)
static
static void MathScript::Destroy ( MathScript *&  mathScript)
static
double MathScript::Evaluate ( MathEnvironment env) const
virtual

Reimplemented from MathExpression.

const csString& MathScript::Name ( ) const
inline

Definition at line 455 of file mathscript.h.

Member Data Documentation

csString MathScript::name
protected

Definition at line 446 of file mathscript.h.

csArray<MathExpression*> MathScript::scriptLines
protected

Definition at line 447 of file mathscript.h.


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