Class Hierarchy   Class Index   Method Index  

CHMengineClass.h

00001 #ifndef __CHM_ENGINE_CLASS_H__
00002 #define __CHM_ENGINE_CLASS_H__
00003 //------------------------------------------------------------------------
00004 // Copyright (C) 1997-2007 iNTERFACEWARE Inc.  All Rights Reserved
00005 //
00006 // Module: CHMengineClass
00007 //
00008 // Description:
00009 // Instance of Chameleon engine.
00010 // The CHMengine object represents an instance of a Chameleon
00011 // engine.  Before it can be used the programmer must
00012 // load a message definition file using the Load method of this object.
00013 //
00014 // Author: Eliot Muir
00015 // Date:   Wed 09/09/1998 
00016 // Revision: $Revision: 1.69 $
00017 //
00018 // Last Edit Date: $Date: 2008-07-28 15:33:19 $
00019 // Source: $Source: /home/cvs/cvsroot/CHM/CHMengineClass.h,v $
00020 //---------------------------------------------------------------------------
00021 
00022 #include <CHM/CHMminimumInclude.h>
00023 
00024 class CHMenginePrivate;
00025 class CHMoutputLog;
00026 class CHMwrapper;
00027 class CHMtransport;
00028 class CHMdateTime;
00029 class CHMstring;
00030 class CHMtable;
00031 
00037 class CHMengine
00038 {
00039 public:
00041    CHMengine();
00042    
00043    explicit CHMengine(CHMengineHandle handle);
00044 
00046    virtual ~CHMengine();
00047 
00053    size_t AckMessageIndex() const;   
00054    
00056    size_t buildNumber() const;
00057    
00061    const CHMchar* ConfigurationName(size_t ConfigurationIndex) const;
00062    
00066    size_t CountOfConfiguration() const;
00067    
00074    size_t CountOfMessage() const;
00075 
00080    size_t CountOfTable() const;
00081    
00083    size_t CurrentConfigurationIndex() const;
00084 
00085 
00089    const CHMengineHandle EngineHandle() const;
00090 
00098    void extendPythonLibraryPath(const char* pPath);
00099 
00103    const CHMchar* generateAck(const CHMchar* pMessage);
00104    
00108    void generateXsd( const char* pFilename );
00109    
00117    size_t IgnoreMessageIndex() const;
00118 
00123    size_t InConfigurationIndex() const;
00124    
00131    virtual void InitiateMessage(const CHMchar* pFlatWire);
00132    
00137    CHMboolean IsUsingPassthruMapping() const;
00138    
00144    virtual void Load(const CHMchar* pFileName);
00145 
00146    
00148    CHMoutputLog* Log();
00149    
00151    size_t majorVersion() const;
00152    
00156    CHMtableHandle MessageHandle(size_t MessageIndex) const;
00157 
00163    const CHMchar* MessageName(size_t MessageIndex) const;
00164 
00166    size_t minorVersion() const;
00167    
00174    const CHMchar* NewLine() const;
00175 
00180    size_t OutConfigurationIndex() const;
00181 
00184    void OutputLine(const CHMchar* pLine) const;
00185    
00189    virtual void ParseMessage(const CHMchar* pFlatWire, size_t TransportIndex);
00190 
00199    virtual void ParseMessageDynamically(const CHMchar* pFlatWire, 
00200                                         CHMtable&   Table, 
00201                                         size_t&     MessageIndex) const;
00202 
00209    virtual void ReplyToMessage(const CHMchar* FlatWire, size_t TransportIndex);
00210 
00213    void SetCurrentConfigurationIndex(size_t Index);
00214     
00224    void setDefaultDatabase
00225    (
00226       const char* pAPI, 
00227       const char* pName,
00228       const char* pUserName,
00229       const char* pPassword
00230    );
00231    
00237    void SetLog(CHMoutputLog* pLog);
00238   
00243    void setPythonKeyValuePair(const char* pKey, const char* pValue);
00244 
00250    void SetRejectBadSegmentGrammarFlag(CHMboolean Flag);
00251  
00259    void SetTransport(CHMtransport* pTransport);
00260      
00268    void SetWrapper(CHMwrapper* pWrapper);
00269    
00273    CHMtableHandle TableHandle(size_t TableIndex) const;
00274    
00284    const CHMchar* transformMessage(const CHMchar* pMessage,
00285                           size_t InConfigIndex,
00286                           size_t OutConfigIndex,
00287                           size_t& MessageIndex);
00288 
00292    const char* translateMessageToXml(const char* pFlatWire);
00293 
00298    const char* translateXmlToMessage(const char* pXml);  
00299    
00302    const CHMtransport* Transport() const;
00303    
00306    CHMtransport* Transport();
00307 
00309    const CHMchar* versionString() const;
00310 
00313    const CHMwrapper* Wrapper() const;
00314 
00317    CHMwrapper* Wrapper();
00318 
00319    
00320    // This function is deprecated.
00321    //
00322    // void OutputStream(IOstrstream& Stream) const;
00323    
00324    // This function is deprecated. Use Dump instead. See manual for migration guide.
00325    //
00326    // void printOn(IOostream& Stream) const;
00327 
00328    // This function is deprecated. Use Dump instead. See manual for migration guide.
00329    //
00330    // void printOn(CHMstring& String) const;
00331 
00332 private:
00333    CHMengine& operator=(const CHMengine& Original); // not allowed
00334    CHMengine(const CHMengine& Original);            // not allowed
00335    CHMenginePrivate* pMember;
00336 };
00337 
00338 // This function is deprecated. Use Dump instead. See manual for migration guide.
00339 //
00340 // IOostream& operator<<(IOostream& Stream, const CHMengine& Engine);
00341 
00342 #endif // end of defensive include