ASN1C C/C++ Common Runtime  ASN1C v7.8.x
ASN1TObjId.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 _ASN1TOBJID_H_
34 #define _ASN1TOBJID_H_
35 
36 #include "rtsrc/asn1type.h"
37 
49 struct EXTRTCLASS ASN1TObjId : public ASN1OBJID {
53  ASN1TObjId () { numids = 0; }
54 
58  virtual EXTRTMETHOD ~ASN1TObjId ();
59 
67  EXTRTMETHOD ASN1TObjId (OSOCTET _numids, const OSUINT32* _subids);
68 
76  EXTRTMETHOD ASN1TObjId (const ASN1OBJID& oid);
77 
83  EXTRTMETHOD ASN1TObjId (const ASN1TObjId& oid);
84 
90  EXTRTMETHOD ASN1TObjId (const char *dotted_oid_string);
91 
97  EXTRTMETHOD ASN1TObjId& operator=(const char *dotted_oid_string);
98 
106  EXTRTMETHOD void operator= (const ASN1OBJID& rhs);
107 
114  EXTRTMETHOD void operator= (const ASN1TObjId& rhs);
115 
124  EXTRTMETHOD ASN1TObjId& operator+=(const char *dotted_oid_string);
125 
134  EXTRTMETHOD ASN1TObjId& operator+=(const OSUINT32 i);
135 
144  EXTRTMETHOD ASN1TObjId& operator+=(const ASN1TObjId &o);
145 
152  EXTRTMETHOD const char *toString (OSCTXT* pctxt) const;
153 
160  EXTRTMETHOD void set_data (const OSUINT32 *raw_oid, OSUINT32 oid_len);
161 
170  EXTRTMETHOD int nCompare(const OSUINT32 n, const ASN1TObjId &o) const;
171 
180  EXTRTMETHOD int RnCompare(const OSUINT32 n, const ASN1TObjId &o) const;
181 
187  EXTRTMETHOD void trim(const OSUINT32 n);
188 
189 };
190 
199 EXTERNRT int operator== (const ASN1OBJID& lhs, const ASN1OBJID& rhs);
200 
201 /* AMBIGUOUS..
202  * This comparison operator allows for comparison of equality of two C++-based
203  * object identifier structures.
204  *
205  * @param lhs - C++ object identifier value.
206  * @param rhs - C++ object identifier value.
207  * @return - True if values are equal.
208 EXTERNRT int operator==(const ASN1TObjId &lhs, const ASN1TObjId &rhs);
209  */
210 
219 EXTERNRT int operator==(const ASN1OBJID &lhs, const char *dotted_oid_string);
220 
221 /* AMBIGUOUS..
222  * This comparison operator allows for comparison of equality of C++ based
223  * object identifier structure and a dotted string.
224  *
225  * @param lhs - C++ object identifier value.
226  * @param dotted_oid_string - String containing OID value to compare.
227  * @return - True if values are equal.
228 EXTERNRT int operator==(const ASN1TObjId &lhs, const char *dotted_oid_string);
229  */
230 
240 EXTERNRT int operator!=(const ASN1TObjId &lhs, const ASN1TObjId &rhs);
241 
251 EXTERNRT int operator!=(const ASN1OBJID &lhs, const ASN1OBJID &rhs);
252 
262 EXTERNRT int operator!=(const ASN1OBJID &lhs, const char *dotted_oid_string);
263 
273 EXTERNRT int operator!=(const ASN1TObjId &lhs, const char *dotted_oid_string);
274 
284 EXTERNRT int operator<(const ASN1TObjId &lhs, const ASN1TObjId &rhs);
285 
295 EXTERNRT int operator<(const ASN1OBJID &lhs, const ASN1OBJID &rhs);
296 
306 EXTERNRT int operator<(const ASN1OBJID &lhs, const char *dotted_oid_string);
307 
317 EXTERNRT int operator<(const ASN1TObjId &lhs, const char *dotted_oid_string);
318 
328 EXTERNRT int operator<=(const ASN1TObjId &lhs, const ASN1TObjId &rhs);
329 
339 EXTERNRT int operator<=(const ASN1OBJID &lhs, const ASN1OBJID &rhs);
340 
351 EXTERNRT int operator<=(const ASN1TObjId &lhs, const char *dotted_oid_string);
352 
362 EXTERNRT int operator<=(const ASN1OBJID &lhs, const char *dotted_oid_string);
363 
364 
374 EXTERNRT int operator>(const ASN1TObjId &lhs, const ASN1TObjId &rhs);
375 
385 EXTERNRT int operator>(const ASN1TObjId &lhs, const char *dotted_oid_string);
386 
396 EXTERNRT int operator>(const ASN1OBJID &lhs, const ASN1OBJID &rhs);
397 
407 EXTERNRT int operator>(const ASN1OBJID &lhs, const char *dotted_oid_string);
408 
418 EXTERNRT int operator>=(const ASN1TObjId &lhs, const ASN1TObjId &rhs);
419 
429 EXTERNRT int operator>=(const ASN1TObjId &lhs, const char *dotted_oid_string);
430 
440 EXTERNRT int operator>=(const ASN1OBJID &lhs, const ASN1OBJID &rhs);
441 
442 
452 EXTERNRT int operator>=(const ASN1OBJID &lhs, const char *dotted_oid_string);
453 
462 EXTERNRT ASN1TObjId operator +(const ASN1TObjId &lhs, const ASN1TObjId &rhs);
463 
464 #endif
465 
int operator>=(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
ASN1TObjId()
Definition: ASN1TObjId.h:53
int operator<=(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
Definition: ASN1TObjId.h:49
Definition: asn1type.h:275
int operator<(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
int operator==(const ASN1OBJID &lhs, const ASN1OBJID &rhs)
Definition: rtxContext.h:198
int operator!=(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
int operator>(const ASN1TObjId &lhs, const ASN1TObjId &rhs)
ASN1TObjId operator+(const ASN1TObjId &lhs, const ASN1TObjId &rhs)