ASN1C C/C++ Common Runtime  ASN1C v7.5.x
Public Member Functions | List of all members

#include <ASN1TObjId.h>

Inheritance diagram for ASN1TObjId:
ASN1OBJID

Public Member Functions

 ASN1TObjId ()
 
virtual EXTRTMETHOD ~ASN1TObjId ()
 
EXTRTMETHOD ASN1TObjId (OSOCTET _numids, const OSUINT32 *_subids)
 
EXTRTMETHOD ASN1TObjId (const ASN1OBJID &oid)
 
EXTRTMETHOD ASN1TObjId (const ASN1TObjId &oid)
 
EXTRTMETHOD ASN1TObjId (const char *dotted_oid_string)
 
EXTRTMETHOD ASN1TObjIdoperator= (const char *dotted_oid_string)
 
EXTRTMETHOD void operator= (const ASN1OBJID &rhs)
 
EXTRTMETHOD void operator= (const ASN1TObjId &rhs)
 
EXTRTMETHOD ASN1TObjIdoperator+= (const char *dotted_oid_string)
 
EXTRTMETHOD ASN1TObjIdoperator+= (const OSUINT32 i)
 
EXTRTMETHOD ASN1TObjIdoperator+= (const ASN1TObjId &o)
 
EXTRTMETHOD const char * toString (OSCTXT *pctxt) const
 
EXTRTMETHOD void set_data (const OSUINT32 *raw_oid, OSUINT32 oid_len)
 
EXTRTMETHOD int nCompare (const OSUINT32 n, const ASN1TObjId &o) const
 
EXTRTMETHOD int RnCompare (const OSUINT32 n, const ASN1TObjId &o) const
 
EXTRTMETHOD void trim (const OSUINT32 n)
 

Additional Inherited Members

- Public Attributes inherited from ASN1OBJID
OSUINT32 numids
 
OSUINT32 subid [ASN_K_MAXSUBIDS]
 

Detailed Description

Object identifier. This is the base class for generated C++ data type classes for object identifier values.

Constructor & Destructor Documentation

◆ ASN1TObjId() [1/5]

ASN1TObjId::ASN1TObjId ( )
inline

The default constructor creates an empty object identifier value.

References operator!=(), operator+(), operator<(), operator<=(), operator==(), operator>(), and operator>=().

◆ ~ASN1TObjId()

virtual EXTRTMETHOD ASN1TObjId::~ASN1TObjId ( )
virtual

The Virtual Destructor

◆ ASN1TObjId() [2/5]

EXTRTMETHOD ASN1TObjId::ASN1TObjId ( OSOCTET  _numids,
const OSUINT32 *  _subids 
)

This constructor initializes the object identifer to contain the given data values.

Parameters
_numids- Number of subidentifiers in the OID.
_subids- Array of subidentifier values.

◆ ASN1TObjId() [3/5]

EXTRTMETHOD ASN1TObjId::ASN1TObjId ( const ASN1OBJID oid)

This constructor initializes the object identifier to contain the given data values. This can be used to set the value to a compiler-generated OID value.

Parameters
oid- C object identifier value.

◆ ASN1TObjId() [4/5]

EXTRTMETHOD ASN1TObjId::ASN1TObjId ( const ASN1TObjId oid)

The copy constructor.

Parameters
oid- C++ object identifier value.

◆ ASN1TObjId() [5/5]

EXTRTMETHOD ASN1TObjId::ASN1TObjId ( const char *  dotted_oid_string)

Construct an OID from a dotted string.

Parameters
dotted_oid_string- for example "1.3.1.6.1.10"

Member Function Documentation

◆ nCompare()

EXTRTMETHOD int ASN1TObjId::nCompare ( const OSUINT32  n,
const ASN1TObjId o 
) const

Compare the first n sub-ids(left to right) of two object identifiers.

Parameters
n- Number of subid values to compare.
o- OID to compare this OID with.
Returns
- 0 if OID's are equal, -1 if this OID less than given OID, +1 if this OID > given OID.

◆ operator+=() [1/3]

EXTRTMETHOD ASN1TObjId& ASN1TObjId::operator+= ( const char *  dotted_oid_string)

Overloaded += operator. This operator allows subidentifiers in the form of a dotted OID string ("n.n.n") to be appended to an existing OID object.

Parameters
dotted_oid_string- C++ object identifier value.
Returns
- True if values are equal.

◆ operator+=() [2/3]

EXTRTMETHOD ASN1TObjId& ASN1TObjId::operator+= ( const OSUINT32  i)

Overloaded += operator. This operator allows a single subidentifier in the form of an integer value to be appended to an existing OID object.

Parameters
i- Subidentifier to append.
Returns
- True if values are equal.

◆ operator+=() [3/3]

EXTRTMETHOD ASN1TObjId& ASN1TObjId::operator+= ( const ASN1TObjId o)

Overloaded += operator. This operator allows one object identifier to be appended to another object identifier.

Parameters
o- C++ object identifier value.
Returns
- True if values are equal.

◆ operator=() [1/3]

EXTRTMETHOD ASN1TObjId& ASN1TObjId::operator= ( const char *  dotted_oid_string)

Assignment from a string.

Parameters
dotted_oid_string- New value (for example "1.3.6.1.6.0");

◆ operator=() [2/3]

EXTRTMETHOD void ASN1TObjId::operator= ( const ASN1OBJID rhs)

This assignment operator sets the object identifier to contain the OID in the given C structure. This can be used to set the value to a compiler-generated OID value.

Parameters
rhs- C object identifier value.

◆ operator=() [3/3]

EXTRTMETHOD void ASN1TObjId::operator= ( const ASN1TObjId rhs)

This assignment operator sets the object identifier to contain the OID in the given C++ structure.

Parameters
rhs- C++ object identifier value.

◆ RnCompare()

EXTRTMETHOD int ASN1TObjId::RnCompare ( const OSUINT32  n,
const ASN1TObjId o 
) const

Compare the last n sub-ids(right to left) of two object identifiers.

Parameters
n- Number of subid values to compare.
o- OID to compare this OID with.
Returns
- 0 if OID's are equal, -1 if this OID less than given OID, +1 if this OID > given OID.

◆ set_data()

EXTRTMETHOD void ASN1TObjId::set_data ( const OSUINT32 *  raw_oid,
OSUINT32  oid_len 
)

Sets the data of an object identifier using a pointer and a length.

Parameters
raw_oid- Pointer to an array of subidentifier values.
oid_len- Number of subids in the array,

◆ toString()

EXTRTMETHOD const char* ASN1TObjId::toString ( OSCTXT pctxt) const

Get a printable ASCII string of a part of the value.

Parameters
pctxt- Pointer to a context structure.
Returns
- Dotted OID string (for example "3.6.1.6")

◆ trim()

EXTRTMETHOD void ASN1TObjId::trim ( const OSUINT32  n)

Trim the given number of rightmost sub elements from this OID.

Parameters
n- number of subids to trim from OID

The documentation for this struct was generated from the following file: