MQL execution environment

Overview

The MQL execution environment is a container for everything the MQL engine needs to know about its environment in order to function.

It is recommended that you create an MQL execution environment object on the heap and call the pointer to it "pEE".

C++ interface


#include <emdros/mql_execution_environment.h>

#define COMPILER_STAGE_NONE   (0)
#define COMPILER_STAGE_PARSE  (1)
#define COMPILER_STAGE_WEED   (2)
#define COMPILER_STAGE_SYMBOL (3)
#define COMPILER_STAGE_TYPE   (4)
#define COMPILER_STAGE_MONADS (5)
#define COMPILER_STAGE_EXEC   (6)

class CMQL_execution_environment {
public:
  CStatement    *pStatement;  // Only valid after a successful parse.
                              // Deleted and set to nil by clean().
  EMdFDB* pDB;
  CEMdFOutput *pOut;
  CMQLError *pError;  // Initialized by constructor, deleted by destructor
  CMQL_execution_environment(EMdFDB* pMyDB, CEMdFOutput *pMyOut);
  ~CMQL_execution_environment();
  int nCompilerStage; // Shows you which compiler stage went wrong
  void clean(void);   // Must be called before each query is executed,
                      // but is called automatically by the 
                      // mql_execute_XXX functions and so, by proxy, the 
                      // CEmdrosEnv::execute_XXX methods
};



Previous:Transactions
Up:Part II: APIs
Next:MQL Error