ASN1C C/C++ Common Runtime  ASN1C v7.8.x
ASN1TOctStr.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1997-2022 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 
83  numocts = _os.numocts;
84  data = _os.data;
85  }
86 
94  ASN1TDynOctStr (const char* cstring) {
95  if (strlen(cstring) > 0) {
96  numocts = (OSUINT32)strlen(cstring) + 1;
97  data = (const OSOCTET*) cstring;
98  }
99  else numocts = 0;
100  }
101 
109  ASN1TDynOctStr& operator= (const char* cstring) {
110  if (strlen(cstring) > 0) {
111  numocts = (OSUINT32)strlen(cstring) + 1;
112  data = (const OSOCTET*) cstring;
113  }
114  else numocts = 0;
115  return *this;
116  }
117 
124  EXTRTMETHOD ASN1TDynOctStr& operator=(const ASN1TDynOctStr& octet);
125 
135  EXTRTMETHOD const char* toString (OSCTXT* pctxt) const;
136 
143  EXTRTMETHOD const char* toHexString (OSCTXT* pctxt) const;
144 
155  EXTRTMETHOD int nCompare (OSUINT32 n, const ASN1TDynOctStr &o) const;
156 
157 } ;
158 
159 //operator==
160 
170 EXTERNRT int operator==(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
171 
181 EXTERNRT int operator==(const ASN1TDynOctStr &lhs,const char *string);
182 
192 EXTERNRT int operator==(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
193 
203 EXTERNRT int operator==(const ASN1DynOctStr &lhs,const char *string);
204 
205 //operator !=
206 
216 EXTERNRT int operator!=(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
217 
227 EXTERNRT int operator!=(const ASN1TDynOctStr &lhs,const char *string);
228 
238 EXTERNRT int operator!=(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
239 
249 EXTERNRT int operator!=(const ASN1DynOctStr &lhs,const char *string);
250 
251 //operator <
252 
262 EXTERNRT int operator<(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
263 
273 EXTERNRT int operator<(const ASN1TDynOctStr &lhs,const char *string);
274 
284 EXTERNRT int operator<(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
285 
295 EXTERNRT int operator<(const ASN1DynOctStr &lhs,const char *string);
296 
297 //operator <=
298 
308 EXTERNRT int operator<=(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
309 
319 EXTERNRT int operator<=(const ASN1TDynOctStr &lhs,const char *string);
320 
330 EXTERNRT int operator<=(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
331 
341 EXTERNRT int operator<=(const ASN1DynOctStr &lhs,const char *string);
342 
343  //operator >
344 
354 EXTERNRT int operator>(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
355 
365 EXTERNRT int operator>(const ASN1TDynOctStr &lhs,const char *string);
366 
376 EXTERNRT int operator>(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
377 
387 EXTERNRT int operator>(const ASN1DynOctStr &lhs,const char *string);
388 
389 //operator >=
390 
400 EXTERNRT int operator>=(const ASN1TDynOctStr &lhs,const ASN1TDynOctStr &rhs);
401 
411 EXTERNRT int operator>=(const ASN1TDynOctStr &lhs,const char *string);
412 
422 EXTERNRT int operator>=(const ASN1DynOctStr &lhs,const ASN1DynOctStr &rhs);
423 
433 EXTERNRT int operator>=(const ASN1DynOctStr &lhs,const char *string);
434 
435 #endif
436 
int operator!=(const ASN1TDynOctStr &lhs, const ASN1TDynOctStr &rhs)
ASN1TDynOctStr(const ASN1DynOctStr &_os)
Definition: ASN1TOctStr.h:72
ASN1TDynOctStr(OSUINT32 _numocts, const OSOCTET *_data)
Definition: ASN1TOctStr.h:61
ASN1TDynOctStr(const char *cstring)
Definition: ASN1TOctStr.h:94
ASN1TDynOctStr(const ASN1TDynOctStr &_os)
Definition: ASN1TOctStr.h:82
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:198
int operator>=(const ASN1TDynOctStr &lhs, const ASN1TDynOctStr &rhs)
#define ASN1DynOctStr
Definition: asn1type.h:524
int operator==(const ASN1TDynOctStr &lhs, const ASN1TDynOctStr &rhs)
ASN1TDynOctStr()
Definition: ASN1TOctStr.h:52