CPKIFOID Class Reference

#include <OID.h>

Collaboration diagram for CPKIFOID:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFOID class provides a means of parsing, creating representations of, and comparing object identifiers.

TSP-enforcing: Yes

Definition at line 35 of file OID.h.


Public Member Functions

 CPKIFOID ()
 CPKIFOID (const unsigned int oid[], const unsigned int size)
 CPKIFOID (const CPKIFOID &alg)
 CPKIFOID (const CPKIFStringPtr &oidStr)
 CPKIFOID (const CPKIFBufferPtr &oidBuff)
 CPKIFOID (const std::string &oidStr)
virtual ~CPKIFOID ()
 conv. def of the above CPKIFStringPtr version
const char * ToString () const
bool operator== (const CPKIFOID &oid) const
bool operator== (const CPKIFOIDPtr &oid) const
bool operator== (const char *strOID) const
bool operator!= (const CPKIFOID &oid) const
bool operator!= (CPKIFOIDPtr &oid) const
 changed to & - 7/28/2004
bool operator!= (const char *strOID) const
CPKIFBufferPtr rawOID () const

Constructor & Destructor Documentation

CPKIFOID::CPKIFOID (  ) 

Interface: Subsystem

This is a helper function that extracts a string up to a delimeter

Returns:
Noneconverts a dot form string into an ASN1OBJ for use by the compiler Interface: Subsystem
Default constructor

Returns:
None

Definition at line 111 of file OID.cpp.

CPKIFOID::CPKIFOID ( const unsigned int  oid[],
const unsigned int  size 
)

Interface: Subsystem

Several constructors that take different parameters are provided to create a CPKIFOID object. The version that takes no parameters is used to create permanently empty OID objects (i.e. no means are provided to populate or alter a CPKIFOID object after creation). The constructor that takes an ASN1OBJID object is used internally during object processing and is not used by applications. The copy constructor simply creates a new CPKIFOID object containing the same OID value. The CPKIFStringPtr and std::string* variants can be used to create a CPKIFOID object given a string representation of an OID (e.g. 1.2.3.4.5). Typically, applications will create CPKIFOID objects as follows:

create a CPKIFOIDPtr containing a policy OID CPKIFOIDPtr policy(new CPKIFOID(new std::string("1.2.3.4.5")));

associated the policy OID with a timestamp request CPKIFTimeStampRequest req; req.SetPolicy(policy);

Returns:
None
Parameters:
oid  [in] int arrar containing the oid
size  [in] size onf the int array

Definition at line 157 of file OID.cpp.

CPKIFOID::CPKIFOID ( const CPKIFOID alg  ) 

Interface: Subsystem

Several constructors that take different parameters are provided to create a CPKIFOID object. The version that takes no parameters is used to create permanently empty OID objects (i.e. no means are provided to populate or alter a CPKIFOID object after creation). The constructor that takes an ASN1OBJID object is used internally during object processing and is not used by applications. The copy constructor simply creates a new CPKIFOID object containing the same OID value. The CPKIFStringPtr and std::string* variants can be used to create a CPKIFOID object given a string representation of an OID (e.g. 1.2.3.4.5). Typically, applications will create CPKIFOID objects as follows:

create a CPKIFOIDPtr containing a policy OID CPKIFOIDPtr policy(new CPKIFOID(new std::string("1.2.3.4.5")));

associated the policy OID with a timestamp request CPKIFTimeStampRequest req; req.SetPolicy(policy);

Returns:
None
Parameters:
alg  [in] A erfernce to CPKIFOID object

Definition at line 190 of file OID.cpp.

References ConvertStringToASN1OBJID(), and m_impl.

CPKIFOID::CPKIFOID ( const CPKIFStringPtr oidStr  ) 

Interface: Subsystem

Several constructors that take different parameters are provided to create a CPKIFOID object. The version that takes no parameters is used to create permanently empty OID objects (i.e. no means are provided to populate or alter a CPKIFOID object after creation). The constructor that takes an ASN1OBJID object is used internally during object processing and is not used by applications. The copy constructor simply creates a new CPKIFOID object containing the same OID value. The CPKIFStringPtr and std::string* variants can be used to create a CPKIFOID object given a string representation of an OID (e.g. 1.2.3.4.5). Typically, applications will create CPKIFOID objects as follows:

create a CPKIFOIDPtr containing a policy OID CPKIFOIDPtr policy(new CPKIFOID(new std::string("1.2.3.4.5")));

associated the policy OID with a timestamp request CPKIFTimeStampRequest req; req.SetPolicy(policy);

Returns:
None
Exceptions:
CPKIFException(ASN1_INVALID_OID) 
Parameters:
oidStr  [in] A smart pointer to CPKIFString object.

Definition at line 232 of file OID.cpp.

References ASN1_INVALID_OID, ConvertStringToASN1OBJID(), and TOOLKIT_ASN.

CPKIFOID::CPKIFOID ( const CPKIFBufferPtr &  oidBuff  ) 

Interface: Subsystem

This constructor takes an encoded OID and converts it into CPKIFOID

Returns:
None
Exceptions:
CPKIFException(ASN1_INVALID_OID) 
Parameters:
oidBuff  [in] A pointer to an encoded OID

Definition at line 290 of file OID.cpp.

References CACASNWRAPPER_CREATE, and CopyOID().

CPKIFOID::CPKIFOID ( const std::string &  oidStr  ) 

Interface: Subsystem

Several constructors that take different parameters are provided to create a CPKIFOID object. The version that takes no parameters is used to create permanently empty OID objects (i.e. no means are provided to populate or alter a CPKIFOID object after creation). The constructor that takes an ASN1OBJID object is used internally during object processing and is not used by applications. The copy constructor simply creates a new CPKIFOID object containing the same OID value. The CPKIFStringPtr and std::string* variants can be used to create a CPKIFOID object given a string representation of an OID (e.g. 1.2.3.4.5). Typically, applications will create CPKIFOID objects as follows:

create a CPKIFOIDPtr containing a policy OID CPKIFOIDPtr policy(new CPKIFOID(new std::string("1.2.3.4.5")));

associated the policy OID with a timestamp request CPKIFTimeStampRequest req; req.SetPolicy(policy);

Returns:
None
Exceptions:
CPKIFException(ASN1_INVALID_OID) 
Parameters:
oidStr  [in] A pointer to a NULL terminated string

Definition at line 268 of file OID.cpp.

References ASN1_INVALID_OID, ConvertStringToASN1OBJID(), and TOOLKIT_ASN.

CPKIFOID::~CPKIFOID (  )  [virtual]

conv. def of the above CPKIFStringPtr version

Interface: Subsystem

The function destroys an instance of CPKIFOID.

Returns:
None

Definition at line 309 of file OID.cpp.


Member Function Documentation

const char * CPKIFOID::ToString (  )  const

Interface: Subsystem

This function returns a pointer to a buffer containing a NULL-terminated string representation of the object identifier. The pointer is valid for the life of the associated CPKIFOID object.

Returns:
A pointer to a buffer containing a NULL-terminated string representation of the object identifier.
Exceptions:
CPKIFException(ASN1_INVALID_OID) 

Definition at line 332 of file OID.cpp.

References ASN1_INVALID_OID, m_impl, and TOOLKIT_ASN.

Referenced by CPKIFOCSPRequest::Encode().

bool CPKIFOID::operator== ( const CPKIFOID oid  )  const

Interface: Subsystem

This function returns true if the object identifier value passed as a parameter matches the value of the instance on which this function was invoked.

Returns:
True if the object identifier value passed as a parameter matches the value of the instance on which this function was invoked.
Parameters:
oid  [in] Reference to a CPKIFOID or a smart pointer to a CPKIFOID containing the object identifier to compare

Definition at line 411 of file OID.cpp.

References m_impl.

Referenced by operator!=().

bool CPKIFOID::operator== ( const CPKIFOIDPtr &  oid  )  const

Interface: Subsystem

This function returns true if the object identifier value passed as a parameter matches the value of the instance on which this function was invoked.

Returns:
True if the object identifier value passed as a parameter matches the value of the instance on which this function was invoked.
Parameters:
oid  [in] Reference to a CPKIFOID or a smart pointer to a CPKIFOID containing the object identifier to compare

Definition at line 374 of file OID.cpp.

bool CPKIFOID::operator== ( const char *  strOID  )  const

Interface: Subsystem

This function returns true if the object identifier value passed as a parameter matches the value of the instance on which this function was invoked.

Returns:
True if the object identifier value passed as a parameter matches the value of the instance on which this function was invoked.
Parameters:
strOID  [in] Pointer to a buffer containing a NULL-terminated string representation of the object identifier to compare

Definition at line 387 of file OID.cpp.

bool CPKIFOID::operator!= ( const CPKIFOID oid  )  const

Interface: Subsystem

The operator can accept three kinds of parameters CPKIFOID reference, a char string or a CPKIFOID smart pointer.

Returns:
Boolean value which is set to true if the parameter which was passed to the operator, and the parameter held in this instance are not equals.
Parameters:
oid  [in] Reference to a CPKIFOID containing the object identifier to compare

Definition at line 435 of file OID.cpp.

References operator==().

bool CPKIFOID::operator!= ( CPKIFOIDPtr &  oid  )  const

changed to & - 7/28/2004

Interface: Subsystem

The operator can accept three kinds of parameters CPKIFOID reference, a char string or a CPKIFOID smart pointer.

Returns:
Boolean value which is set to true if the parameter which was passed to the operator, and the parameter held in this instance are not equals.
Parameters:
oid  [in] Reference to a pointer to CPKIFOID containing the object identifier to comp

Definition at line 450 of file OID.cpp.

References operator==().

bool CPKIFOID::operator!= ( const char *  strOID  )  const

Interface: Subsystem

The operator can accept three kinds of parameters CPKIFOID reference, a char string or a CPKIFOID smart pointer.

Returns:
Boolean value which is set to true if the parameter which was passed to the operator, and the parameter held in this instance are not equals.
Parameters:
strOID  [in] [in] Pointer to a buffer containing a NULL-terminated string representation of the object identifier to compare

Definition at line 463 of file OID.cpp.

References operator==().

CPKIFBufferPtr CPKIFOID::rawOID (  )  const

Interface: Subsystem

This function returns a pointer to an internally used structure. This function is not invoked by applications.

Returns:
A pointer to an internally used structure.

Definition at line 127 of file OID.cpp.

References CACASNWRAPPER_CREATE.


The documentation for this class was generated from the following files:

Generated on Mon Nov 15 11:20:31 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6