As of Emdros version 1.1.11, the easiest way of interfacing with
Emdros is to use the EmdrosEnv
API. This sets up all the machinery described in the next
Full procedure (mostly obsolete: Use EmdrosEnv instead)
The following instructions are not necessary to
follow. You can simply use the EmdrosEnv API. If you want to know how to do
without it, the following instructions tell you that.
Create an EMdF database object. This must not be an
EMdFDB object, but rather one
of the descendants matching the back-end you are running:
Check that the connection is OK with the connectionOk()
method. If not, back up and implement an error-recovery strategy of
Create a EMdFOutput
object. This is for specifying:
The default encoding (e.g., ISO-8859-1),
The std::ostream descendant on which output should be
printed (e.g., std::cout), and
The output kind (XML, JSON, or Console).
Create a MQLExecEnv from the EMdF
database and the EMdFOutput object.
Use the executing environment to interact with the MQL layer,
and the EMdF database object to interact with the EMdF layer.
- When you are done, delete the execution environment and the EMdF
Next, we will see a code-snippet from the mql(1) program which
shows how to use the EmdrosEnv