00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00029
00033 #ifndef _ASN1TOCTSTR_H_
00034 #define _ASN1TOCTSTR_H_
00035
00036 #include "rtsrc/asn1type.h"
00048 struct EXTRTCLASS ASN1TDynOctStr : public ASN1DynOctStr {
00052 ASN1TDynOctStr () { numocts = 0; data = 0; }
00053
00061 ASN1TDynOctStr (OSUINT32 _numocts, const OSOCTET* _data) {
00062 numocts = _numocts;
00063 data = _data;
00064 }
00065
00072 ASN1TDynOctStr (ASN1DynOctStr& _os) {
00073 numocts = _os.numocts;
00074 data = _os.data;
00075 }
00076
00084 ASN1TDynOctStr (const char* cstring) {
00085 if (strlen(cstring) > 0) {
00086 numocts = (OSUINT32)strlen(cstring) + 1;
00087 data = (const OSOCTET*) cstring;
00088 }
00089 else numocts = 0;
00090 }
00091
00099 ASN1TDynOctStr& operator= (const char* cstring) {
00100 if (strlen(cstring) > 0) {
00101 numocts = (OSUINT32)strlen(cstring) + 1;
00102 data = (const OSOCTET*) cstring;
00103 }
00104 else numocts = 0;
00105 return *this;
00106 }
00107
00114 EXTRTMETHOD ASN1TDynOctStr& operator=(const ASN1TDynOctStr& octet);
00115
00125 EXTRTMETHOD const char* toString (OSCTXT* pctxt) const;
00126
00133 EXTRTMETHOD const char* toHexString (OSCTXT* pctxt) const;
00134
00145 EXTRTMETHOD int nCompare (OSUINT32 n, const ASN1TDynOctStr &o) const;
00146
00147 } ;
00148
00149
00150
00151 EXTERNRT int operator==(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
00152 EXTERNRT int operator==(const ASN1TDynOctStr &lhs,const char *string);
00153 EXTERNRT int operator==(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
00154 EXTERNRT int operator==(const ASN1DynOctStr &lhs,const char *string);
00155
00156
00157
00158 EXTERNRT int operator!=(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
00159 EXTERNRT int operator!=(const ASN1TDynOctStr &lhs,const char *string);
00160 EXTERNRT int operator!=(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
00161 EXTERNRT int operator!=(const ASN1DynOctStr &lhs,const char *string);
00162
00163
00164
00165 EXTERNRT int operator<(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
00166 EXTERNRT int operator<(const ASN1TDynOctStr &lhs,const char *string);
00167 EXTERNRT int operator<(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
00168 EXTERNRT int operator<(const ASN1DynOctStr &lhs,const char *string);
00169
00170
00171
00172 EXTERNRT int operator<=(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
00173 EXTERNRT int operator<=(const ASN1TDynOctStr &lhs,const char *string);
00174 EXTERNRT int operator<=(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
00175 EXTERNRT int operator<=(const ASN1DynOctStr &lhs,const char *string);
00176
00177
00178
00179 EXTERNRT int operator>(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
00180 EXTERNRT int operator>(const ASN1TDynOctStr &lhs,const char *string);
00181 EXTERNRT int operator>(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
00182 EXTERNRT int operator>(const ASN1DynOctStr &lhs,const char *string);
00183
00184
00185
00186 EXTERNRT int operator>=(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
00187 EXTERNRT int operator>=(const ASN1TDynOctStr &lhs,const char *string);
00188 EXTERNRT int operator>=(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
00189 EXTERNRT int operator>=(const ASN1DynOctStr &lhs,const char *string);
00190
00191 #endif
00192