D:/Storage/CVS_Head/h323plus/src/h235_t.cxx

00001 //
00002 // h235_t.cxx
00003 //
00004 // Code automatically generated by asnparse.
00005 //
00006 
00007 //
00008 // SIGNED
00009 //
00010 
00011 template <class ToBeSigned>
00012 H235_SIGNED<ToBeSigned>::H235_SIGNED(unsigned tag, PASN_Object::TagClass tagClass)
00013   : PASN_Sequence(tag, tagClass, 0, FALSE, 0)
00014 {
00015 }
00016 
00017 
00018 #ifndef PASN_NOPRINTON
00019 template <class ToBeSigned>
00020 void H235_SIGNED<ToBeSigned>::PrintOn(ostream & strm) const
00021 {
00022   int indent = strm.precision() + 2;
00023   strm << "{\n";
00024   strm << setw(indent+13) << "toBeSigned = " << setprecision(indent) << m_toBeSigned << '\n';
00025   strm << setw(indent+15) << "algorithmOID = " << setprecision(indent) << m_algorithmOID << '\n';
00026   strm << setw(indent+9) << "paramS = " << setprecision(indent) << m_paramS << '\n';
00027   strm << setw(indent+12) << "signature = " << setprecision(indent) << m_signature << '\n';
00028   strm << setw(indent-1) << setprecision(indent-2) << "}";
00029 }
00030 #endif
00031 
00032 
00033 template <class ToBeSigned>
00034 PObject::Comparison H235_SIGNED<ToBeSigned>::Compare(const PObject & obj) const
00035 {
00036 #ifndef PASN_LEANANDMEAN
00037   PAssert(PIsDescendant(&obj, H235_SIGNED<ToBeSigned>), PInvalidCast);
00038 #endif
00039   const H235_SIGNED<ToBeSigned> & other = (const H235_SIGNED<ToBeSigned> &)obj;
00040 
00041   Comparison result;
00042 
00043   if ((result = m_toBeSigned.Compare(other.m_toBeSigned)) != EqualTo)
00044     return result;
00045   if ((result = m_algorithmOID.Compare(other.m_algorithmOID)) != EqualTo)
00046     return result;
00047   if ((result = m_paramS.Compare(other.m_paramS)) != EqualTo)
00048     return result;
00049   if ((result = m_signature.Compare(other.m_signature)) != EqualTo)
00050     return result;
00051 
00052   return PASN_Sequence::Compare(other);
00053 }
00054 
00055 
00056 template <class ToBeSigned>
00057 PINDEX H235_SIGNED<ToBeSigned>::GetDataLength() const
00058 {
00059   PINDEX length = 0;
00060   length += m_toBeSigned.GetObjectLength();
00061   length += m_algorithmOID.GetObjectLength();
00062   length += m_paramS.GetObjectLength();
00063   length += m_signature.GetObjectLength();
00064   return length;
00065 }
00066 
00067 
00068 template <class ToBeSigned>
00069 BOOL H235_SIGNED<ToBeSigned>::Decode(PASN_Stream & strm)
00070 {
00071   if (!PreambleDecode(strm))
00072     return FALSE;
00073 
00074   if (!m_toBeSigned.Decode(strm))
00075     return FALSE;
00076   if (!m_algorithmOID.Decode(strm))
00077     return FALSE;
00078   if (!m_paramS.Decode(strm))
00079     return FALSE;
00080   if (!m_signature.Decode(strm))
00081     return FALSE;
00082 
00083   return UnknownExtensionsDecode(strm);
00084 }
00085 
00086 
00087 template <class ToBeSigned>
00088 void H235_SIGNED<ToBeSigned>::Encode(PASN_Stream & strm) const
00089 {
00090   PreambleEncode(strm);
00091 
00092   m_toBeSigned.Encode(strm);
00093   m_algorithmOID.Encode(strm);
00094   m_paramS.Encode(strm);
00095   m_signature.Encode(strm);
00096 
00097   UnknownExtensionsEncode(strm);
00098 }
00099 
00100 
00101 template <class ToBeSigned>
00102 PObject * H235_SIGNED<ToBeSigned>::Clone() const
00103 {
00104 #ifndef PASN_LEANANDMEAN
00105   PAssert(IsClass(H235_SIGNED<ToBeSigned>::Class()), PInvalidCast);
00106 #endif
00107   return new H235_SIGNED<ToBeSigned>(*this);
00108 }
00109 
00110 
00111 //
00112 // ENCRYPTED
00113 //
00114 
00115 template <class ToBeEncrypted>
00116 H235_ENCRYPTED<ToBeEncrypted>::H235_ENCRYPTED(unsigned tag, PASN_Object::TagClass tagClass)
00117   : PASN_Sequence(tag, tagClass, 0, FALSE, 0)
00118 {
00119 }
00120 
00121 
00122 #ifndef PASN_NOPRINTON
00123 template <class ToBeEncrypted>
00124 void H235_ENCRYPTED<ToBeEncrypted>::PrintOn(ostream & strm) const
00125 {
00126   int indent = strm.precision() + 2;
00127   strm << "{\n";
00128   strm << setw(indent+15) << "algorithmOID = " << setprecision(indent) << m_algorithmOID << '\n';
00129   strm << setw(indent+9) << "paramS = " << setprecision(indent) << m_paramS << '\n';
00130   strm << setw(indent+16) << "encryptedData = " << setprecision(indent) << m_encryptedData << '\n';
00131   strm << setw(indent-1) << setprecision(indent-2) << "}";
00132 }
00133 #endif
00134 
00135 
00136 template <class ToBeEncrypted>
00137 PObject::Comparison H235_ENCRYPTED<ToBeEncrypted>::Compare(const PObject & obj) const
00138 {
00139 #ifndef PASN_LEANANDMEAN
00140   PAssert(PIsDescendant(&obj, H235_ENCRYPTED<ToBeEncrypted>), PInvalidCast);
00141 #endif
00142   const H235_ENCRYPTED<ToBeEncrypted> & other = (const H235_ENCRYPTED<ToBeEncrypted> &)obj;
00143 
00144   Comparison result;
00145 
00146   if ((result = m_algorithmOID.Compare(other.m_algorithmOID)) != EqualTo)
00147     return result;
00148   if ((result = m_paramS.Compare(other.m_paramS)) != EqualTo)
00149     return result;
00150   if ((result = m_encryptedData.Compare(other.m_encryptedData)) != EqualTo)
00151     return result;
00152 
00153   return PASN_Sequence::Compare(other);
00154 }
00155 
00156 
00157 template <class ToBeEncrypted>
00158 PINDEX H235_ENCRYPTED<ToBeEncrypted>::GetDataLength() const
00159 {
00160   PINDEX length = 0;
00161   length += m_algorithmOID.GetObjectLength();
00162   length += m_paramS.GetObjectLength();
00163   length += m_encryptedData.GetObjectLength();
00164   return length;
00165 }
00166 
00167 
00168 template <class ToBeEncrypted>
00169 BOOL H235_ENCRYPTED<ToBeEncrypted>::Decode(PASN_Stream & strm)
00170 {
00171   if (!PreambleDecode(strm))
00172     return FALSE;
00173 
00174   if (!m_algorithmOID.Decode(strm))
00175     return FALSE;
00176   if (!m_paramS.Decode(strm))
00177     return FALSE;
00178   if (!m_encryptedData.Decode(strm))
00179     return FALSE;
00180 
00181   return UnknownExtensionsDecode(strm);
00182 }
00183 
00184 
00185 template <class ToBeEncrypted>
00186 void H235_ENCRYPTED<ToBeEncrypted>::Encode(PASN_Stream & strm) const
00187 {
00188   PreambleEncode(strm);
00189 
00190   m_algorithmOID.Encode(strm);
00191   m_paramS.Encode(strm);
00192   m_encryptedData.Encode(strm);
00193 
00194   UnknownExtensionsEncode(strm);
00195 }
00196 
00197 
00198 template <class ToBeEncrypted>
00199 PObject * H235_ENCRYPTED<ToBeEncrypted>::Clone() const
00200 {
00201 #ifndef PASN_LEANANDMEAN
00202   PAssert(IsClass(H235_ENCRYPTED<ToBeEncrypted>::Class()), PInvalidCast);
00203 #endif
00204   return new H235_ENCRYPTED<ToBeEncrypted>(*this);
00205 }
00206 
00207 
00208 //
00209 // HASHED
00210 //
00211 
00212 template <class ToBeHashed>
00213 H235_HASHED<ToBeHashed>::H235_HASHED(unsigned tag, PASN_Object::TagClass tagClass)
00214   : PASN_Sequence(tag, tagClass, 0, FALSE, 0)
00215 {
00216 }
00217 
00218 
00219 #ifndef PASN_NOPRINTON
00220 template <class ToBeHashed>
00221 void H235_HASHED<ToBeHashed>::PrintOn(ostream & strm) const
00222 {
00223   int indent = strm.precision() + 2;
00224   strm << "{\n";
00225   strm << setw(indent+15) << "algorithmOID = " << setprecision(indent) << m_algorithmOID << '\n';
00226   strm << setw(indent+9) << "paramS = " << setprecision(indent) << m_paramS << '\n';
00227   strm << setw(indent+7) << "hash = " << setprecision(indent) << m_hash << '\n';
00228   strm << setw(indent-1) << setprecision(indent-2) << "}";
00229 }
00230 #endif
00231 
00232 
00233 template <class ToBeHashed>
00234 PObject::Comparison H235_HASHED<ToBeHashed>::Compare(const PObject & obj) const
00235 {
00236 #ifndef PASN_LEANANDMEAN
00237   PAssert(PIsDescendant(&obj, H235_HASHED<ToBeHashed>), PInvalidCast);
00238 #endif
00239   const H235_HASHED<ToBeHashed> & other = (const H235_HASHED<ToBeHashed> &)obj;
00240 
00241   Comparison result;
00242 
00243   if ((result = m_algorithmOID.Compare(other.m_algorithmOID)) != EqualTo)
00244     return result;
00245   if ((result = m_paramS.Compare(other.m_paramS)) != EqualTo)
00246     return result;
00247   if ((result = m_hash.Compare(other.m_hash)) != EqualTo)
00248     return result;
00249 
00250   return PASN_Sequence::Compare(other);
00251 }
00252 
00253 
00254 template <class ToBeHashed>
00255 PINDEX H235_HASHED<ToBeHashed>::GetDataLength() const
00256 {
00257   PINDEX length = 0;
00258   length += m_algorithmOID.GetObjectLength();
00259   length += m_paramS.GetObjectLength();
00260   length += m_hash.GetObjectLength();
00261   return length;
00262 }
00263 
00264 
00265 template <class ToBeHashed>
00266 BOOL H235_HASHED<ToBeHashed>::Decode(PASN_Stream & strm)
00267 {
00268   if (!PreambleDecode(strm))
00269     return FALSE;
00270 
00271   if (!m_algorithmOID.Decode(strm))
00272     return FALSE;
00273   if (!m_paramS.Decode(strm))
00274     return FALSE;
00275   if (!m_hash.Decode(strm))
00276     return FALSE;
00277 
00278   return UnknownExtensionsDecode(strm);
00279 }
00280 
00281 
00282 template <class ToBeHashed>
00283 void H235_HASHED<ToBeHashed>::Encode(PASN_Stream & strm) const
00284 {
00285   PreambleEncode(strm);
00286 
00287   m_algorithmOID.Encode(strm);
00288   m_paramS.Encode(strm);
00289   m_hash.Encode(strm);
00290 
00291   UnknownExtensionsEncode(strm);
00292 }
00293 
00294 
00295 template <class ToBeHashed>
00296 PObject * H235_HASHED<ToBeHashed>::Clone() const
00297 {
00298 #ifndef PASN_LEANANDMEAN
00299   PAssert(IsClass(H235_HASHED<ToBeHashed>::Class()), PInvalidCast);
00300 #endif
00301   return new H235_HASHED<ToBeHashed>(*this);
00302 }
00303 
00304 
00305 
00306 // End of h235_t.cxx

Generated on Thu Oct 25 13:42:53 2007 for h323plus by  doxygen 1.5.2