|
Contents:
Search: |
MQL execution environmentOverviewThe 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 MQLExecEnv only indirectly, through an EmdrosEnv. C++ interface
#include <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 MQLExecEnv {
public:
Statement *pStatement; // Only valid after a successful parse.
// Deleted and set to nil by clean().
EMdFDB* pDB;
EMdFOutput *pOut;
MQLError *pError; // Initialized by constructor, deleted by destructor
MQLExecEnv(EMdFDB* pMyDB, EMdFOutput *pMyOut);
~MQLExecEnv();
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
// mqlExecuteXXX functions and so, by proxy, the
// EmdrosEnv::executeXXX methods
};
|