CPKIFGeneralSubtree Class Reference

#include <GeneralSubtree.h>

Collaboration diagram for CPKIFGeneralSubtree:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFGeneralSubtree class provides access to GeneralSubtree objects.

TSP-enforcing: No

Definition at line 29 of file GeneralSubtree.h.


Public Types

enum  MatchState { MATCH, NO_MATCH, NOT_APPLICABLE }

Public Member Functions

 CPKIFGeneralSubtree ()
 CPKIFGeneralSubtree (const CPKIFBufferPtr &genSubtree)
virtual ~CPKIFGeneralSubtree ()
CPKIFGeneralNamePtr GetBase () const
int GetMin () const
int GetMax () const
void SetBase (CPKIFGeneralNamePtr)
void SetMin (int)
void SetMax (int)
void SetEmpty (void)
MatchState IsInSubtree (const CPKIFNamePtr &cert) const
MatchState IsInSubtree (const CPKIFGeneralNamePtr &) const
bool operator== (const CPKIFGeneralSubtree &rhs)
CPKIFGeneralSubtreeShallowCopy ()

Static Public Member Functions

static bool IsSupported (CPKIFGeneralName::GENNAMETYPE type)

Member Enumeration Documentation

Enumerator:
MATCH 
NO_MATCH 
NOT_APPLICABLE 

Definition at line 32 of file GeneralSubtree.h.


Constructor & Destructor Documentation

CPKIFGeneralSubtree::CPKIFGeneralSubtree (  ) 

Interface: External

Default constructor

Returns:
None

Definition at line 410 of file GeneralSubtree.cpp.

Referenced by ShallowCopy().

CPKIFGeneralSubtree::CPKIFGeneralSubtree ( const CPKIFBufferPtr &  genSubtree  ) 

Interface: External

This constructor is internally invoked; this version will throw a std::bad_alloc exception if allocation of memory fails or ASN.1 decoding errors if the extension cannot be parsed.

Returns:
None
Exceptions:
std::bad_alloc 
Parameters:
genSubtree  [in] Reference to a smart pointer to CPKIFBuffer object which contains general subtree

Definition at line 429 of file GeneralSubtree.cpp.

References CACASNWRAPPER_CREATE.

CPKIFGeneralSubtree::~CPKIFGeneralSubtree (  )  [virtual]

Interface: External

The function destroys an instance of CPKIFGeneralSubtree.

Returns:
None

Definition at line 467 of file GeneralSubtree.cpp.


Member Function Documentation

CPKIFGeneralNamePtr CPKIFGeneralSubtree::GetBase (  )  const

Interface: External

This function returns a smart pointer to a CPKIFGeneralName object containing the general name specifying the base name associated with a GeneralSubtree object.

Returns:
A smart pointer to a CPKIFGeneralName object containing the general name specifying the base name associated with a GeneralSubtree object.

Definition at line 484 of file GeneralSubtree.cpp.

Referenced by CPKIFNameConstraintsPanel::GetExcludedNameConstraints(), and CPKIFNameConstraintsPanel::GetPermittedNameConstraints().

int CPKIFGeneralSubtree::GetMin (  )  const

Interface: External

This function returns the minimum depth associated with a GeneralSubtree object.

Returns:
The minimum depth associated with a GeneralSubtree object.

Definition at line 495 of file GeneralSubtree.cpp.

int CPKIFGeneralSubtree::GetMax (  )  const

Interface: External

This function returns the maximum depth associated with a GeneralSubtree object.

Returns:
The maximum depth associated with a GeneralSubtree object.

Definition at line 506 of file GeneralSubtree.cpp.

void CPKIFGeneralSubtree::SetBase ( CPKIFGeneralNamePtr  gn  ) 

Interface: External

This function sets the base name associated with a GeneralSubtree from a smart pointer to a CPKIFGeneralName object.

Returns:
None

Definition at line 518 of file GeneralSubtree.cpp.

void CPKIFGeneralSubtree::SetMin ( int  n  ) 

Interface: External

This function sets the minimum depth associated with a GeneralSubtree object.

Returns:
None

Definition at line 529 of file GeneralSubtree.cpp.

void CPKIFGeneralSubtree::SetMax ( int  n  ) 

Interface: External

This function sets the maximum depth associated with a GeneralSubtree object.

Returns:
None

Definition at line 540 of file GeneralSubtree.cpp.

void CPKIFGeneralSubtree::SetEmpty ( void   ) 

Interface: External

This function causes all IsInSubtree() calls relevant to the base name form to return NO_MATCH. This function is not used by applications, only within the library to gain efficiency when a path has subtrees that don't intersect. This is an irreversible transition.

Returns:
nothing

Definition at line 756 of file GeneralSubtree.cpp.

bool CPKIFGeneralSubtree::IsSupported ( CPKIFGeneralName::GENNAMETYPE  type  )  [static]

Interface: External

This function returns true if the value specified in the type parameter is valid for IsInSubtree() calls

Return values:
True if the value specified in the type parameter is valid for IsInSubtree() calls
False if the value specified in the type parameter is not valid for IsInSubtree() calls
Parameters:
type  [in] type of GeneralName being tested

Definition at line 727 of file GeneralSubtree.cpp.

References CPKIFGeneralName::DIRECTORYNAME, CPKIFGeneralName::DNSNAME, CPKIFGeneralName::IPADDRESS, CPKIFGeneralName::RFC822, and CPKIFGeneralName::URI.

Referenced by SubtreeMatch::operator()().

CPKIFGeneralSubtree::MatchState CPKIFGeneralSubtree::IsInSubtree ( const CPKIFNamePtr &  subject  )  const

Interface: External

This function returns true if the value specified in the name parameter is in the subtree identified by the GeneralSubtree object and false otherwise.

Return values:
True if the value specified in the name parameter is in the subtree identified by the GeneralSubtree object
False if the value specified in the name parameter is not in the subtree identified by the GeneralSubtree object
Exceptions:
PKIFException("Unsupported name form")
PKIFException(COMMON_NOT_INITIALIZED) 
PKIFException(COMMON_INVALID_INPUT) 
Parameters:
subject  [in] Reference to a smart pointer to a CPKIFName object to compare to the subtree

Definition at line 590 of file GeneralSubtree.cpp.

References COMMON_INVALID_INPUT, COMMON_NOT_INITIALIZED, CPKIFGeneralName::DIRECTORYNAME, MATCH, NO_MATCH, NOT_APPLICABLE, CPKIFGeneralName::RFC822, TOOLKIT_ASN, and TOOLKIT_X509_ASN.

Referenced by IsInSubtree().

CPKIFGeneralSubtree::MatchState CPKIFGeneralSubtree::IsInSubtree ( const CPKIFGeneralNamePtr &  name  )  const

Interface: External

This function returns true if the value specified in the name parameter is in the subtree identified by the GeneralSubtree object and false otherwise.

Return values:
MATCH if the value specified in the name parameter is in the subtree identified by the GeneralSubtree object
NO_MATCH if the value specified in the name parameter is not in the subtree identified by the GeneralSubtree object
NOT_APPLICABLE if the value specified in the name parameter is not the same type of name as the subtree identified by the GeneralSubtree object
Exceptions:
PKIFException("Unsupported name form")
PKIFException(COMMON_NOT_INITIALIZED) 
PKIFException(COMMON_INVALID_INPUT) 
Parameters:
name  [in] Reference to a GeneralName smart pointer containing an alternative name form to check against the subtree

Definition at line 680 of file GeneralSubtree.cpp.

References COMMON_INVALID_INPUT, COMMON_NOT_INITIALIZED, CPKIFGeneralName::DIRECTORYNAME, CPKIFGeneralName::DNSNAME, CPKIFGeneralName::IPADDRESS, IsInSubtree(), NO_MATCH, NOT_APPLICABLE, CPKIFGeneralName::RFC822, TOOLKIT_ASN, TOOLKIT_X509_ASN, and CPKIFGeneralName::URI.

bool CPKIFGeneralSubtree::operator== ( const CPKIFGeneralSubtree rhs  ) 

Interface: External

This function returns true if the CPKIFGeneralSubtree object passed via the rhs parameter is equivalent to the instance on which this function is invoked and returns false otherwise. The comparison consists of an invocation of the equality operator of the of the Base property and comparison of the Min and Max values.

Return values:
True if the CPKIFGeneralSubtree object passed via the rhs parameter is equivalent to the instance on which this function is invoked.
False if the CPKIFGeneralSubtree object passed via the rhs parameter is not equivalent to the instance on which this function is invoked.
Parameters:
rhs  [in] Reference to a CPKIFGeneralSubtree object to compare

Definition at line 556 of file GeneralSubtree.cpp.

References m_impl.

CPKIFGeneralSubtree * CPKIFGeneralSubtree::ShallowCopy (  ) 

Interface: External

Creates a shallow copy of this instance and returns a pointer. This should not be called from outside of PKIF.

Returns:
nothing

Definition at line 769 of file GeneralSubtree.cpp.

References CPKIFGeneralSubtree(), and m_impl.


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

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