// NOTE: this is a machine generated file--editing not recommended // // PSEEngine.C - class member functions for ASN.1 module PSESQL // // This file was generated by snacc on Mon Dec 04 16:24:59 2000 // UBC snacc written by Mike Sample // A couple of enhancements made by IBM European Networking Center #include "asn-incl.h" #include "PSEEngine.h" //------------------------------------------------------------------------------ // value defs const AsnInt maxInt (2147483647); //------------------------------------------------------------------------------ // class member definitions: AsnType *FetchResultEntrySetOf1::Clone() const { return new FetchResultEntrySetOf1; } AsnLen FetchResultEntrySetOf1::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, UNIV, CONS, SET_TAG_CODE); return l; } void FetchResultEntrySetOf1::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SET_TAG_CODE)) { Asn1Error << "FetchResultEntrySetOf1::BDec: ERROR - wrong tag" << endl; longjmp (env, -100); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } FetchResultEntrySetOf1::FetchResultEntrySetOf1 (const FetchResultEntrySetOf1 &) { Asn1Error << "use of incompletely defined FetchResultEntrySetOf1::FetchResultEntrySetOf1 (const FetchResultEntrySetOf1 &)" << endl; abort(); } FetchResultEntrySetOf1::~FetchResultEntrySetOf1() { SetCurrToFirst(); for (; Curr() != NULL; RemoveCurrFromList()) ; } // end of destructor #if SNACC_DEEP_COPY FetchResultEntrySetOf1 &FetchResultEntrySetOf1::operator = (const FetchResultEntrySetOf1 &that) #else // SNACC_DEEP_COPY FetchResultEntrySetOf1 &FetchResultEntrySetOf1::operator = (const FetchResultEntrySetOf1 &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { SetCurrToFirst(); for (; Curr(); RemoveCurrFromList()) ; //that.SetCurrToFirst(); //for (; that.Curr(); that.GoNext()) // AppendCopy (*that.Curr()); for (const AsnListElmt *run=that.first; run; run=run->next) AppendCopy (*run->elmt); } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined FetchResultEntrySetOf1 &FetchResultEntrySetOf1::operator = (const FetchResultEntrySetOf1 &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } void FetchResultEntrySetOf1::Print (ostream &os) const { os << "{ -- SEQUENCE/SET OF -- " << endl; indentG += stdIndentG; //SetCurrToFirst(); //for (; Curr() != NULL; GoNext()) for (const AsnListElmt *run=first; run; run=run->next) { Indent (os, indentG); //os << *Curr(); os << *run->elmt; //if (Curr() != Last()) if (run != last) os << ","; os << endl; } indentG -= stdIndentG; Indent (os, indentG); os << "}\n"; } // Print void FetchResultEntrySetOf1::SetCurrElmt (unsigned long int index) { unsigned long int i; curr = first; if (count) for (i = 0; (i < (count-1)) && (i < index); i++) curr = curr->next; } // FetchResultEntrySetOf1::SetCurrElmt unsigned long int FetchResultEntrySetOf1::GetCurrElmtIndex() { unsigned long int i; AsnListElmt *tmp; if (curr != NULL) { for (i = 0, tmp = first; tmp != NULL; i++) { if (tmp == curr) return i; else tmp = tmp->next; } } return count; } // FetchResultEntrySetOf1::GetCurrElmtIndex // alloc new list elmt, put at end of list // and return the component type AsnOcts *FetchResultEntrySetOf1::Append() { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; newElmt->next = NULL; if (last == NULL) { newElmt->prev = NULL; first = last = newElmt; } else { newElmt->prev = last; last->next = newElmt; last = newElmt; } count++; return (curr = newElmt)->elmt; } // FetchResultEntrySetOf1::Append // alloc new list elmt, put at begining of list // and return the component type AsnOcts *FetchResultEntrySetOf1::Prepend() { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; newElmt->prev = NULL; if (first == NULL) { newElmt->next = NULL; first = last = newElmt; } else { newElmt->next = first; first->prev = newElmt; first = newElmt; } count++; return (curr = newElmt)->elmt; } // FetchResultEntrySetOf1::Prepend // alloc new list elmt, insert it before the // current element and return the component type // if the current element is null, the new element // is placed at the beginning of the list. AsnOcts *FetchResultEntrySetOf1::InsertBefore() { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; if (curr == NULL) { newElmt->next = first; newElmt->prev = NULL; first = newElmt; if (last == NULL) last = newElmt; } else { newElmt->next = curr; newElmt->prev = curr->prev; curr->prev = newElmt; if (curr == first) first = newElmt; else newElmt->prev->next = newElmt; } count++; return (curr = newElmt)->elmt; } // FetchResultEntrySetOf1::InsertBefore // alloc new list elmt, insert it after the // current element and return the component type // if the current element is null, the new element // is placed at the end of the list. AsnOcts *FetchResultEntrySetOf1::InsertAfter() { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; if (curr == NULL) { newElmt->prev = last; newElmt->next = NULL; last = newElmt; if (first == NULL) first = newElmt; } else { newElmt->prev = curr; newElmt->next = curr->next; curr->next = newElmt; if (curr == last) last = newElmt; else newElmt->next->prev = newElmt; } count++; return (curr = newElmt)->elmt; } // FetchResultEntrySetOf1::InsertAfter FetchResultEntrySetOf1 &FetchResultEntrySetOf1::AppendCopy (AsnOcts &elmt) { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; *newElmt->elmt = elmt; newElmt->next = NULL; if (last == NULL) { newElmt->prev = NULL; first = last = newElmt; } else { newElmt->prev = last; last->next = newElmt; last = newElmt; } count++; return *this; } // AppendCopy FetchResultEntrySetOf1 &FetchResultEntrySetOf1::PrependCopy (AsnOcts &elmt) { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; *newElmt->elmt = elmt; newElmt->prev = NULL; if (first == NULL) { newElmt->next = NULL; first = last = newElmt; } else { newElmt->next = first; first->prev = newElmt; first = newElmt; } count++; return *this; } // FetchResultEntrySetOf1::PrependCopy // alloc new list elmt, insert it before the // current element, copy the given elmt into the new elmt // and return the component type. // if the current element is null, the new element // is placed at the beginning of the list. FetchResultEntrySetOf1 &FetchResultEntrySetOf1::InsertBeforeAndCopy (AsnOcts &elmt) { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; *newElmt->elmt = elmt; if (curr == NULL) { newElmt->next = first; newElmt->prev = NULL; first = newElmt; if (last == NULL) last = newElmt; } else { newElmt->next = curr; newElmt->prev = curr->prev; curr->prev = newElmt; if (curr == first) first = newElmt; else newElmt->prev->next = newElmt; } count++; return *this; } // FetchResultEntrySetOf1::InsertBeforeAndCopy // alloc new list elmt, insert it after the // current element, copy given elmt in to new elmt // and return the component type // if the current element is null, the new element // is placed at the end of the list. FetchResultEntrySetOf1 &FetchResultEntrySetOf1::InsertAfterAndCopy (AsnOcts &elmt) { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; *newElmt->elmt = elmt; if (curr == NULL) { newElmt->prev = last; newElmt->next = NULL; last = newElmt; if (first == NULL) first = newElmt; } else { newElmt->prev = curr; newElmt->next = curr->next; curr->next = newElmt; if (curr == last) last = newElmt; else newElmt->next->prev = newElmt; } count++; return *this; } // FetchResultEntrySetOf1::InsertAfterAndCopy // remove current element from list if current element is not NULL // The new current element will be the next element. // If the current element is the last element in the list // the second but last element will become the new current element. void FetchResultEntrySetOf1::RemoveCurrFromList() { AsnListElmt *del_elmt; if (curr != NULL) { del_elmt = curr; count--; if (count == 0) first = last = curr = NULL; else if (curr == first) { curr = first= first->next; first->prev = NULL; } else if (curr == last) { curr = last = last->prev; last->next = NULL; } else { curr->prev->next = curr->next; curr->next->prev = curr->prev; } delete del_elmt->elmt; delete del_elmt; } } AsnLen FetchResultEntrySetOf1::BEncContent (BUF_TYPE b) { AsnListElmt *currElmt; AsnLen elmtLen; AsnLen totalLen = 0; return totalLen; } // FetchResultEntrySetOf1::BEncContent void FetchResultEntrySetOf1::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnOcts *listElmt; AsnTag tag1; AsnLen listBytesDecoded = 0; AsnLen elmtLen1; while ((listBytesDecoded < elmtLen0) || (elmtLen0 == INDEFINITE_LEN)) { tag1 = BDecTag (b, listBytesDecoded, env); if ((tag1 == EOC_TAG_ID) && (elmtLen0 == INDEFINITE_LEN)) { BDEC_2ND_EOC_OCTET (b, listBytesDecoded, env); break; } if ((tag1 != MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE)) && (tag1 != MAKE_TAG_ID (UNIV, CONS, OCTETSTRING_TAG_CODE))) { Asn1Error << "Unexpected Tag" << endl; longjmp (env, -101); } elmtLen1 = BDecLen (b, listBytesDecoded, env); listElmt = Append(); listElmt->BDecContent (b, tag1, elmtLen1, listBytesDecoded, env); } bytesDecoded += listBytesDecoded; } // FetchResultEntrySetOf1::BDecContent AsnType *FetchResultEntrySetOf::Clone() const { return new FetchResultEntrySetOf; } AsnLen FetchResultEntrySetOf::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, UNIV, CONS, SET_TAG_CODE); return l; } void FetchResultEntrySetOf::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SET_TAG_CODE)) { Asn1Error << "FetchResultEntrySetOf::BDec: ERROR - wrong tag" << endl; longjmp (env, -102); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } FetchResultEntrySetOf::FetchResultEntrySetOf (const FetchResultEntrySetOf &) { Asn1Error << "use of incompletely defined FetchResultEntrySetOf::FetchResultEntrySetOf (const FetchResultEntrySetOf &)" << endl; abort(); } FetchResultEntrySetOf::~FetchResultEntrySetOf() { SetCurrToFirst(); for (; Curr() != NULL; RemoveCurrFromList()) ; } // end of destructor #if SNACC_DEEP_COPY FetchResultEntrySetOf &FetchResultEntrySetOf::operator = (const FetchResultEntrySetOf &that) #else // SNACC_DEEP_COPY FetchResultEntrySetOf &FetchResultEntrySetOf::operator = (const FetchResultEntrySetOf &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { SetCurrToFirst(); for (; Curr(); RemoveCurrFromList()) ; //that.SetCurrToFirst(); //for (; that.Curr(); that.GoNext()) // AppendCopy (*that.Curr()); for (const AsnListElmt *run=that.first; run; run=run->next) AppendCopy (*run->elmt); } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined FetchResultEntrySetOf &FetchResultEntrySetOf::operator = (const FetchResultEntrySetOf &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } void FetchResultEntrySetOf::Print (ostream &os) const { os << "{ -- SEQUENCE/SET OF -- " << endl; indentG += stdIndentG; //SetCurrToFirst(); //for (; Curr() != NULL; GoNext()) for (const AsnListElmt *run=first; run; run=run->next) { Indent (os, indentG); //os << *Curr(); os << *run->elmt; //if (Curr() != Last()) if (run != last) os << ","; os << endl; } indentG -= stdIndentG; Indent (os, indentG); os << "}\n"; } // Print void FetchResultEntrySetOf::SetCurrElmt (unsigned long int index) { unsigned long int i; curr = first; if (count) for (i = 0; (i < (count-1)) && (i < index); i++) curr = curr->next; } // FetchResultEntrySetOf::SetCurrElmt unsigned long int FetchResultEntrySetOf::GetCurrElmtIndex() { unsigned long int i; AsnListElmt *tmp; if (curr != NULL) { for (i = 0, tmp = first; tmp != NULL; i++) { if (tmp == curr) return i; else tmp = tmp->next; } } return count; } // FetchResultEntrySetOf::GetCurrElmtIndex // alloc new list elmt, put at end of list // and return the component type AsnOcts *FetchResultEntrySetOf::Append() { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; newElmt->next = NULL; if (last == NULL) { newElmt->prev = NULL; first = last = newElmt; } else { newElmt->prev = last; last->next = newElmt; last = newElmt; } count++; return (curr = newElmt)->elmt; } // FetchResultEntrySetOf::Append // alloc new list elmt, put at begining of list // and return the component type AsnOcts *FetchResultEntrySetOf::Prepend() { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; newElmt->prev = NULL; if (first == NULL) { newElmt->next = NULL; first = last = newElmt; } else { newElmt->next = first; first->prev = newElmt; first = newElmt; } count++; return (curr = newElmt)->elmt; } // FetchResultEntrySetOf::Prepend // alloc new list elmt, insert it before the // current element and return the component type // if the current element is null, the new element // is placed at the beginning of the list. AsnOcts *FetchResultEntrySetOf::InsertBefore() { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; if (curr == NULL) { newElmt->next = first; newElmt->prev = NULL; first = newElmt; if (last == NULL) last = newElmt; } else { newElmt->next = curr; newElmt->prev = curr->prev; curr->prev = newElmt; if (curr == first) first = newElmt; else newElmt->prev->next = newElmt; } count++; return (curr = newElmt)->elmt; } // FetchResultEntrySetOf::InsertBefore // alloc new list elmt, insert it after the // current element and return the component type // if the current element is null, the new element // is placed at the end of the list. AsnOcts *FetchResultEntrySetOf::InsertAfter() { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; if (curr == NULL) { newElmt->prev = last; newElmt->next = NULL; last = newElmt; if (first == NULL) first = newElmt; } else { newElmt->prev = curr; newElmt->next = curr->next; curr->next = newElmt; if (curr == last) last = newElmt; else newElmt->next->prev = newElmt; } count++; return (curr = newElmt)->elmt; } // FetchResultEntrySetOf::InsertAfter FetchResultEntrySetOf &FetchResultEntrySetOf::AppendCopy (AsnOcts &elmt) { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; *newElmt->elmt = elmt; newElmt->next = NULL; if (last == NULL) { newElmt->prev = NULL; first = last = newElmt; } else { newElmt->prev = last; last->next = newElmt; last = newElmt; } count++; return *this; } // AppendCopy FetchResultEntrySetOf &FetchResultEntrySetOf::PrependCopy (AsnOcts &elmt) { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; *newElmt->elmt = elmt; newElmt->prev = NULL; if (first == NULL) { newElmt->next = NULL; first = last = newElmt; } else { newElmt->next = first; first->prev = newElmt; first = newElmt; } count++; return *this; } // FetchResultEntrySetOf::PrependCopy // alloc new list elmt, insert it before the // current element, copy the given elmt into the new elmt // and return the component type. // if the current element is null, the new element // is placed at the beginning of the list. FetchResultEntrySetOf &FetchResultEntrySetOf::InsertBeforeAndCopy (AsnOcts &elmt) { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; *newElmt->elmt = elmt; if (curr == NULL) { newElmt->next = first; newElmt->prev = NULL; first = newElmt; if (last == NULL) last = newElmt; } else { newElmt->next = curr; newElmt->prev = curr->prev; curr->prev = newElmt; if (curr == first) first = newElmt; else newElmt->prev->next = newElmt; } count++; return *this; } // FetchResultEntrySetOf::InsertBeforeAndCopy // alloc new list elmt, insert it after the // current element, copy given elmt in to new elmt // and return the component type // if the current element is null, the new element // is placed at the end of the list. FetchResultEntrySetOf &FetchResultEntrySetOf::InsertAfterAndCopy (AsnOcts &elmt) { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new AsnOcts; *newElmt->elmt = elmt; if (curr == NULL) { newElmt->prev = last; newElmt->next = NULL; last = newElmt; if (first == NULL) first = newElmt; } else { newElmt->prev = curr; newElmt->next = curr->next; curr->next = newElmt; if (curr == last) last = newElmt; else newElmt->next->prev = newElmt; } count++; return *this; } // FetchResultEntrySetOf::InsertAfterAndCopy // remove current element from list if current element is not NULL // The new current element will be the next element. // If the current element is the last element in the list // the second but last element will become the new current element. void FetchResultEntrySetOf::RemoveCurrFromList() { AsnListElmt *del_elmt; if (curr != NULL) { del_elmt = curr; count--; if (count == 0) first = last = curr = NULL; else if (curr == first) { curr = first= first->next; first->prev = NULL; } else if (curr == last) { curr = last = last->prev; last->next = NULL; } else { curr->prev->next = curr->next; curr->next->prev = curr->prev; } delete del_elmt->elmt; delete del_elmt; } } AsnLen FetchResultEntrySetOf::BEncContent (BUF_TYPE b) { AsnListElmt *currElmt; AsnLen elmtLen; AsnLen totalLen = 0; return totalLen; } // FetchResultEntrySetOf::BEncContent void FetchResultEntrySetOf::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnOcts *listElmt; AsnTag tag1; AsnLen listBytesDecoded = 0; AsnLen elmtLen1; while ((listBytesDecoded < elmtLen0) || (elmtLen0 == INDEFINITE_LEN)) { tag1 = BDecTag (b, listBytesDecoded, env); if ((tag1 == EOC_TAG_ID) && (elmtLen0 == INDEFINITE_LEN)) { BDEC_2ND_EOC_OCTET (b, listBytesDecoded, env); break; } if ((tag1 != MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE)) && (tag1 != MAKE_TAG_ID (UNIV, CONS, OCTETSTRING_TAG_CODE))) { Asn1Error << "Unexpected Tag" << endl; longjmp (env, -103); } elmtLen1 = BDecLen (b, listBytesDecoded, env); listElmt = Append(); listElmt->BDecContent (b, tag1, elmtLen1, listBytesDecoded, env); } bytesDecoded += listBytesDecoded; } // FetchResultEntrySetOf::BDecContent ColumnInfo::ColumnInfo() { } ColumnInfo::ColumnInfo (const ColumnInfo &) { Asn1Error << "use of incompletely defined ColumnInfo::ColumnInfo (const ColumnInfo &)" << endl; abort(); } ColumnInfo::~ColumnInfo() { } AsnType *ColumnInfo::Clone() const { return new ColumnInfo; } #if SNACC_DEEP_COPY ColumnInfo &ColumnInfo::operator = (const ColumnInfo &that) #else // SNACC_DEEP_COPY ColumnInfo &ColumnInfo::operator = (const ColumnInfo &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { dsn = that.dsn; tablename = that.tablename; columnname = that.columnname; columnnumber = that.columnnumber; datatype = that.datatype; size = that.size; scale = that.scale; nullable = that.nullable; primarykey = that.primarykey; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined ColumnInfo &ColumnInfo::operator = (const ColumnInfo &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen ColumnInfo::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = primarykey.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 8); totalLen += l; l = nullable.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 7); totalLen += l; l = scale.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 6); totalLen += l; l = size.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 5); totalLen += l; l = datatype.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 4); totalLen += l; l = columnnumber.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 3); totalLen += l; l = columnname.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 2); totalLen += l; l = tablename.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 1); totalLen += l; l = dsn.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 0); totalLen += l; return totalLen; } // ColumnInfo::BEncContent void ColumnInfo::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 0)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); dsn.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -104); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 1)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 1))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); tablename.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -105); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 2)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 2))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); columnname.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -106); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 3))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); columnnumber.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -107); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 4))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); datatype.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -108); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 5))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); size.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -109); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 6))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); scale.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -110); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 7))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); nullable.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -111); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 8))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); primarykey.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -112); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -113); } else return; } // ColumnInfo::BDecContent AsnLen ColumnInfo::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, UNIV, CONS, SEQ_TAG_CODE); return l; } void ColumnInfo::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)) { Asn1Error << "ColumnInfo::BDec: ERROR - wrong tag" << endl; longjmp (env, -114); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int ColumnInfo::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int ColumnInfo::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void ColumnInfo::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "dsn "; os << dsn; os << "," << endl; } { Indent (os, indentG); os << "tablename "; os << tablename; os << "," << endl; } { Indent (os, indentG); os << "columnname "; os << columnname; os << "," << endl; } { Indent (os, indentG); os << "columnnumber "; os << columnnumber; os << "," << endl; } { Indent (os, indentG); os << "datatype "; os << datatype; os << "," << endl; } { Indent (os, indentG); os << "size "; os << size; os << "," << endl; } { Indent (os, indentG); os << "scale "; os << scale; os << "," << endl; } { Indent (os, indentG); os << "nullable "; os << nullable; os << "," << endl; } { Indent (os, indentG); os << "primarykey "; os << primarykey; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // ColumnInfo::Print NumResultCols::NumResultCols() { } NumResultCols::NumResultCols (const NumResultCols &) { Asn1Error << "use of incompletely defined NumResultCols::NumResultCols (const NumResultCols &)" << endl; abort(); } NumResultCols::~NumResultCols() { } AsnType *NumResultCols::Clone() const { return new NumResultCols; } #if SNACC_DEEP_COPY NumResultCols &NumResultCols::operator = (const NumResultCols &that) #else // SNACC_DEEP_COPY NumResultCols &NumResultCols::operator = (const NumResultCols &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { columncount = that.columncount; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined NumResultCols &NumResultCols::operator = (const NumResultCols &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen NumResultCols::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = columncount.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, UNIV, PRIM, INTEGER_TAG_CODE); totalLen += l; return totalLen; } // NumResultCols::BEncContent void NumResultCols::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, INTEGER_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); columncount.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -115); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -116); } else return; } // NumResultCols::BDecContent AsnLen NumResultCols::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, UNIV, CONS, SEQ_TAG_CODE); return l; } void NumResultCols::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)) { Asn1Error << "NumResultCols::BDec: ERROR - wrong tag" << endl; longjmp (env, -117); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int NumResultCols::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int NumResultCols::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void NumResultCols::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "columncount "; os << columncount; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // NumResultCols::Print NumResultRows::NumResultRows() { } NumResultRows::NumResultRows (const NumResultRows &) { Asn1Error << "use of incompletely defined NumResultRows::NumResultRows (const NumResultRows &)" << endl; abort(); } NumResultRows::~NumResultRows() { } AsnType *NumResultRows::Clone() const { return new NumResultRows; } #if SNACC_DEEP_COPY NumResultRows &NumResultRows::operator = (const NumResultRows &that) #else // SNACC_DEEP_COPY NumResultRows &NumResultRows::operator = (const NumResultRows &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { rowcount = that.rowcount; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined NumResultRows &NumResultRows::operator = (const NumResultRows &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen NumResultRows::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = rowcount.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, UNIV, PRIM, INTEGER_TAG_CODE); totalLen += l; return totalLen; } // NumResultRows::BEncContent void NumResultRows::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, INTEGER_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); rowcount.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -118); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -119); } else return; } // NumResultRows::BDecContent AsnLen NumResultRows::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, UNIV, CONS, SEQ_TAG_CODE); return l; } void NumResultRows::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)) { Asn1Error << "NumResultRows::BDec: ERROR - wrong tag" << endl; longjmp (env, -120); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int NumResultRows::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int NumResultRows::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void NumResultRows::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "rowcount "; os << rowcount; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // NumResultRows::Print ConnectRequest::ConnectRequest() { } ConnectRequest::ConnectRequest (const ConnectRequest &) { Asn1Error << "use of incompletely defined ConnectRequest::ConnectRequest (const ConnectRequest &)" << endl; abort(); } ConnectRequest::~ConnectRequest() { } AsnType *ConnectRequest::Clone() const { return new ConnectRequest; } #if SNACC_DEEP_COPY ConnectRequest &ConnectRequest::operator = (const ConnectRequest &that) #else // SNACC_DEEP_COPY ConnectRequest &ConnectRequest::operator = (const ConnectRequest &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { dsn = that.dsn; uid = that.uid; pwd = that.pwd; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined ConnectRequest &ConnectRequest::operator = (const ConnectRequest &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen ConnectRequest::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = pwd.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 2); totalLen += l; l = uid.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 1); totalLen += l; l = dsn.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 0); totalLen += l; return totalLen; } // ConnectRequest::BEncContent void ConnectRequest::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 0)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); dsn.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -121); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 1)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 1))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); uid.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -122); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 2)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 2))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); pwd.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -123); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -124); } else return; } // ConnectRequest::BDecContent AsnLen ConnectRequest::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 0); return l; } void ConnectRequest::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 0)) { Asn1Error << "ConnectRequest::BDec: ERROR - wrong tag" << endl; longjmp (env, -125); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int ConnectRequest::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int ConnectRequest::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void ConnectRequest::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "dsn "; os << dsn; os << "," << endl; } { Indent (os, indentG); os << "uid "; os << uid; os << "," << endl; } { Indent (os, indentG); os << "pwd "; os << pwd; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // ConnectRequest::Print ConnectResponse::ConnectResponse() { } ConnectResponse::ConnectResponse (const ConnectResponse &) { Asn1Error << "use of incompletely defined ConnectResponse::ConnectResponse (const ConnectResponse &)" << endl; abort(); } ConnectResponse::~ConnectResponse() { } AsnType *ConnectResponse::Clone() const { return new ConnectResponse; } #if SNACC_DEEP_COPY ConnectResponse &ConnectResponse::operator = (const ConnectResponse &that) #else // SNACC_DEEP_COPY ConnectResponse &ConnectResponse::operator = (const ConnectResponse &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { connectionid = that.connectionid; resultcode = that.resultcode; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined ConnectResponse &ConnectResponse::operator = (const ConnectResponse &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen ConnectResponse::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = resultcode.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 1); totalLen += l; l = connectionid.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 0); totalLen += l; return totalLen; } // ConnectResponse::BEncContent void ConnectResponse::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); connectionid.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -126); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 1)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 1))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); resultcode.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -127); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -128); } else return; } // ConnectResponse::BDecContent AsnLen ConnectResponse::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 1); return l; } void ConnectResponse::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 1)) { Asn1Error << "ConnectResponse::BDec: ERROR - wrong tag" << endl; longjmp (env, -129); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int ConnectResponse::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int ConnectResponse::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void ConnectResponse::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "connectionid "; os << connectionid; os << "," << endl; } { Indent (os, indentG); os << "resultcode "; os << resultcode; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // ConnectResponse::Print PrepareRequest::PrepareRequest() { } PrepareRequest::PrepareRequest (const PrepareRequest &) { Asn1Error << "use of incompletely defined PrepareRequest::PrepareRequest (const PrepareRequest &)" << endl; abort(); } PrepareRequest::~PrepareRequest() { } AsnType *PrepareRequest::Clone() const { return new PrepareRequest; } #if SNACC_DEEP_COPY PrepareRequest &PrepareRequest::operator = (const PrepareRequest &that) #else // SNACC_DEEP_COPY PrepareRequest &PrepareRequest::operator = (const PrepareRequest &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { connectionid = that.connectionid; sql = that.sql; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined PrepareRequest &PrepareRequest::operator = (const PrepareRequest &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen PrepareRequest::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = sql.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 1); totalLen += l; l = connectionid.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 0); totalLen += l; return totalLen; } // PrepareRequest::BEncContent void PrepareRequest::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); connectionid.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -130); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 1)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 1))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); sql.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -131); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -132); } else return; } // PrepareRequest::BDecContent AsnLen PrepareRequest::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 2); return l; } void PrepareRequest::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 2)) { Asn1Error << "PrepareRequest::BDec: ERROR - wrong tag" << endl; longjmp (env, -133); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int PrepareRequest::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int PrepareRequest::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void PrepareRequest::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "connectionid "; os << connectionid; os << "," << endl; } { Indent (os, indentG); os << "sql "; os << sql; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // PrepareRequest::Print BindRequest::BindRequest() { } BindRequest::BindRequest (const BindRequest &) { Asn1Error << "use of incompletely defined BindRequest::BindRequest (const BindRequest &)" << endl; abort(); } BindRequest::~BindRequest() { } AsnType *BindRequest::Clone() const { return new BindRequest; } #if SNACC_DEEP_COPY BindRequest &BindRequest::operator = (const BindRequest &that) #else // SNACC_DEEP_COPY BindRequest &BindRequest::operator = (const BindRequest &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { paramnumber = that.paramnumber; value = that.value; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined BindRequest &BindRequest::operator = (const BindRequest &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen BindRequest::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = value.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 1); totalLen += l; l = paramnumber.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 0); totalLen += l; return totalLen; } // BindRequest::BEncContent void BindRequest::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); paramnumber.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -134); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 1)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 1))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); value.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -135); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -136); } else return; } // BindRequest::BDecContent AsnLen BindRequest::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 4); return l; } void BindRequest::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 4)) { Asn1Error << "BindRequest::BDec: ERROR - wrong tag" << endl; longjmp (env, -137); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int BindRequest::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int BindRequest::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void BindRequest::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "paramnumber "; os << paramnumber; os << "," << endl; } { Indent (os, indentG); os << "value "; os << value; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // BindRequest::Print BindResponse::BindResponse() { } BindResponse::BindResponse (const BindResponse &) { Asn1Error << "use of incompletely defined BindResponse::BindResponse (const BindResponse &)" << endl; abort(); } BindResponse::~BindResponse() { } AsnType *BindResponse::Clone() const { return new BindResponse; } #if SNACC_DEEP_COPY BindResponse &BindResponse::operator = (const BindResponse &that) #else // SNACC_DEEP_COPY BindResponse &BindResponse::operator = (const BindResponse &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { resultcode = that.resultcode; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined BindResponse &BindResponse::operator = (const BindResponse &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen BindResponse::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = resultcode.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, UNIV, PRIM, OCTETSTRING_TAG_CODE); totalLen += l; return totalLen; } // BindResponse::BEncContent void BindResponse::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE)) || (tag1 == MAKE_TAG_ID (UNIV, CONS, OCTETSTRING_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); resultcode.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -138); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -139); } else return; } // BindResponse::BDecContent AsnLen BindResponse::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 5); return l; } void BindResponse::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 5)) { Asn1Error << "BindResponse::BDec: ERROR - wrong tag" << endl; longjmp (env, -140); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int BindResponse::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int BindResponse::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void BindResponse::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "resultcode "; os << resultcode; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // BindResponse::Print ExecuteRequest::ExecuteRequest() { } ExecuteRequest::ExecuteRequest (const ExecuteRequest &) { Asn1Error << "use of incompletely defined ExecuteRequest::ExecuteRequest (const ExecuteRequest &)" << endl; abort(); } ExecuteRequest::~ExecuteRequest() { } AsnType *ExecuteRequest::Clone() const { return new ExecuteRequest; } #if SNACC_DEEP_COPY ExecuteRequest &ExecuteRequest::operator = (const ExecuteRequest &that) #else // SNACC_DEEP_COPY ExecuteRequest &ExecuteRequest::operator = (const ExecuteRequest &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { asynchronous = that.asynchronous; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined ExecuteRequest &ExecuteRequest::operator = (const ExecuteRequest &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen ExecuteRequest::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = asynchronous.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, UNIV, PRIM, BOOLEAN_TAG_CODE); totalLen += l; return totalLen; } // ExecuteRequest::BEncContent void ExecuteRequest::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, BOOLEAN_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); asynchronous.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -141); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -142); } else return; } // ExecuteRequest::BDecContent AsnLen ExecuteRequest::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 6); return l; } void ExecuteRequest::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 6)) { Asn1Error << "ExecuteRequest::BDec: ERROR - wrong tag" << endl; longjmp (env, -143); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int ExecuteRequest::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int ExecuteRequest::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void ExecuteRequest::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "asynchronous "; os << asynchronous; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // ExecuteRequest::Print ExecuteResponse::ExecuteResponse() { } ExecuteResponse::ExecuteResponse (const ExecuteResponse &) { Asn1Error << "use of incompletely defined ExecuteResponse::ExecuteResponse (const ExecuteResponse &)" << endl; abort(); } ExecuteResponse::~ExecuteResponse() { } AsnType *ExecuteResponse::Clone() const { return new ExecuteResponse; } #if SNACC_DEEP_COPY ExecuteResponse &ExecuteResponse::operator = (const ExecuteResponse &that) #else // SNACC_DEEP_COPY ExecuteResponse &ExecuteResponse::operator = (const ExecuteResponse &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { resultcode = that.resultcode; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined ExecuteResponse &ExecuteResponse::operator = (const ExecuteResponse &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen ExecuteResponse::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = resultcode.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, UNIV, PRIM, OCTETSTRING_TAG_CODE); totalLen += l; return totalLen; } // ExecuteResponse::BEncContent void ExecuteResponse::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE)) || (tag1 == MAKE_TAG_ID (UNIV, CONS, OCTETSTRING_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); resultcode.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -144); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -145); } else return; } // ExecuteResponse::BDecContent AsnLen ExecuteResponse::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 7); return l; } void ExecuteResponse::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 7)) { Asn1Error << "ExecuteResponse::BDec: ERROR - wrong tag" << endl; longjmp (env, -146); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int ExecuteResponse::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int ExecuteResponse::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void ExecuteResponse::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "resultcode "; os << resultcode; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // ExecuteResponse::Print CancelRequest::CancelRequest() { } CancelRequest::CancelRequest (const CancelRequest &) { Asn1Error << "use of incompletely defined CancelRequest::CancelRequest (const CancelRequest &)" << endl; abort(); } CancelRequest::~CancelRequest() { } AsnType *CancelRequest::Clone() const { return new CancelRequest; } #if SNACC_DEEP_COPY CancelRequest &CancelRequest::operator = (const CancelRequest &that) #else // SNACC_DEEP_COPY CancelRequest &CancelRequest::operator = (const CancelRequest &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { connectionflag = that.connectionflag; connectionid = that.connectionid; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined CancelRequest &CancelRequest::operator = (const CancelRequest &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen CancelRequest::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = connectionid.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 1); totalLen += l; l = connectionflag.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 0); totalLen += l; return totalLen; } // CancelRequest::BEncContent void CancelRequest::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); connectionflag.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -147); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 1))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); connectionid.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -148); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -149); } else return; } // CancelRequest::BDecContent AsnLen CancelRequest::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 8); return l; } void CancelRequest::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 8)) { Asn1Error << "CancelRequest::BDec: ERROR - wrong tag" << endl; longjmp (env, -150); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int CancelRequest::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int CancelRequest::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void CancelRequest::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "connectionflag "; os << connectionflag; os << "," << endl; } { Indent (os, indentG); os << "connectionid "; os << connectionid; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // CancelRequest::Print CancelResponse::CancelResponse() { } CancelResponse::CancelResponse (const CancelResponse &) { Asn1Error << "use of incompletely defined CancelResponse::CancelResponse (const CancelResponse &)" << endl; abort(); } CancelResponse::~CancelResponse() { } AsnType *CancelResponse::Clone() const { return new CancelResponse; } #if SNACC_DEEP_COPY CancelResponse &CancelResponse::operator = (const CancelResponse &that) #else // SNACC_DEEP_COPY CancelResponse &CancelResponse::operator = (const CancelResponse &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { resultcode = that.resultcode; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined CancelResponse &CancelResponse::operator = (const CancelResponse &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen CancelResponse::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = resultcode.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 0); totalLen += l; return totalLen; } // CancelResponse::BEncContent void CancelResponse::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 0)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); resultcode.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -151); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -152); } else return; } // CancelResponse::BDecContent AsnLen CancelResponse::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 9); return l; } void CancelResponse::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 9)) { Asn1Error << "CancelResponse::BDec: ERROR - wrong tag" << endl; longjmp (env, -153); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int CancelResponse::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int CancelResponse::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void CancelResponse::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "resultcode "; os << resultcode; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // CancelResponse::Print FetchRequest::FetchRequest() { } FetchRequest::FetchRequest (const FetchRequest &) { Asn1Error << "use of incompletely defined FetchRequest::FetchRequest (const FetchRequest &)" << endl; abort(); } FetchRequest::~FetchRequest() { } AsnType *FetchRequest::Clone() const { return new FetchRequest; } #if SNACC_DEEP_COPY FetchRequest &FetchRequest::operator = (const FetchRequest &that) #else // SNACC_DEEP_COPY FetchRequest &FetchRequest::operator = (const FetchRequest &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { cursortype = that.cursortype; cursorsize = that.cursorsize; boundflag = that.boundflag; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined FetchRequest &FetchRequest::operator = (const FetchRequest &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen FetchRequest::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = boundflag.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 2); totalLen += l; l = cursorsize.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 1); totalLen += l; l = cursortype.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, CNTX, PRIM, 0); totalLen += l; return totalLen; } // FetchRequest::BEncContent void FetchRequest::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); cursortype.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -154); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 1))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); cursorsize.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -155); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 2))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); boundflag.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -156); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -157); } else return; } // FetchRequest::BDecContent AsnLen FetchRequest::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 10); return l; } void FetchRequest::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 10)) { Asn1Error << "FetchRequest::BDec: ERROR - wrong tag" << endl; longjmp (env, -158); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int FetchRequest::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int FetchRequest::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void FetchRequest::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "cursortype "; os << cursortype; os << "," << endl; } { Indent (os, indentG); os << "cursorsize "; os << cursorsize; os << "," << endl; } { Indent (os, indentG); os << "boundflag "; os << boundflag; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // FetchRequest::Print FetchResultDone::FetchResultDone() { } FetchResultDone::FetchResultDone (const FetchResultDone &) { Asn1Error << "use of incompletely defined FetchResultDone::FetchResultDone (const FetchResultDone &)" << endl; abort(); } FetchResultDone::~FetchResultDone() { } AsnType *FetchResultDone::Clone() const { return new FetchResultDone; } #if SNACC_DEEP_COPY FetchResultDone &FetchResultDone::operator = (const FetchResultDone &that) #else // SNACC_DEEP_COPY FetchResultDone &FetchResultDone::operator = (const FetchResultDone &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { resultcode = that.resultcode; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined FetchResultDone &FetchResultDone::operator = (const FetchResultDone &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen FetchResultDone::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = resultcode.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 0); totalLen += l; return totalLen; } // FetchResultDone::BEncContent void FetchResultDone::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 0)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); resultcode.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -159); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -160); } else return; } // FetchResultDone::BDecContent AsnLen FetchResultDone::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 12); return l; } void FetchResultDone::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 12)) { Asn1Error << "FetchResultDone::BDec: ERROR - wrong tag" << endl; longjmp (env, -161); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int FetchResultDone::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int FetchResultDone::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void FetchResultDone::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "resultcode "; os << resultcode; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // FetchResultDone::Print GetdataRequest::GetdataRequest() { } GetdataRequest::GetdataRequest (const GetdataRequest &) { Asn1Error << "use of incompletely defined GetdataRequest::GetdataRequest (const GetdataRequest &)" << endl; abort(); } GetdataRequest::~GetdataRequest() { } AsnType *GetdataRequest::Clone() const { return new GetdataRequest; } #if SNACC_DEEP_COPY GetdataRequest &GetdataRequest::operator = (const GetdataRequest &that) #else // SNACC_DEEP_COPY GetdataRequest &GetdataRequest::operator = (const GetdataRequest &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { columnnumber = that.columnnumber; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined GetdataRequest &GetdataRequest::operator = (const GetdataRequest &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen GetdataRequest::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = columnnumber.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, UNIV, PRIM, INTEGER_TAG_CODE); totalLen += l; return totalLen; } // GetdataRequest::BEncContent void GetdataRequest::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, INTEGER_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); columnnumber.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -162); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -163); } else return; } // GetdataRequest::BDecContent AsnLen GetdataRequest::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 13); return l; } void GetdataRequest::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 13)) { Asn1Error << "GetdataRequest::BDec: ERROR - wrong tag" << endl; longjmp (env, -164); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int GetdataRequest::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int GetdataRequest::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void GetdataRequest::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "columnnumber "; os << columnnumber; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // GetdataRequest::Print GetdataResultEntry::GetdataResultEntry() { } GetdataResultEntry::GetdataResultEntry (const GetdataResultEntry &) { Asn1Error << "use of incompletely defined GetdataResultEntry::GetdataResultEntry (const GetdataResultEntry &)" << endl; abort(); } GetdataResultEntry::~GetdataResultEntry() { } AsnType *GetdataResultEntry::Clone() const { return new GetdataResultEntry; } #if SNACC_DEEP_COPY GetdataResultEntry &GetdataResultEntry::operator = (const GetdataResultEntry &that) #else // SNACC_DEEP_COPY GetdataResultEntry &GetdataResultEntry::operator = (const GetdataResultEntry &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { column = that.column; value = that.value; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined GetdataResultEntry &GetdataResultEntry::operator = (const GetdataResultEntry &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen GetdataResultEntry::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = value.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 1); totalLen += l; l = column.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 0); totalLen += l; return totalLen; } // GetdataResultEntry::BEncContent void GetdataResultEntry::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 0)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); column.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -165); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 1)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 1))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); value.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -166); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -167); } else return; } // GetdataResultEntry::BDecContent AsnLen GetdataResultEntry::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 14); return l; } void GetdataResultEntry::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 14)) { Asn1Error << "GetdataResultEntry::BDec: ERROR - wrong tag" << endl; longjmp (env, -168); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int GetdataResultEntry::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int GetdataResultEntry::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void GetdataResultEntry::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "column "; os << column; os << "," << endl; } { Indent (os, indentG); os << "value "; os << value; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // GetdataResultEntry::Print GetdataResultDone::GetdataResultDone() { } GetdataResultDone::GetdataResultDone (const GetdataResultDone &) { Asn1Error << "use of incompletely defined GetdataResultDone::GetdataResultDone (const GetdataResultDone &)" << endl; abort(); } GetdataResultDone::~GetdataResultDone() { } AsnType *GetdataResultDone::Clone() const { return new GetdataResultDone; } #if SNACC_DEEP_COPY GetdataResultDone &GetdataResultDone::operator = (const GetdataResultDone &that) #else // SNACC_DEEP_COPY GetdataResultDone &GetdataResultDone::operator = (const GetdataResultDone &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { resultcode = that.resultcode; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined GetdataResultDone &GetdataResultDone::operator = (const GetdataResultDone &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen GetdataResultDone::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = resultcode.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 0); totalLen += l; return totalLen; } // GetdataResultDone::BEncContent void GetdataResultDone::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 0)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); resultcode.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -169); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -170); } else return; } // GetdataResultDone::BDecContent AsnLen GetdataResultDone::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 15); return l; } void GetdataResultDone::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 15)) { Asn1Error << "GetdataResultDone::BDec: ERROR - wrong tag" << endl; longjmp (env, -171); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int GetdataResultDone::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int GetdataResultDone::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void GetdataResultDone::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "resultcode "; os << resultcode; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // GetdataResultDone::Print CloseRequest::CloseRequest() { } CloseRequest::CloseRequest (const CloseRequest &) { Asn1Error << "use of incompletely defined CloseRequest::CloseRequest (const CloseRequest &)" << endl; abort(); } CloseRequest::~CloseRequest() { } AsnType *CloseRequest::Clone() const { return new CloseRequest; } #if SNACC_DEEP_COPY CloseRequest &CloseRequest::operator = (const CloseRequest &that) #else // SNACC_DEEP_COPY CloseRequest &CloseRequest::operator = (const CloseRequest &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { connectionid = that.connectionid; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined CloseRequest &CloseRequest::operator = (const CloseRequest &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen CloseRequest::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = connectionid.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, UNIV, PRIM, INTEGER_TAG_CODE); totalLen += l; return totalLen; } // CloseRequest::BEncContent void CloseRequest::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, INTEGER_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); connectionid.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -172); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -173); } else return; } // CloseRequest::BDecContent AsnLen CloseRequest::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 16); return l; } void CloseRequest::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 16)) { Asn1Error << "CloseRequest::BDec: ERROR - wrong tag" << endl; longjmp (env, -174); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int CloseRequest::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int CloseRequest::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void CloseRequest::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "connectionid "; os << connectionid; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // CloseRequest::Print CloseResponse::CloseResponse() { } CloseResponse::CloseResponse (const CloseResponse &) { Asn1Error << "use of incompletely defined CloseResponse::CloseResponse (const CloseResponse &)" << endl; abort(); } CloseResponse::~CloseResponse() { } AsnType *CloseResponse::Clone() const { return new CloseResponse; } #if SNACC_DEEP_COPY CloseResponse &CloseResponse::operator = (const CloseResponse &that) #else // SNACC_DEEP_COPY CloseResponse &CloseResponse::operator = (const CloseResponse &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { resultcode = that.resultcode; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined CloseResponse &CloseResponse::operator = (const CloseResponse &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen CloseResponse::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = resultcode.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, UNIV, PRIM, OCTETSTRING_TAG_CODE); totalLen += l; return totalLen; } // CloseResponse::BEncContent void CloseResponse::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE)) || (tag1 == MAKE_TAG_ID (UNIV, CONS, OCTETSTRING_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); resultcode.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -175); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -176); } else return; } // CloseResponse::BDecContent AsnLen CloseResponse::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 17); return l; } void CloseResponse::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 17)) { Asn1Error << "CloseResponse::BDec: ERROR - wrong tag" << endl; longjmp (env, -177); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int CloseResponse::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int CloseResponse::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void CloseResponse::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "resultcode "; os << resultcode; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // CloseResponse::Print DestroyRequest::DestroyRequest() { } DestroyRequest::DestroyRequest (const DestroyRequest &) { Asn1Error << "use of incompletely defined DestroyRequest::DestroyRequest (const DestroyRequest &)" << endl; abort(); } DestroyRequest::~DestroyRequest() { } AsnType *DestroyRequest::Clone() const { return new DestroyRequest; } #if SNACC_DEEP_COPY DestroyRequest &DestroyRequest::operator = (const DestroyRequest &that) #else // SNACC_DEEP_COPY DestroyRequest &DestroyRequest::operator = (const DestroyRequest &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { connectionid = that.connectionid; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined DestroyRequest &DestroyRequest::operator = (const DestroyRequest &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen DestroyRequest::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = connectionid.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, UNIV, PRIM, INTEGER_TAG_CODE); totalLen += l; return totalLen; } // DestroyRequest::BEncContent void DestroyRequest::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, INTEGER_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); connectionid.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -178); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -179); } else return; } // DestroyRequest::BDecContent AsnLen DestroyRequest::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 18); return l; } void DestroyRequest::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 18)) { Asn1Error << "DestroyRequest::BDec: ERROR - wrong tag" << endl; longjmp (env, -180); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int DestroyRequest::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int DestroyRequest::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void DestroyRequest::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "connectionid "; os << connectionid; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // DestroyRequest::Print DestroyResponse::DestroyResponse() { } DestroyResponse::DestroyResponse (const DestroyResponse &) { Asn1Error << "use of incompletely defined DestroyResponse::DestroyResponse (const DestroyResponse &)" << endl; abort(); } DestroyResponse::~DestroyResponse() { } AsnType *DestroyResponse::Clone() const { return new DestroyResponse; } #if SNACC_DEEP_COPY DestroyResponse &DestroyResponse::operator = (const DestroyResponse &that) #else // SNACC_DEEP_COPY DestroyResponse &DestroyResponse::operator = (const DestroyResponse &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { resultcode = that.resultcode; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined DestroyResponse &DestroyResponse::operator = (const DestroyResponse &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen DestroyResponse::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = resultcode.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, UNIV, PRIM, OCTETSTRING_TAG_CODE); totalLen += l; return totalLen; } // DestroyResponse::BEncContent void DestroyResponse::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE)) || (tag1 == MAKE_TAG_ID (UNIV, CONS, OCTETSTRING_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); resultcode.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -181); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -182); } else return; } // DestroyResponse::BDecContent AsnLen DestroyResponse::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 19); return l; } void DestroyResponse::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 19)) { Asn1Error << "DestroyResponse::BDec: ERROR - wrong tag" << endl; longjmp (env, -183); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int DestroyResponse::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int DestroyResponse::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void DestroyResponse::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "resultcode "; os << resultcode; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // DestroyResponse::Print DisconnectRequest::DisconnectRequest() { } DisconnectRequest::DisconnectRequest (const DisconnectRequest &) { Asn1Error << "use of incompletely defined DisconnectRequest::DisconnectRequest (const DisconnectRequest &)" << endl; abort(); } DisconnectRequest::~DisconnectRequest() { } AsnType *DisconnectRequest::Clone() const { return new DisconnectRequest; } #if SNACC_DEEP_COPY DisconnectRequest &DisconnectRequest::operator = (const DisconnectRequest &that) #else // SNACC_DEEP_COPY DisconnectRequest &DisconnectRequest::operator = (const DisconnectRequest &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { connectionid = that.connectionid; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined DisconnectRequest &DisconnectRequest::operator = (const DisconnectRequest &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen DisconnectRequest::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = connectionid.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, UNIV, PRIM, INTEGER_TAG_CODE); totalLen += l; return totalLen; } // DisconnectRequest::BEncContent void DisconnectRequest::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, INTEGER_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); connectionid.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -184); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -185); } else return; } // DisconnectRequest::BDecContent AsnLen DisconnectRequest::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 20); return l; } void DisconnectRequest::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 20)) { Asn1Error << "DisconnectRequest::BDec: ERROR - wrong tag" << endl; longjmp (env, -186); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int DisconnectRequest::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int DisconnectRequest::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void DisconnectRequest::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "connectionid "; os << connectionid; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // DisconnectRequest::Print DisconnectResponse::DisconnectResponse() { } DisconnectResponse::DisconnectResponse (const DisconnectResponse &) { Asn1Error << "use of incompletely defined DisconnectResponse::DisconnectResponse (const DisconnectResponse &)" << endl; abort(); } DisconnectResponse::~DisconnectResponse() { } AsnType *DisconnectResponse::Clone() const { return new DisconnectResponse; } #if SNACC_DEEP_COPY DisconnectResponse &DisconnectResponse::operator = (const DisconnectResponse &that) #else // SNACC_DEEP_COPY DisconnectResponse &DisconnectResponse::operator = (const DisconnectResponse &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { resultcode = that.resultcode; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined DisconnectResponse &DisconnectResponse::operator = (const DisconnectResponse &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen DisconnectResponse::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = resultcode.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, UNIV, PRIM, OCTETSTRING_TAG_CODE); totalLen += l; return totalLen; } // DisconnectResponse::BEncContent void DisconnectResponse::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE)) || (tag1 == MAKE_TAG_ID (UNIV, CONS, OCTETSTRING_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); resultcode.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -187); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -188); } else return; } // DisconnectResponse::BDecContent AsnLen DisconnectResponse::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 21); return l; } void DisconnectResponse::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 21)) { Asn1Error << "DisconnectResponse::BDec: ERROR - wrong tag" << endl; longjmp (env, -189); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int DisconnectResponse::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int DisconnectResponse::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void DisconnectResponse::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "resultcode "; os << resultcode; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // DisconnectResponse::Print PrepareResponse::PrepareResponse() { #if TCL columninfo = new ColumnInfo; #else columninfo = NULL; // incomplete initialization of mandatory element! #endif // TCL #if TCL numresultcols = new NumResultCols; #else numresultcols = NULL; // incomplete initialization of mandatory element! #endif // TCL #if TCL numresultrows = new NumResultRows; #else numresultrows = NULL; // incomplete initialization of mandatory element! #endif // TCL } PrepareResponse::PrepareResponse (const PrepareResponse &) { Asn1Error << "use of incompletely defined PrepareResponse::PrepareResponse (const PrepareResponse &)" << endl; abort(); } PrepareResponse::~PrepareResponse() { delete columninfo; delete numresultcols; delete numresultrows; } AsnType *PrepareResponse::Clone() const { return new PrepareResponse; } #if SNACC_DEEP_COPY PrepareResponse &PrepareResponse::operator = (const PrepareResponse &that) #else // SNACC_DEEP_COPY PrepareResponse &PrepareResponse::operator = (const PrepareResponse &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { if (that.columninfo) { if (!columninfo) columninfo = new ColumnInfo; *columninfo = *that.columninfo; } else { delete columninfo; columninfo = NULL; } if (that.numresultcols) { if (!numresultcols) numresultcols = new NumResultCols; *numresultcols = *that.numresultcols; } else { delete numresultcols; numresultcols = NULL; } if (that.numresultrows) { if (!numresultrows) numresultrows = new NumResultRows; *numresultrows = *that.numresultrows; } else { delete numresultrows; numresultrows = NULL; } resultcode = that.resultcode; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined PrepareResponse &PrepareResponse::operator = (const PrepareResponse &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen PrepareResponse::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = resultcode.BEncContent (b); l += BEncDefLen (b, l); l += BEncTag1 (b, CNTX, PRIM, 3); totalLen += l; BEncEocIfNec (b); l = numresultrows->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, CNTX, CONS, 2); totalLen += l; BEncEocIfNec (b); l = numresultcols->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, CNTX, CONS, 1); totalLen += l; BEncEocIfNec (b); l = columninfo->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, CNTX, CONS, 0); totalLen += l; return totalLen; } // PrepareResponse::BEncContent void PrepareResponse::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); columninfo = new ColumnInfo; columninfo->BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -190); } if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 1))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); numresultcols = new NumResultCols; numresultcols->BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -191); } if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 2))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); numresultrows = new NumResultRows; numresultrows->BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -192); } if ((tag1 == MAKE_TAG_ID (CNTX, PRIM, 3)) || (tag1 == MAKE_TAG_ID (CNTX, CONS, 3))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); resultcode.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -193); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -194); } else return; } // PrepareResponse::BDecContent AsnLen PrepareResponse::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 3); return l; } void PrepareResponse::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 3)) { Asn1Error << "PrepareResponse::BDec: ERROR - wrong tag" << endl; longjmp (env, -195); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int PrepareResponse::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int PrepareResponse::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void PrepareResponse::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; if (NOT_NULL (columninfo)) { Indent (os, indentG); os << "columninfo "; os << *columninfo; } else { Indent (os, indentG); os << "columninfo "; os << "-- void --"; os << "," << endl; } if (NOT_NULL (numresultcols)) { Indent (os, indentG); os << "numresultcols "; os << *numresultcols; } else { Indent (os, indentG); os << "numresultcols "; os << "-- void --"; os << "," << endl; } if (NOT_NULL (numresultrows)) { Indent (os, indentG); os << "numresultrows "; os << *numresultrows; } else { Indent (os, indentG); os << "numresultrows "; os << "-- void --"; os << "," << endl; } { Indent (os, indentG); os << "resultcode "; os << resultcode; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // PrepareResponse::Print FetchResultEntry::FetchResultEntry() { } FetchResultEntry::FetchResultEntry (const FetchResultEntry &) { Asn1Error << "use of incompletely defined FetchResultEntry::FetchResultEntry (const FetchResultEntry &)" << endl; abort(); } FetchResultEntry::~FetchResultEntry() { } AsnType *FetchResultEntry::Clone() const { return new FetchResultEntry; } #if SNACC_DEEP_COPY FetchResultEntry &FetchResultEntry::operator = (const FetchResultEntry &that) #else // SNACC_DEEP_COPY FetchResultEntry &FetchResultEntry::operator = (const FetchResultEntry &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { columns = that.columns; values = that.values; } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined FetchResultEntry &FetchResultEntry::operator = (const FetchResultEntry &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen FetchResultEntry::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; BEncEocIfNec (b); l = values.BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, CNTX, CONS, 1); totalLen += l; BEncEocIfNec (b); l = columns.BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, CNTX, CONS, 0); totalLen += l; return totalLen; } // FetchResultEntry::BEncContent void FetchResultEntry::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 0))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); columns.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -196); } if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 1))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); values.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -197); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -198); } else return; } // FetchResultEntry::BDecContent AsnLen FetchResultEntry::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 11); return l; } void FetchResultEntry::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (APPL, CONS, 11)) { Asn1Error << "FetchResultEntry::BDec: ERROR - wrong tag" << endl; longjmp (env, -199); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int FetchResultEntry::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int FetchResultEntry::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void FetchResultEntry::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "columns "; os << columns; os << "," << endl; } { Indent (os, indentG); os << "values "; os << values; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // FetchResultEntry::Print PSESQLMessageChoice::PSESQLMessageChoice() { choiceId = connectRequestCid; #if TCL connectRequest = new ConnectRequest; #else connectRequest = NULL; // incomplete initialization of mandatory element! #endif // TCL } PSESQLMessageChoice::PSESQLMessageChoice (const PSESQLMessageChoice &) { Asn1Error << "use of incompletely defined PSESQLMessageChoice::PSESQLMessageChoice (const PSESQLMessageChoice &)" << endl; abort(); } PSESQLMessageChoice::~PSESQLMessageChoice() { switch (choiceId) { case connectRequestCid: delete connectRequest; break; case connectResponseCid: delete connectResponse; break; case prepareRequestCid: delete prepareRequest; break; case prepareResponseCid: delete prepareResponse; break; case bindRequestCid: delete bindRequest; break; case bindResponseCid: delete bindResponse; break; case executeRequestCid: delete executeRequest; break; case executeResponseCid: delete executeResponse; break; case cancelRequestCid: delete cancelRequest; break; case cancelResponseCid: delete cancelResponse; break; case fetchRequestCid: delete fetchRequest; break; case fetchResultEntryCid: delete fetchResultEntry; break; case fetchResultDoneCid: delete fetchResultDone; break; case getdataRequestCid: delete getdataRequest; break; case getdataResultEntryCid: delete getdataResultEntry; break; case getdataResultDoneCid: delete getdataResultDone; break; case closeRequestCid: delete closeRequest; break; case closeResponseCid: delete closeResponse; break; case destroyRequestCid: delete destroyRequest; break; case destroyResponseCid: delete destroyResponse; break; case disconnectRequestCid: delete disconnectRequest; break; case disconnectResponseCid: delete disconnectResponse; break; } // end of switch } // end of destructor AsnType *PSESQLMessageChoice::Clone() const { return new PSESQLMessageChoice; } #if SNACC_DEEP_COPY PSESQLMessageChoice &PSESQLMessageChoice::operator = (const PSESQLMessageChoice &that) #else // SNACC_DEEP_COPY PSESQLMessageChoice &PSESQLMessageChoice::operator = (const PSESQLMessageChoice &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { switch (choiceId) { case connectRequestCid: delete connectRequest; break; case connectResponseCid: delete connectResponse; break; case prepareRequestCid: delete prepareRequest; break; case prepareResponseCid: delete prepareResponse; break; case bindRequestCid: delete bindRequest; break; case bindResponseCid: delete bindResponse; break; case executeRequestCid: delete executeRequest; break; case executeResponseCid: delete executeResponse; break; case cancelRequestCid: delete cancelRequest; break; case cancelResponseCid: delete cancelResponse; break; case fetchRequestCid: delete fetchRequest; break; case fetchResultEntryCid: delete fetchResultEntry; break; case fetchResultDoneCid: delete fetchResultDone; break; case getdataRequestCid: delete getdataRequest; break; case getdataResultEntryCid: delete getdataResultEntry; break; case getdataResultDoneCid: delete getdataResultDone; break; case closeRequestCid: delete closeRequest; break; case closeResponseCid: delete closeResponse; break; case destroyRequestCid: delete destroyRequest; break; case destroyResponseCid: delete destroyResponse; break; case disconnectRequestCid: delete disconnectRequest; break; case disconnectResponseCid: delete disconnectResponse; break; } switch (choiceId = that.choiceId) { case connectRequestCid: connectRequest = new ConnectRequest; *connectRequest = *that.connectRequest; break; case connectResponseCid: connectResponse = new ConnectResponse; *connectResponse = *that.connectResponse; break; case prepareRequestCid: prepareRequest = new PrepareRequest; *prepareRequest = *that.prepareRequest; break; case prepareResponseCid: prepareResponse = new PrepareResponse; *prepareResponse = *that.prepareResponse; break; case bindRequestCid: bindRequest = new BindRequest; *bindRequest = *that.bindRequest; break; case bindResponseCid: bindResponse = new BindResponse; *bindResponse = *that.bindResponse; break; case executeRequestCid: executeRequest = new ExecuteRequest; *executeRequest = *that.executeRequest; break; case executeResponseCid: executeResponse = new ExecuteResponse; *executeResponse = *that.executeResponse; break; case cancelRequestCid: cancelRequest = new CancelRequest; *cancelRequest = *that.cancelRequest; break; case cancelResponseCid: cancelResponse = new CancelResponse; *cancelResponse = *that.cancelResponse; break; case fetchRequestCid: fetchRequest = new FetchRequest; *fetchRequest = *that.fetchRequest; break; case fetchResultEntryCid: fetchResultEntry = new FetchResultEntry; *fetchResultEntry = *that.fetchResultEntry; break; case fetchResultDoneCid: fetchResultDone = new FetchResultDone; *fetchResultDone = *that.fetchResultDone; break; case getdataRequestCid: getdataRequest = new GetdataRequest; *getdataRequest = *that.getdataRequest; break; case getdataResultEntryCid: getdataResultEntry = new GetdataResultEntry; *getdataResultEntry = *that.getdataResultEntry; break; case getdataResultDoneCid: getdataResultDone = new GetdataResultDone; *getdataResultDone = *that.getdataResultDone; break; case closeRequestCid: closeRequest = new CloseRequest; *closeRequest = *that.closeRequest; break; case closeResponseCid: closeResponse = new CloseResponse; *closeResponse = *that.closeResponse; break; case destroyRequestCid: destroyRequest = new DestroyRequest; *destroyRequest = *that.destroyRequest; break; case destroyResponseCid: destroyResponse = new DestroyResponse; *destroyResponse = *that.destroyResponse; break; case disconnectRequestCid: disconnectRequest = new DisconnectRequest; *disconnectRequest = *that.disconnectRequest; break; case disconnectResponseCid: disconnectResponse = new DisconnectResponse; *disconnectResponse = *that.disconnectResponse; break; } } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined PSESQLMessageChoice &PSESQLMessageChoice::operator = (const PSESQLMessageChoice &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen PSESQLMessageChoice::BEncContent (BUF_TYPE b) { AsnLen l; switch (choiceId) { case connectRequestCid: BEncEocIfNec (b); l = connectRequest->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 0); break; case connectResponseCid: BEncEocIfNec (b); l = connectResponse->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 1); break; case prepareRequestCid: BEncEocIfNec (b); l = prepareRequest->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 2); break; case prepareResponseCid: BEncEocIfNec (b); l = prepareResponse->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 3); break; case bindRequestCid: BEncEocIfNec (b); l = bindRequest->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 4); break; case bindResponseCid: BEncEocIfNec (b); l = bindResponse->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 5); break; case executeRequestCid: BEncEocIfNec (b); l = executeRequest->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 6); break; case executeResponseCid: BEncEocIfNec (b); l = executeResponse->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 7); break; case cancelRequestCid: BEncEocIfNec (b); l = cancelRequest->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 8); break; case cancelResponseCid: BEncEocIfNec (b); l = cancelResponse->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 9); break; case fetchRequestCid: BEncEocIfNec (b); l = fetchRequest->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 10); break; case fetchResultEntryCid: BEncEocIfNec (b); l = fetchResultEntry->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 11); break; case fetchResultDoneCid: BEncEocIfNec (b); l = fetchResultDone->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 12); break; case getdataRequestCid: BEncEocIfNec (b); l = getdataRequest->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 13); break; case getdataResultEntryCid: BEncEocIfNec (b); l = getdataResultEntry->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 14); break; case getdataResultDoneCid: BEncEocIfNec (b); l = getdataResultDone->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 15); break; case closeRequestCid: BEncEocIfNec (b); l = closeRequest->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 16); break; case closeResponseCid: BEncEocIfNec (b); l = closeResponse->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 17); break; case destroyRequestCid: BEncEocIfNec (b); l = destroyRequest->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 18); break; case destroyResponseCid: BEncEocIfNec (b); l = destroyResponse->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 19); break; case disconnectRequestCid: BEncEocIfNec (b); l = disconnectRequest->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 20); break; case disconnectResponseCid: BEncEocIfNec (b); l = disconnectResponse->BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, APPL, CONS, 21); break; } // end switch return l; } // PSESQLMessageChoice::BEncContent void PSESQLMessageChoice::BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { switch (tag) { case MAKE_TAG_ID (APPL, CONS, 0): choiceId = connectRequestCid; connectRequest = new ConnectRequest; connectRequest->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 1): choiceId = connectResponseCid; connectResponse = new ConnectResponse; connectResponse->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 2): choiceId = prepareRequestCid; prepareRequest = new PrepareRequest; prepareRequest->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 3): choiceId = prepareResponseCid; prepareResponse = new PrepareResponse; prepareResponse->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 4): choiceId = bindRequestCid; bindRequest = new BindRequest; bindRequest->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 5): choiceId = bindResponseCid; bindResponse = new BindResponse; bindResponse->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 6): choiceId = executeRequestCid; executeRequest = new ExecuteRequest; executeRequest->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 7): choiceId = executeResponseCid; executeResponse = new ExecuteResponse; executeResponse->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 8): choiceId = cancelRequestCid; cancelRequest = new CancelRequest; cancelRequest->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 9): choiceId = cancelResponseCid; cancelResponse = new CancelResponse; cancelResponse->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 10): choiceId = fetchRequestCid; fetchRequest = new FetchRequest; fetchRequest->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 11): choiceId = fetchResultEntryCid; fetchResultEntry = new FetchResultEntry; fetchResultEntry->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 12): choiceId = fetchResultDoneCid; fetchResultDone = new FetchResultDone; fetchResultDone->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 13): choiceId = getdataRequestCid; getdataRequest = new GetdataRequest; getdataRequest->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 14): choiceId = getdataResultEntryCid; getdataResultEntry = new GetdataResultEntry; getdataResultEntry->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 15): choiceId = getdataResultDoneCid; getdataResultDone = new GetdataResultDone; getdataResultDone->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 16): choiceId = closeRequestCid; closeRequest = new CloseRequest; closeRequest->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 17): choiceId = closeResponseCid; closeResponse = new CloseResponse; closeResponse->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 18): choiceId = destroyRequestCid; destroyRequest = new DestroyRequest; destroyRequest->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 19): choiceId = destroyResponseCid; destroyResponse = new DestroyResponse; destroyResponse->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 20): choiceId = disconnectRequestCid; disconnectRequest = new DisconnectRequest; disconnectRequest->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; case MAKE_TAG_ID (APPL, CONS, 21): choiceId = disconnectResponseCid; disconnectResponse = new DisconnectResponse; disconnectResponse->BDecContent (b, tag, elmtLen0, bytesDecoded, env); break; default: Asn1Error << "ERROR - unexpected tag in CHOICE" << endl; longjmp (env, -200); break; } // end switch } // PSESQLMessageChoice::BDecContent AsnLen PSESQLMessageChoice::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); return l; } void PSESQLMessageChoice::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnLen elmtLen; AsnTag tag; /* CHOICEs are a special case - grab identifying tag */ /* this allows easier handling of nested CHOICEs */ tag = BDecTag (b, bytesDecoded, env); elmtLen = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen, bytesDecoded, env); } int PSESQLMessageChoice::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int PSESQLMessageChoice::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void PSESQLMessageChoice::Print (ostream &os) const { switch (choiceId) { case connectRequestCid: os << "connectRequest "; if (connectRequest) os << *connectRequest; else os << "-- void3 --\n"; break; case connectResponseCid: os << "connectResponse "; if (connectResponse) os << *connectResponse; else os << "-- void3 --\n"; break; case prepareRequestCid: os << "prepareRequest "; if (prepareRequest) os << *prepareRequest; else os << "-- void3 --\n"; break; case prepareResponseCid: os << "prepareResponse "; if (prepareResponse) os << *prepareResponse; else os << "-- void3 --\n"; break; case bindRequestCid: os << "bindRequest "; if (bindRequest) os << *bindRequest; else os << "-- void3 --\n"; break; case bindResponseCid: os << "bindResponse "; if (bindResponse) os << *bindResponse; else os << "-- void3 --\n"; break; case executeRequestCid: os << "executeRequest "; if (executeRequest) os << *executeRequest; else os << "-- void3 --\n"; break; case executeResponseCid: os << "executeResponse "; if (executeResponse) os << *executeResponse; else os << "-- void3 --\n"; break; case cancelRequestCid: os << "cancelRequest "; if (cancelRequest) os << *cancelRequest; else os << "-- void3 --\n"; break; case cancelResponseCid: os << "cancelResponse "; if (cancelResponse) os << *cancelResponse; else os << "-- void3 --\n"; break; case fetchRequestCid: os << "fetchRequest "; if (fetchRequest) os << *fetchRequest; else os << "-- void3 --\n"; break; case fetchResultEntryCid: os << "fetchResultEntry "; if (fetchResultEntry) os << *fetchResultEntry; else os << "-- void3 --\n"; break; case fetchResultDoneCid: os << "fetchResultDone "; if (fetchResultDone) os << *fetchResultDone; else os << "-- void3 --\n"; break; case getdataRequestCid: os << "getdataRequest "; if (getdataRequest) os << *getdataRequest; else os << "-- void3 --\n"; break; case getdataResultEntryCid: os << "getdataResultEntry "; if (getdataResultEntry) os << *getdataResultEntry; else os << "-- void3 --\n"; break; case getdataResultDoneCid: os << "getdataResultDone "; if (getdataResultDone) os << *getdataResultDone; else os << "-- void3 --\n"; break; case closeRequestCid: os << "closeRequest "; if (closeRequest) os << *closeRequest; else os << "-- void3 --\n"; break; case closeResponseCid: os << "closeResponse "; if (closeResponse) os << *closeResponse; else os << "-- void3 --\n"; break; case destroyRequestCid: os << "destroyRequest "; if (destroyRequest) os << *destroyRequest; else os << "-- void3 --\n"; break; case destroyResponseCid: os << "destroyResponse "; if (destroyResponse) os << *destroyResponse; else os << "-- void3 --\n"; break; case disconnectRequestCid: os << "disconnectRequest "; if (disconnectRequest) os << *disconnectRequest; else os << "-- void3 --\n"; break; case disconnectResponseCid: os << "disconnectResponse "; if (disconnectResponse) os << *disconnectResponse; else os << "-- void3 --\n"; break; } // end of switch } // PSESQLMessageChoice::Print PSESQLMessage::PSESQLMessage() { #if TCL protocolOp = new PSESQLMessageChoice; #else protocolOp = NULL; // incomplete initialization of mandatory element! #endif // TCL } PSESQLMessage::PSESQLMessage (const PSESQLMessage &) { Asn1Error << "use of incompletely defined PSESQLMessage::PSESQLMessage (const PSESQLMessage &)" << endl; abort(); } PSESQLMessage::~PSESQLMessage() { delete protocolOp; } AsnType *PSESQLMessage::Clone() const { return new PSESQLMessage; } #if SNACC_DEEP_COPY PSESQLMessage &PSESQLMessage::operator = (const PSESQLMessage &that) #else // SNACC_DEEP_COPY PSESQLMessage &PSESQLMessage::operator = (const PSESQLMessage &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { messageID = that.messageID; if (that.protocolOp) { if (!protocolOp) protocolOp = new PSESQLMessageChoice; *protocolOp = *that.protocolOp; } else { delete protocolOp; protocolOp = NULL; } } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined PSESQLMessage &PSESQLMessage::operator = (const PSESQLMessage &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } AsnLen PSESQLMessage::BEncContent (BUF_TYPE b) { AsnLen totalLen = 0; AsnLen l; l = protocolOp->BEncContent (b); totalLen += l; l = messageID.BEncContent (b); BEncDefLenTo127 (b, l); l++; l += BEncTag1 (b, UNIV, PRIM, INTEGER_TAG_CODE); totalLen += l; return totalLen; } // PSESQLMessage::BEncContent void PSESQLMessage::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag1; AsnLen seqBytesDecoded = 0; AsnLen elmtLen1; tag1 = BDecTag (b, seqBytesDecoded, env); if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, INTEGER_TAG_CODE))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); messageID.BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); tag1 = BDecTag (b, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -201); } if ((tag1 == MAKE_TAG_ID (APPL, CONS, 0)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 1)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 2)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 3)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 4)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 5)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 6)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 7)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 8)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 9)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 10)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 11)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 12)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 13)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 14)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 15)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 16)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 17)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 18)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 19)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 20)) || (tag1 == MAKE_TAG_ID (APPL, CONS, 21))) { elmtLen1 = BDecLen (b, seqBytesDecoded, env); protocolOp = new PSESQLMessageChoice; protocolOp->BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env); } else { Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl; longjmp (env, -202); } bytesDecoded += seqBytesDecoded; if (elmtLen0 == INDEFINITE_LEN) { BDecEoc (b, bytesDecoded, env); return; } else if (seqBytesDecoded != elmtLen0) { Asn1Error << "ERROR - Length discrepancy on sequence." << endl; longjmp (env, -203); } else return; } // PSESQLMessage::BDecContent AsnLen PSESQLMessage::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, UNIV, CONS, SEQ_TAG_CODE); return l; } void PSESQLMessage::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)) { Asn1Error << "PSESQLMessage::BDec: ERROR - wrong tag" << endl; longjmp (env, -204); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } int PSESQLMessage::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded) { bytesEncoded = BEnc (b); return !b.WriteError(); } int PSESQLMessage::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded) { ENV_TYPE env; int val; bytesDecoded = 0; if ((val = setjmp (env)) == 0) { BDec (b, bytesDecoded, env); return !b.ReadError(); } else return false; } void PSESQLMessage::Print (ostream &os) const { os << "{ -- SEQUENCE --" << endl; indentG += stdIndentG; { Indent (os, indentG); os << "messageID "; os << messageID; os << "," << endl; } if (NOT_NULL (protocolOp)) { Indent (os, indentG); os << "protocolOp "; os << *protocolOp; } else { Indent (os, indentG); os << "protocolOp "; os << "-- void --"; os << endl; } os << endl; indentG -= stdIndentG; Indent (os, indentG); os << "}"; } // PSESQLMessage::Print AsnType *PSESQLCommands::Clone() const { return new PSESQLCommands; } AsnLen PSESQLCommands::BEnc (BUF_TYPE b) { AsnLen l; l = BEncContent (b); l += BEncConsLen (b, l); l += BEncTag1 (b, UNIV, CONS, SEQ_TAG_CODE); return l; } void PSESQLCommands::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env) { AsnTag tag; AsnLen elmtLen1; if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE)) { Asn1Error << "PSESQLCommands::BDec: ERROR - wrong tag" << endl; longjmp (env, -205); } elmtLen1 = BDecLen (b, bytesDecoded, env); BDecContent (b, tag, elmtLen1, bytesDecoded, env); } PSESQLCommands::PSESQLCommands (const PSESQLCommands &) { Asn1Error << "use of incompletely defined PSESQLCommands::PSESQLCommands (const PSESQLCommands &)" << endl; abort(); } PSESQLCommands::~PSESQLCommands() { SetCurrToFirst(); for (; Curr() != NULL; RemoveCurrFromList()) ; } // end of destructor #if SNACC_DEEP_COPY PSESQLCommands &PSESQLCommands::operator = (const PSESQLCommands &that) #else // SNACC_DEEP_COPY PSESQLCommands &PSESQLCommands::operator = (const PSESQLCommands &) #endif // SNACC_DEEP_COPY { #if SNACC_DEEP_COPY if (this != &that) { SetCurrToFirst(); for (; Curr(); RemoveCurrFromList()) ; //that.SetCurrToFirst(); //for (; that.Curr(); that.GoNext()) // AppendCopy (*that.Curr()); for (const AsnListElmt *run=that.first; run; run=run->next) AppendCopy (*run->elmt); } return *this; #else // SNACC_DEEP_COPY Asn1Error << "use of incompletely defined PSESQLCommands &PSESQLCommands::operator = (const PSESQLCommands &)" << endl; abort(); // if your compiler complains here, check the -novolat option #endif // SNACC_DEEP_COPY } void PSESQLCommands::Print (ostream &os) const { os << "{ -- SEQUENCE/SET OF -- " << endl; indentG += stdIndentG; //SetCurrToFirst(); //for (; Curr() != NULL; GoNext()) for (const AsnListElmt *run=first; run; run=run->next) { Indent (os, indentG); //os << *Curr(); os << *run->elmt; //if (Curr() != Last()) if (run != last) os << ","; os << endl; } indentG -= stdIndentG; Indent (os, indentG); os << "}\n"; } // Print void PSESQLCommands::SetCurrElmt (unsigned long int index) { unsigned long int i; curr = first; if (count) for (i = 0; (i < (count-1)) && (i < index); i++) curr = curr->next; } // PSESQLCommands::SetCurrElmt unsigned long int PSESQLCommands::GetCurrElmtIndex() { unsigned long int i; AsnListElmt *tmp; if (curr != NULL) { for (i = 0, tmp = first; tmp != NULL; i++) { if (tmp == curr) return i; else tmp = tmp->next; } } return count; } // PSESQLCommands::GetCurrElmtIndex // alloc new list elmt, put at end of list // and return the component type PSESQLMessage *PSESQLCommands::Append() { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new PSESQLMessage; newElmt->next = NULL; if (last == NULL) { newElmt->prev = NULL; first = last = newElmt; } else { newElmt->prev = last; last->next = newElmt; last = newElmt; } count++; return (curr = newElmt)->elmt; } // PSESQLCommands::Append // alloc new list elmt, put at begining of list // and return the component type PSESQLMessage *PSESQLCommands::Prepend() { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new PSESQLMessage; newElmt->prev = NULL; if (first == NULL) { newElmt->next = NULL; first = last = newElmt; } else { newElmt->next = first; first->prev = newElmt; first = newElmt; } count++; return (curr = newElmt)->elmt; } // PSESQLCommands::Prepend // alloc new list elmt, insert it before the // current element and return the component type // if the current element is null, the new element // is placed at the beginning of the list. PSESQLMessage *PSESQLCommands::InsertBefore() { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new PSESQLMessage; if (curr == NULL) { newElmt->next = first; newElmt->prev = NULL; first = newElmt; if (last == NULL) last = newElmt; } else { newElmt->next = curr; newElmt->prev = curr->prev; curr->prev = newElmt; if (curr == first) first = newElmt; else newElmt->prev->next = newElmt; } count++; return (curr = newElmt)->elmt; } // PSESQLCommands::InsertBefore // alloc new list elmt, insert it after the // current element and return the component type // if the current element is null, the new element // is placed at the end of the list. PSESQLMessage *PSESQLCommands::InsertAfter() { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new PSESQLMessage; if (curr == NULL) { newElmt->prev = last; newElmt->next = NULL; last = newElmt; if (first == NULL) first = newElmt; } else { newElmt->prev = curr; newElmt->next = curr->next; curr->next = newElmt; if (curr == last) last = newElmt; else newElmt->next->prev = newElmt; } count++; return (curr = newElmt)->elmt; } // PSESQLCommands::InsertAfter PSESQLCommands &PSESQLCommands::AppendCopy (PSESQLMessage &elmt) { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new PSESQLMessage; *newElmt->elmt = elmt; newElmt->next = NULL; if (last == NULL) { newElmt->prev = NULL; first = last = newElmt; } else { newElmt->prev = last; last->next = newElmt; last = newElmt; } count++; return *this; } // AppendCopy PSESQLCommands &PSESQLCommands::PrependCopy (PSESQLMessage &elmt) { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new PSESQLMessage; *newElmt->elmt = elmt; newElmt->prev = NULL; if (first == NULL) { newElmt->next = NULL; first = last = newElmt; } else { newElmt->next = first; first->prev = newElmt; first = newElmt; } count++; return *this; } // PSESQLCommands::PrependCopy // alloc new list elmt, insert it before the // current element, copy the given elmt into the new elmt // and return the component type. // if the current element is null, the new element // is placed at the beginning of the list. PSESQLCommands &PSESQLCommands::InsertBeforeAndCopy (PSESQLMessage &elmt) { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new PSESQLMessage; *newElmt->elmt = elmt; if (curr == NULL) { newElmt->next = first; newElmt->prev = NULL; first = newElmt; if (last == NULL) last = newElmt; } else { newElmt->next = curr; newElmt->prev = curr->prev; curr->prev = newElmt; if (curr == first) first = newElmt; else newElmt->prev->next = newElmt; } count++; return *this; } // PSESQLCommands::InsertBeforeAndCopy // alloc new list elmt, insert it after the // current element, copy given elmt in to new elmt // and return the component type // if the current element is null, the new element // is placed at the end of the list. PSESQLCommands &PSESQLCommands::InsertAfterAndCopy (PSESQLMessage &elmt) { AsnListElmt *newElmt; newElmt = new AsnListElmt; newElmt->elmt = new PSESQLMessage; *newElmt->elmt = elmt; if (curr == NULL) { newElmt->prev = last; newElmt->next = NULL; last = newElmt; if (first == NULL) first = newElmt; } else { newElmt->prev = curr; newElmt->next = curr->next; curr->next = newElmt; if (curr == last) last = newElmt; else newElmt->next->prev = newElmt; } count++; return *this; } // PSESQLCommands::InsertAfterAndCopy // remove current element from list if current element is not NULL // The new current element will be the next element. // If the current element is the last element in the list // the second but last element will become the new current element. void PSESQLCommands::RemoveCurrFromList() { AsnListElmt *del_elmt; if (curr != NULL) { del_elmt = curr; count--; if (count == 0) first = last = curr = NULL; else if (curr == first) { curr = first= first->next; first->prev = NULL; } else if (curr == last) { curr = last = last->prev; last->next = NULL; } else { curr->prev->next = curr->next; curr->next->prev = curr->prev; } delete del_elmt->elmt; delete del_elmt; } } AsnLen PSESQLCommands::BEncContent (BUF_TYPE b) { AsnListElmt *currElmt; AsnLen elmtLen; AsnLen totalLen = 0; //////////////////////////////////////////////////////// // Change for encoding the embedded list // Change by Ranjeet. for (const AsnListElmt *run=first; run; run=run->next) { (run->elmt)->BEncPdu(b, elmtLen); totalLen += elmtLen; } // end of change //////////////////////////////////////////////////////// return totalLen; } // PSESQLCommands::BEncContent void PSESQLCommands::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env) { PSESQLMessage *listElmt; AsnTag tag1; AsnLen listBytesDecoded = 0; AsnLen elmtLen1; while ((listBytesDecoded < elmtLen0) || (elmtLen0 == INDEFINITE_LEN)) { tag1 = BDecTag (b, listBytesDecoded, env); if ((tag1 == EOC_TAG_ID) && (elmtLen0 == INDEFINITE_LEN)) { BDEC_2ND_EOC_OCTET (b, listBytesDecoded, env); break; } if ((tag1 != MAKE_TAG_ID (UNIV, CONS, SEQ_TAG_CODE))) { Asn1Error << "Unexpected Tag" << endl; longjmp (env, -206); } elmtLen1 = BDecLen (b, listBytesDecoded, env); listElmt = Append(); listElmt->BDecContent (b, tag1, elmtLen1, listBytesDecoded, env); } bytesDecoded += listBytesDecoded; } // PSESQLCommands::BDecContent