CPKIFPeriod Class Reference

#include <Period.h>

Collaboration diagram for CPKIFPeriod:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFPeriod class provides a means for expressing a period in a form that is compatible with the CPKIFTime and CPKIFDuration classes. This is independent of the class used to represent validity periods in certificates.

TSP-enforcing: No

Definition at line 29 of file Period.h.


Public Member Functions

 CPKIFPeriod ()
 CPKIFPeriod (CPKIFTimePtr &start_, CPKIFTimePtr &end_)
 CPKIFPeriod (CPKIFTimePtr &start_, CPKIFDurationPtr &duration_)
 CPKIFPeriod (CPKIFPeriod &time_)
 ~CPKIFPeriod ()
CPKIFTimePtr start () const
void start (CPKIFTimePtr &start_)
CPKIFTimePtr end () const
void end (CPKIFTimePtr &end_)
CPKIFDurationPtr duration () const
bool contains (CPKIFTimePtr &time_) const
bool contains (CPKIFTimePtr &time_, CPKIFDurationPtr &skew_) const
CPKIFPeriodoperator= (const CPKIFPeriod &period_)

Protected Member Functions

struct _CPKIFPeriodImpl *& impl () const

Constructor & Destructor Documentation

CPKIFPeriod::CPKIFPeriod (  ) 

Interface: External

Default constructor

Returns:
None

Definition at line 25 of file Period.cpp.

References impl().

CPKIFPeriod::CPKIFPeriod ( CPKIFTimePtr &  start_,
CPKIFTimePtr &  end_ 
)

Interface: External

Constructor based on start and end time - throws an exception if start time is later than end time.

Returns:
None
Exceptions:
CPKIFException(ASN1_INVALID_PERIOD) 
Parameters:
start_  [in] Reference to a smart pointer to a CPKIFTime object containing the time to use as the beginning of the period
end_  [in] Reference to a smart pointer to a CPKIFTime object containing the time to use as the end of the period

Definition at line 42 of file Period.cpp.

References ASN1_INVALID_PERIOD, impl(), and TOOLKIT_ASN.

CPKIFPeriod::CPKIFPeriod ( CPKIFTimePtr &  start_,
CPKIFDurationPtr &  duration_ 
)

Interface: External

Constructor based on start and duration

Returns:
None
Exceptions:
CPKIFException(ASN1_INVALID_PERIOD) 
Parameters:
start_  [in] Reference to a smart pointer to a CPKIFTime object containing the time to use as the beginning of the period
duration_  [in] Pointer to a smart pointer to a CPKIFDuration object containing the value to add to the value passed via the start_ parameter to determine the end value for the period

Definition at line 68 of file Period.cpp.

References ASN1_INVALID_PERIOD, CPKIFTime, end(), impl(), and TOOLKIT_ASN.

CPKIFPeriod::CPKIFPeriod ( CPKIFPeriod time_  ) 

Interface: External

Copy constructor

Returns:
None
Parameters:
time_  [in] Reference to a CPKIFPeriod object containing the values to use when initializing a new CPKIFPeriod object

Definition at line 96 of file Period.cpp.

References impl().

CPKIFPeriod::~CPKIFPeriod (  ) 

Interface: External

The function destroys an instance of CPKIFPeriod.

Returns:
None

Definition at line 113 of file Period.cpp.

References impl().


Member Function Documentation

CPKIFTimePtr CPKIFPeriod::start (  )  const

Interface: External

This function is used to getthe start value for the period

Returns:
Start time property

Definition at line 133 of file Period.cpp.

References impl().

void CPKIFPeriod::start ( CPKIFTimePtr &  start_  ) 

Interface: External

This function is used to set the start value for the period

Returns:
None
Exceptions:
CPKIFException(ASN1_INVALID_PERIOD) 
Parameters:
start_  [in] Reference to a CPKIFPeriod object containing the value to assign

Definition at line 150 of file Period.cpp.

References ASN1_INVALID_PERIOD, impl(), and TOOLKIT_ASN.

CPKIFTimePtr CPKIFPeriod::end (  )  const

Interface: External

This function is used to get the end value for the period.

Returns:
End time property

Definition at line 173 of file Period.cpp.

References impl().

Referenced by CPKIFPeriod().

void CPKIFPeriod::end ( CPKIFTimePtr &  end_  ) 

Interface: External

This function is used to set the end value for the period.

Returns:
None
Exceptions:
CPKIFException(ASN1_INVALID_PERIOD) 
Parameters:
end_  [in] Reference to a CPKIFPeriod object containing the value to assign

Definition at line 190 of file Period.cpp.

References ASN1_INVALID_PERIOD, impl(), and TOOLKIT_ASN.

CPKIFDurationPtr CPKIFPeriod::duration (  )  const

Interface: External

This function returns a smart pointer to a CPKIFDuration object containing the length of the duration of the period.

Returns:
A smart pointer to a CPKIFDuration object containing the length of the duration of the period.

Definition at line 213 of file Period.cpp.

References CPKIFDuration, and impl().

bool CPKIFPeriod::contains ( CPKIFTimePtr &  time_  )  const

Interface: External

This functions return true if the specified times are within the period.

Return values:
True if the specified times are within the period.
False if the specified times are not within the period.
Parameters:
time_  [in] Reference to a smart pointer to a CPKIFTime object containing the time value to compare

Definition at line 229 of file Period.cpp.

References impl().

Referenced by MakeQueryForPath(), and CPKIFTimestampVerifier::Verify().

bool CPKIFPeriod::contains ( CPKIFTimePtr &  time_,
CPKIFDurationPtr &  skew_ 
) const

Interface: External

This functions return true if the specified times are within the period.

Return values:
True if the specified times are within the period.
False if the specified times are not within the period.
Parameters:
time_  [in] Reference to a smart pointer to a CPKIFTime object containing the time value to compare
skew_  [in] Reference to a smart pointer to a CPKIFDuration object containing the value to add and subtract to the time to compare

Definition at line 249 of file Period.cpp.

References impl().

CPKIFPeriod & CPKIFPeriod::operator= ( const CPKIFPeriod period_  ) 

Interface: External

This function is an assignment operator for CPKIFPeriod.

Returns:
A reference to CPKIFPeriod object containing the result
Parameters:
period_  [in] Reference to a CPKIFPeriod object containing the value to assign

Definition at line 269 of file Period.cpp.

References impl().

struct _CPKIFPeriodImpl *& CPKIFPeriod::impl (  )  const [read, protected]

Interface: Subsystem

This function is used to get time period implementation data. This function returns _CPKIFPeriodImpl structure. The _CPKIFPeriodImpl structure contains information about a time period with endpoints specified by two CPKIFTime objects. This function is only used internally.

Returns:
A pointer to _CPKIFPeriodImpl structure

Definition at line 291 of file Period.cpp.

Referenced by contains(), CPKIFPeriod(), duration(), end(), operator=(), start(), and ~CPKIFPeriod().


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

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