// NOTE: this is a machine generated file--editing not recommended // // PSEEngine.h - class definitions for ASN.1 module PSESQL // // This file was generated by snacc on Mon Dec 04 16:24:59 2000 // UBC snacc by Mike Sample // A couple of enhancements made by IBM European Networking Center #ifndef _PSEEngine_h_ #define _PSEEngine_h_ //------------------------------------------------------------------------------ // class declarations: class FetchResultEntrySetOf1; class FetchResultEntrySetOf; class ColumnInfo; class NumResultCols; class NumResultRows; class ConnectRequest; class ConnectResponse; class PrepareRequest; class BindRequest; class BindResponse; class ExecuteRequest; class ExecuteResponse; class CancelRequest; class CancelResponse; class FetchRequest; class FetchResultDone; class GetdataRequest; class GetdataResultEntry; class GetdataResultDone; class CloseRequest; class CloseResponse; class DestroyRequest; class DestroyResponse; class DisconnectRequest; class DisconnectResponse; class PrepareResponse; class FetchResultEntry; class PSESQLMessageChoice; class PSESQLMessage; class PSESQLCommands; //------------------------------------------------------------------------------ // class definitions: /* INTEGER (0..maxInt) */ typedef AsnInt MessageID; class FetchResultEntrySetOf1: public AsnType { protected: unsigned long int count; struct AsnListElmt { AsnListElmt *next; AsnListElmt *prev; AsnOcts *elmt; } *first, *curr, *last; public: FetchResultEntrySetOf1() { count = 0; first = curr = last = NULL; } FetchResultEntrySetOf1 (const FetchResultEntrySetOf1 &); ~FetchResultEntrySetOf1(); AsnType *Clone() const; FetchResultEntrySetOf1 &operator = (const FetchResultEntrySetOf1 &); void SetCurrElmt (unsigned long int index); unsigned long int GetCurrElmtIndex(); void SetCurrToFirst() { curr = first; } void SetCurrToLast() { curr = last; } // reading member fcns int Count() const { return count; } // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!) AsnOcts *First() const { return count > 0 ? first->elmt : NULL; } AsnOcts *Last() const { return count > 0 ? last->elmt : NULL; } AsnOcts *Curr() const { return curr ? curr->elmt : NULL; } AsnOcts *Next() const { return curr && curr->next ? curr->next->elmt : NULL; } AsnOcts *Prev() const { return curr && curr->prev ? curr->prev->elmt : NULL; } // routines that move the curr elmt AsnOcts *GoNext() { if (curr) curr = curr->next; return Curr(); } AsnOcts *GoPrev() { if (curr) curr = curr->prev; return Curr(); } // write & alloc fcns - returns new elmt AsnOcts *Append(); // add elmt to end of list AsnOcts *Prepend(); // add elmt to beginning of list AsnOcts *InsertBefore(); //insert elmt before current elmt AsnOcts *InsertAfter(); //insert elmt after current elmt // write & alloc & copy - returns list after copying elmt FetchResultEntrySetOf1 &AppendCopy (AsnOcts &elmt); // add elmt to end of list FetchResultEntrySetOf1 &PrependCopy (AsnOcts &elmt); // add elmt to beginning of list FetchResultEntrySetOf1 &InsertBeforeAndCopy (AsnOcts &elmt); //insert elmt before current elmt FetchResultEntrySetOf1 &InsertAfterAndCopy (AsnOcts &elmt); //insert elmt after current elmt // removing the current elmt from the list void RemoveCurrFromList(); // encode and decode routines AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); PDU_MEMBER_MACROS void Print (ostream &os) const; }; class FetchResultEntrySetOf: public AsnType { protected: unsigned long int count; struct AsnListElmt { AsnListElmt *next; AsnListElmt *prev; AsnOcts *elmt; } *first, *curr, *last; public: FetchResultEntrySetOf() { count = 0; first = curr = last = NULL; } FetchResultEntrySetOf (const FetchResultEntrySetOf &); ~FetchResultEntrySetOf(); AsnType *Clone() const; FetchResultEntrySetOf &operator = (const FetchResultEntrySetOf &); void SetCurrElmt (unsigned long int index); unsigned long int GetCurrElmtIndex(); void SetCurrToFirst() { curr = first; } void SetCurrToLast() { curr = last; } // reading member fcns int Count() const { return count; } // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!) AsnOcts *First() const { return count > 0 ? first->elmt : NULL; } AsnOcts *Last() const { return count > 0 ? last->elmt : NULL; } AsnOcts *Curr() const { return curr ? curr->elmt : NULL; } AsnOcts *Next() const { return curr && curr->next ? curr->next->elmt : NULL; } AsnOcts *Prev() const { return curr && curr->prev ? curr->prev->elmt : NULL; } // routines that move the curr elmt AsnOcts *GoNext() { if (curr) curr = curr->next; return Curr(); } AsnOcts *GoPrev() { if (curr) curr = curr->prev; return Curr(); } // write & alloc fcns - returns new elmt AsnOcts *Append(); // add elmt to end of list AsnOcts *Prepend(); // add elmt to beginning of list AsnOcts *InsertBefore(); //insert elmt before current elmt AsnOcts *InsertAfter(); //insert elmt after current elmt // write & alloc & copy - returns list after copying elmt FetchResultEntrySetOf &AppendCopy (AsnOcts &elmt); // add elmt to end of list FetchResultEntrySetOf &PrependCopy (AsnOcts &elmt); // add elmt to beginning of list FetchResultEntrySetOf &InsertBeforeAndCopy (AsnOcts &elmt); //insert elmt before current elmt FetchResultEntrySetOf &InsertAfterAndCopy (AsnOcts &elmt); //insert elmt after current elmt // removing the current elmt from the list void RemoveCurrFromList(); // encode and decode routines AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); PDU_MEMBER_MACROS void Print (ostream &os) const; }; class ColumnInfo: public AsnType { public: AsnOcts dsn; AsnOcts tablename; AsnOcts columnname; AsnInt columnnumber; AsnInt datatype; AsnInt size; AsnInt scale; AsnBool nullable; AsnBool primarykey; ColumnInfo(); ColumnInfo (const ColumnInfo &); ~ColumnInfo(); AsnType *Clone() const; ColumnInfo &operator = (const ColumnInfo &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class NumResultCols: public AsnType { public: AsnInt columncount; NumResultCols(); NumResultCols (const NumResultCols &); ~NumResultCols(); AsnType *Clone() const; NumResultCols &operator = (const NumResultCols &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class NumResultRows: public AsnType { public: AsnInt rowcount; NumResultRows(); NumResultRows (const NumResultRows &); ~NumResultRows(); AsnType *Clone() const; NumResultRows &operator = (const NumResultRows &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class ConnectRequest: public AsnType { public: AsnOcts dsn; AsnOcts uid; AsnOcts pwd; ConnectRequest(); ConnectRequest (const ConnectRequest &); ~ConnectRequest(); AsnType *Clone() const; ConnectRequest &operator = (const ConnectRequest &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class ConnectResponse: public AsnType { public: AsnInt connectionid; AsnOcts resultcode; ConnectResponse(); ConnectResponse (const ConnectResponse &); ~ConnectResponse(); AsnType *Clone() const; ConnectResponse &operator = (const ConnectResponse &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class PrepareRequest: public AsnType { public: AsnInt connectionid; AsnOcts sql; PrepareRequest(); PrepareRequest (const PrepareRequest &); ~PrepareRequest(); AsnType *Clone() const; PrepareRequest &operator = (const PrepareRequest &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class BindRequest: public AsnType { public: AsnInt paramnumber; AsnOcts value; BindRequest(); BindRequest (const BindRequest &); ~BindRequest(); AsnType *Clone() const; BindRequest &operator = (const BindRequest &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class BindResponse: public AsnType { public: AsnOcts resultcode; BindResponse(); BindResponse (const BindResponse &); ~BindResponse(); AsnType *Clone() const; BindResponse &operator = (const BindResponse &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class ExecuteRequest: public AsnType { public: AsnBool asynchronous; ExecuteRequest(); ExecuteRequest (const ExecuteRequest &); ~ExecuteRequest(); AsnType *Clone() const; ExecuteRequest &operator = (const ExecuteRequest &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class ExecuteResponse: public AsnType { public: AsnOcts resultcode; ExecuteResponse(); ExecuteResponse (const ExecuteResponse &); ~ExecuteResponse(); AsnType *Clone() const; ExecuteResponse &operator = (const ExecuteResponse &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class CancelRequest: public AsnType { public: AsnBool connectionflag; AsnInt connectionid; CancelRequest(); CancelRequest (const CancelRequest &); ~CancelRequest(); AsnType *Clone() const; CancelRequest &operator = (const CancelRequest &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class CancelResponse: public AsnType { public: AsnOcts resultcode; CancelResponse(); CancelResponse (const CancelResponse &); ~CancelResponse(); AsnType *Clone() const; CancelResponse &operator = (const CancelResponse &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class FetchRequest: public AsnType { public: AsnInt cursortype; AsnInt cursorsize; AsnBool boundflag; FetchRequest(); FetchRequest (const FetchRequest &); ~FetchRequest(); AsnType *Clone() const; FetchRequest &operator = (const FetchRequest &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class FetchResultDone: public AsnType { public: AsnOcts resultcode; FetchResultDone(); FetchResultDone (const FetchResultDone &); ~FetchResultDone(); AsnType *Clone() const; FetchResultDone &operator = (const FetchResultDone &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class GetdataRequest: public AsnType { public: AsnInt columnnumber; GetdataRequest(); GetdataRequest (const GetdataRequest &); ~GetdataRequest(); AsnType *Clone() const; GetdataRequest &operator = (const GetdataRequest &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class GetdataResultEntry: public AsnType { public: AsnOcts column; AsnOcts value; GetdataResultEntry(); GetdataResultEntry (const GetdataResultEntry &); ~GetdataResultEntry(); AsnType *Clone() const; GetdataResultEntry &operator = (const GetdataResultEntry &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class GetdataResultDone: public AsnType { public: AsnOcts resultcode; GetdataResultDone(); GetdataResultDone (const GetdataResultDone &); ~GetdataResultDone(); AsnType *Clone() const; GetdataResultDone &operator = (const GetdataResultDone &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class CloseRequest: public AsnType { public: AsnInt connectionid; CloseRequest(); CloseRequest (const CloseRequest &); ~CloseRequest(); AsnType *Clone() const; CloseRequest &operator = (const CloseRequest &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class CloseResponse: public AsnType { public: AsnOcts resultcode; CloseResponse(); CloseResponse (const CloseResponse &); ~CloseResponse(); AsnType *Clone() const; CloseResponse &operator = (const CloseResponse &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class DestroyRequest: public AsnType { public: AsnInt connectionid; DestroyRequest(); DestroyRequest (const DestroyRequest &); ~DestroyRequest(); AsnType *Clone() const; DestroyRequest &operator = (const DestroyRequest &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class DestroyResponse: public AsnType { public: AsnOcts resultcode; DestroyResponse(); DestroyResponse (const DestroyResponse &); ~DestroyResponse(); AsnType *Clone() const; DestroyResponse &operator = (const DestroyResponse &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class DisconnectRequest: public AsnType { public: AsnInt connectionid; DisconnectRequest(); DisconnectRequest (const DisconnectRequest &); ~DisconnectRequest(); AsnType *Clone() const; DisconnectRequest &operator = (const DisconnectRequest &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class DisconnectResponse: public AsnType { public: AsnOcts resultcode; DisconnectResponse(); DisconnectResponse (const DisconnectResponse &); ~DisconnectResponse(); AsnType *Clone() const; DisconnectResponse &operator = (const DisconnectResponse &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class PrepareResponse: public AsnType { public: ColumnInfo *columninfo; NumResultCols *numresultcols; NumResultRows *numresultrows; AsnOcts resultcode; PrepareResponse(); PrepareResponse (const PrepareResponse &); ~PrepareResponse(); AsnType *Clone() const; PrepareResponse &operator = (const PrepareResponse &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class FetchResultEntry: public AsnType { public: FetchResultEntrySetOf columns; FetchResultEntrySetOf1 values; FetchResultEntry(); FetchResultEntry (const FetchResultEntry &); ~FetchResultEntry(); AsnType *Clone() const; FetchResultEntry &operator = (const FetchResultEntry &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class PSESQLMessageChoice: public AsnType { public: enum ChoiceIdEnum { connectRequestCid = 0, connectResponseCid = 1, prepareRequestCid = 2, prepareResponseCid = 3, bindRequestCid = 4, bindResponseCid = 5, executeRequestCid = 6, executeResponseCid = 7, cancelRequestCid = 8, cancelResponseCid = 9, fetchRequestCid = 10, fetchResultEntryCid = 11, fetchResultDoneCid = 12, getdataRequestCid = 13, getdataResultEntryCid = 14, getdataResultDoneCid = 15, closeRequestCid = 16, closeResponseCid = 17, destroyRequestCid = 18, destroyResponseCid = 19, disconnectRequestCid = 20, disconnectResponseCid = 21 }; enum ChoiceIdEnum choiceId; union { ConnectRequest *connectRequest; ConnectResponse *connectResponse; PrepareRequest *prepareRequest; PrepareResponse *prepareResponse; BindRequest *bindRequest; BindResponse *bindResponse; ExecuteRequest *executeRequest; ExecuteResponse *executeResponse; CancelRequest *cancelRequest; CancelResponse *cancelResponse; FetchRequest *fetchRequest; FetchResultEntry *fetchResultEntry; FetchResultDone *fetchResultDone; GetdataRequest *getdataRequest; GetdataResultEntry *getdataResultEntry; GetdataResultDone *getdataResultDone; CloseRequest *closeRequest; CloseResponse *closeResponse; DestroyRequest *destroyRequest; DestroyResponse *destroyResponse; DisconnectRequest *disconnectRequest; DisconnectResponse *disconnectResponse; }; PSESQLMessageChoice(); PSESQLMessageChoice (const PSESQLMessageChoice &); ~PSESQLMessageChoice(); AsnType *Clone() const; PSESQLMessageChoice &operator = (const PSESQLMessageChoice &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class PSESQLMessage: public AsnType { public: MessageID messageID; PSESQLMessageChoice *protocolOp; PSESQLMessage(); PSESQLMessage (const PSESQLMessage &); ~PSESQLMessage(); AsnType *Clone() const; PSESQLMessage &operator = (const PSESQLMessage &); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded); int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded); void Print (ostream &os) const; }; class PSESQLCommands: public AsnType { protected: unsigned long int count; struct AsnListElmt { AsnListElmt *next; AsnListElmt *prev; PSESQLMessage *elmt; } *first, *curr, *last; public: PSESQLCommands() { count = 0; first = curr = last = NULL; } PSESQLCommands (const PSESQLCommands &); ~PSESQLCommands(); AsnType *Clone() const; PSESQLCommands &operator = (const PSESQLCommands &); void SetCurrElmt (unsigned long int index); unsigned long int GetCurrElmtIndex(); void SetCurrToFirst() { curr = first; } void SetCurrToLast() { curr = last; } // reading member fcns int Count() const { return count; } // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!) PSESQLMessage *First() const { return count > 0 ? first->elmt : NULL; } PSESQLMessage *Last() const { return count > 0 ? last->elmt : NULL; } PSESQLMessage *Curr() const { return curr ? curr->elmt : NULL; } PSESQLMessage *Next() const { return curr && curr->next ? curr->next->elmt : NULL; } PSESQLMessage *Prev() const { return curr && curr->prev ? curr->prev->elmt : NULL; } // routines that move the curr elmt PSESQLMessage *GoNext() { if (curr) curr = curr->next; return Curr(); } PSESQLMessage *GoPrev() { if (curr) curr = curr->prev; return Curr(); } // write & alloc fcns - returns new elmt PSESQLMessage *Append(); // add elmt to end of list PSESQLMessage *Prepend(); // add elmt to beginning of list PSESQLMessage *InsertBefore(); //insert elmt before current elmt PSESQLMessage *InsertAfter(); //insert elmt after current elmt // write & alloc & copy - returns list after copying elmt PSESQLCommands &AppendCopy (PSESQLMessage &elmt); // add elmt to end of list PSESQLCommands &PrependCopy (PSESQLMessage &elmt); // add elmt to beginning of list PSESQLCommands &InsertBeforeAndCopy (PSESQLMessage &elmt); //insert elmt before current elmt PSESQLCommands &InsertAfterAndCopy (PSESQLMessage &elmt); //insert elmt after current elmt // removing the current elmt from the list void RemoveCurrFromList(); // encode and decode routines AsnLen BEnc (BUF_TYPE b); void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env); AsnLen BEncContent (BUF_TYPE b); void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env); PDU_MEMBER_MACROS void Print (ostream &os) const; }; //------------------------------------------------------------------------------ // externs for value defs extern const AsnInt maxInt; //------------------------------------------------------------------------------ #endif /* conditional include of PSEEngine.h */