#include <CHMengineClass.h>
The CHMengine object represents an instance of a Chameleon engine. Before it can be used the programmer must load a message definition file using the Load
method of this object.
Public Member Functions | |
CHMengine () | |
Constructor. | |
virtual | ~CHMengine () |
Destructor. | |
size_t | AckMessageIndex () const |
Get the index of the ACK message. | |
size_t | buildNumber () const |
Get the build number of Chameleon. | |
const CHMchar * | ConfigurationName (size_t ConfigurationIndex) const |
Get the name of the configuration specified by ConfigurationIndex . | |
size_t | CountOfConfiguration () const |
Get the number of configurations in the message definition (VMD) file. | |
size_t | CountOfMessage () const |
Get the count of messages. | |
size_t | CountOfTable () const |
Get the count of tables. | |
size_t | CurrentConfigurationIndex () const |
Get the current configuration index of Chameleon. | |
const CHMengineHandle | EngineHandle () const |
Get the handle to the underlying Chameleon parser object. | |
void | extendPythonLibraryPath (const char *pPath) |
Add pPath to the path that Python will use to locate your python modules. | |
const CHMchar * | generateAck (const CHMchar *pMessage) |
Fast optimized method to generate an ACK message based on pMessage . | |
void | generateXsd (const char *pFilename) |
Generate an XSD to validate XML based on the XML generation style specified in the loaded VMD. | |
size_t | IgnoreMessageIndex () const |
Get the index of the default message. | |
size_t | InConfigurationIndex () const |
Get the index of the input configuration used for graphical transformation. | |
virtual void | InitiateMessage (const CHMchar *pFlatWire) |
Initiate a message. | |
CHMboolean | IsUsingPassthruMapping () const |
Check whether the engine is using passthru mapping (scripted transformation), or graphical mapping (graphical transformation). | |
virtual void | Load (const CHMchar *pFileName) |
Load the visual message definition (VMD) file pFileName . | |
CHMoutputLog * | Log () |
Get a non-const pointer to the CHMoutputLog object assigned to this engine. | |
size_t | majorVersion () const |
Get the major version number of Chameleon. | |
CHMtableHandle | MessageHandle (size_t MessageIndex) const |
Get the handle to the underlying Message at MessageIndex . | |
const CHMchar * | MessageName (size_t MessageIndex) const |
Get the message name. | |
size_t | minorVersion () const |
Get the minor version number of Chameleon. | |
const CHMchar * | NewLine () const |
Get a newline as defined by the current CHMoutputLog object. | |
size_t | OutConfigurationIndex () const |
Get the index of the output configuration for graphical transformation. | |
void | OutputLine (const CHMchar *pLine) const |
Output pLine to the currently assigned CHMoutputLog object. | |
virtual void | ParseMessage (const CHMchar *pFlatWire, size_t TransportIndex) |
Parse the message pFlatWire from the client at TransportIndex . | |
virtual void | ParseMessageDynamically (const CHMchar *pFlatWire, CHMtable &Table, size_t &MessageIndex) const |
Parse the message pFlatWire dynamically. | |
virtual void | ReplyToMessage (const CHMchar *FlatWire, size_t TransportIndex) |
Reply to message FlatWire from the client at TransportIndex . | |
void | SetCurrentConfigurationIndex (size_t Index) |
Set the current configuration index of Chameleon to Index . | |
void | setDefaultDatabase (const char *pAPI, const char *pName, const char *pUserName, const char *pPassword) |
Programmatically sets the default database associated with the currently selected configuration at run-time. | |
void | SetLog (CHMoutputLog *pLog) |
Assign a CHMoutputLog object pLog to this engine. | |
void | setPythonKeyValuePair (const char *pKey, const char *pValue) |
Assign a string value to a Python global variable. | |
void | SetRejectBadSegmentGrammarFlag (CHMboolean Flag) |
Set the strict grammar checking flag. | |
void | SetTransport (CHMtransport *pTransport) |
Assign a CHMtransport object to this engine. | |
void | SetWrapper (CHMwrapper *pWrapper) |
Assign a CHMwrapper object to this engine. | |
CHMtableHandle | TableHandle (size_t TableIndex) const |
Get the handle to the underlying Table at TableIndex . | |
const CHMchar * | transformMessage (const CHMchar *pMessage, size_t InConfigIndex, size_t OutConfigIndex, size_t &MessageIndex) |
Transform a message from one format to another. | |
const char * | translateMessageToXml (const char *pFlatWire) |
Translate the 2.X HL7 message FlatWire into XML using the DTDs of the format specified in the XML tab of the Options window. | |
const char * | translateXmlToMessage (const char *pXml) |
Translate the XML message pXml conforming to the DTDs of the format specified in the XML tab of the Options window into a 2.X HL7 message. | |
const CHMtransport * | Transport () const |
Get a const pointer to the CHMtransport object assigned to this engine. | |
CHMtransport * | Transport () |
Get a non-const pointer to the CHMtransport object assigned to this engine. | |
const CHMchar * | versionString () const |
Get the version string. | |
const CHMwrapper * | Wrapper () const |
Get a const pointer to the CHMwrapper object assigned to this engine. | |
CHMwrapper * | Wrapper () |
Get a non-const pointer to the CHMwrapper object assigned to this engine. |
|
Constructor.
|
|
Destructor.
|
|
Get the index of the ACK message. This message is set in the Options window of Chameleon in the Special Messages tab. See http://www.interfaceware.com/manual/autoack.html for more information. |
|
Get the build number of Chameleon.
|
|
Get the name of the configuration specified by
|
|
Get the number of configurations in the message definition (VMD) file.
|
|
Get the count of messages.
This method gives the number of message definitions loaded in |
|
Get the count of tables.
This method gives the number of table definitions loaded in |
|
Get the current configuration index of Chameleon.
|
|
Get the handle to the underlying Chameleon parser object. This method is part of the internal implementation of Chameleon and should not be called. |
|
Add This is in addition to the path set in the environment variable CHM_PYTHON_LIB_PATH. A semi-colon (;) delimited string is expected as input in a Windows environment. A colon (:) delimited string is expected as input in a POSIX environment. |
|
Fast optimized method to generate an ACK message based on Please read the chapter on AutoAcknowledgement in the manual http://www.interfaceware.com/manual/autoack.html |
|
Generate an XSD to validate XML based on the XML generation style specified in the loaded VMD.
The XSD will be output to |
|
Get the index of the default message. This message is used to identify messages which do not match the precise identification criteria for other messages in the given message definition file. This message is set in the Options window in the Special Messages tab. See http://www.interfaceware.com/manual/default_message.html for more information. |
|
Get the index of the input configuration used for graphical transformation. The index returned by this method is that of the input configuration last set by the user in the Transformation window in the VMD file. This is not used for scripted transformation. |
|
Initiate a message.
|
|
Check whether the engine is using passthru mapping (scripted transformation), or graphical mapping (graphical transformation).
|
|
Load the visual message definition (VMD) file This must be done before the Chameleon engine can be used. Applications should load the VMD file as part of initialization since loading may take a few seconds. Loading the VMD file every time a message is encountered will result in very slow performance. |
|
Get a non-const pointer to the CHMoutputLog object assigned to
|
|
Get the major version number of Chameleon.
|
|
Get the handle to the underlying Message at This method is part of the internal implementation of Chameleon and should not be called. |
|
Get the message name.
This method returns the name of the message located at the index |
|
Get the minor version number of Chameleon.
|
|
Get a newline as defined by the current CHMoutputLog object. Because conventions for newlines differ between Windows edit controls and log files, this should be used to ensure that inserting a newline has the desired behavior in a given log output. |
|
Get the index of the output configuration for graphical transformation. The index returned by this method is that of the output configuration last set by the user in the Transformation window in the VMD file. This is not used for scripted transformation. |
|
Output
|
|
Parse the message This function needs to be overridden by child classes of CHMengine. |
|
Parse the message This method can be used to parse messages without relying on the stubcode generation of Chameleon. See http://www.interfaceware.com/manual/cpp_dynamic_interface.html for more information. An important thing to note about this interface is that you must create a new CHMtable object each time before calling this method. |
|
Reply to message
|
|
Set the current configuration index of Chameleon to
|
|
Programmatically sets the default database associated with the currently selected configuration at run-time.
|
|
Assign a CHMoutputLog object This method is used by the engine for logging output. Use of the python "log()" command in the vmd file will be output through the CHMoutputLog interface. Be aware this method takes ownership of the CHMoutputLog object, i.e., the CHMengine destructor will delete the CHMoutputLog object. |
|
Assign a string value to a Python global variable. Note that the assigned value is always of string type. If an integer or other type is called for, you will need to convert the value to that type. |
|
Set the strict grammar checking flag. When this flag is set the parser will check for the presence of compulsory fields in each segment and enforce other rules such as maximum field length. This flag can also be set through the Options screen of Chameleon. |
|
Assign a CHMtransport object to
|
|
Assign a CHMwrapper object to
|
|
Get the handle to the underlying Table at This method is part of the internal implementation of Chameleon and should not be called. |
|
Transform a message from one format to another.
This function invokes Chameleon's translation logic to take a message of the |
|
Translate the 2.X HL7 message See http://www.interfaceware.com/manual/xml.html for more information. |
|
Translate the XML message See http://www.interfaceware.com/manual/xml.html for more information. |
|
Get a non-const pointer to the CHMtransport object assigned to
|
|
Get a const pointer to the CHMtransport object assigned to
|
|
Get the version string.
|
|
Get a non-const pointer to the CHMwrapper object assigned to
|
|
Get a const pointer to the CHMwrapper object assigned to
|