ASN1C C/C++ Common Runtime  ASN1C v7.4.x
ASN1TOctStr.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1997-2020 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
24 //
25 // CHANGE LOG
26 // Date Init Description
27 //
29 
33 #ifndef _ASN1TOCTSTR_H_
34 #define _ASN1TOCTSTR_H_
35 
36 #include "rtsrc/asn1type.h"
48 struct EXTRTCLASS ASN1TDynOctStr : public ASN1DynOctStr {
52  ASN1TDynOctStr () { numocts = 0; data = 0; }
53 
61  ASN1TDynOctStr (OSUINT32 _numocts, const OSOCTET* _data) {
62  numocts = _numocts;
63  data = _data;
64  }
65 
73  numocts = _os.numocts;
74  data = _os.data;
75  }
76 
84  ASN1TDynOctStr (const char* cstring) {
85  if (strlen(cstring) > 0) {
86  numocts = (OSUINT32)strlen(cstring) + 1;
87  data = (const OSOCTET*) cstring;
88  }
89  else numocts = 0;
90  }
91 
99  ASN1TDynOctStr& operator= (const char* cstring) {
100  if (strlen(cstring) > 0) {
101  numocts = (OSUINT32)strlen(cstring) + 1;
102  data = (const OSOCTET*) cstring;
103  }
104  else numocts = 0;
105  return *this;
106  }
107 
114  EXTRTMETHOD ASN1TDynOctStr& operator=(const ASN1TDynOctStr& octet);
115 
125  EXTRTMETHOD const char* toString (OSCTXT* pctxt) const;
126 
133  EXTRTMETHOD const char* toHexString (OSCTXT* pctxt) const;
134 
145  EXTRTMETHOD int nCompare (OSUINT32 n, const ASN1TDynOctStr &o) const;
146 
147 } ;
148 
149 //operator==
150 
160 EXTERNRT int operator==(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
161 
171 EXTERNRT int operator==(const ASN1TDynOctStr &lhs,const char *string);
172 
182 EXTERNRT int operator==(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
183 
193 EXTERNRT int operator==(const ASN1DynOctStr &lhs,const char *string);
194 
195 //operator !=
196 
206 EXTERNRT int operator!=(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
207 
217 EXTERNRT int operator!=(const ASN1TDynOctStr &lhs,const char *string);
218 
228 EXTERNRT int operator!=(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
229 
239 EXTERNRT int operator!=(const ASN1DynOctStr &lhs,const char *string);
240 
241 //operator <
242 
252 EXTERNRT int operator<(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
253 
263 EXTERNRT int operator<(const ASN1TDynOctStr &lhs,const char *string);
264 
274 EXTERNRT int operator<(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
275 
285 EXTERNRT int operator<(const ASN1DynOctStr &lhs,const char *string);
286 
287 //operator <=
288 
298 EXTERNRT int operator<=(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
299 
309 EXTERNRT int operator<=(const ASN1TDynOctStr &lhs,const char *string);
310 
320 EXTERNRT int operator<=(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
321 
331 EXTERNRT int operator<=(const ASN1DynOctStr &lhs,const char *string);
332 
333  //operator >
334 
344 EXTERNRT int operator>(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
345 
355 EXTERNRT int operator>(const ASN1TDynOctStr &lhs,const char *string);
356 
366 EXTERNRT int operator>(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
367 
377 EXTERNRT int operator>(const ASN1DynOctStr &lhs,const char *string);
378 
379 //operator >=
380 
390 EXTERNRT int operator>=(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
391 
401 EXTERNRT int operator>=(const ASN1TDynOctStr &lhs,const char *string);
402 
412 EXTERNRT int operator>=(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
413 
423 EXTERNRT int operator>=(const ASN1DynOctStr &lhs,const char *string);
424 
425 #endif
426 
int operator!=(const ASN1TDynOctStr &lhs, const ASN1TDynOctStr &rhs)
ASN1TDynOctStr(OSUINT32 _numocts, const OSOCTET *_data)
Definition: ASN1TOctStr.h:61
ASN1TDynOctStr(ASN1DynOctStr &_os)
Definition: ASN1TOctStr.h:72
ASN1TDynOctStr(const char *cstring)
Definition: ASN1TOctStr.h:84
Definition: ASN1TOctStr.h:48
int operator>(const ASN1TDynOctStr &lhs, const ASN1TDynOctStr &rhs)
int operator<(const ASN1TDynOctStr &lhs, const ASN1TDynOctStr &rhs)
int operator<=(const ASN1TDynOctStr &lhs, const ASN1TDynOctStr &rhs)
Definition: rtxContext.h:189
int operator>=(const ASN1TDynOctStr &lhs, const ASN1TDynOctStr &rhs)
#define ASN1DynOctStr
Definition: asn1type.h:418
int operator==(const ASN1TDynOctStr &lhs, const ASN1TDynOctStr &rhs)
ASN1TDynOctStr()
Definition: ASN1TOctStr.h:52