CPKIFDuration Class Reference

#include <Duration.h>

Collaboration diagram for CPKIFDuration:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFDuration class provides a means for representing an elapsed period of time, e.g. a number of seconds or number of days. This class is used internally when an application specifies a duration that is subtracted from the validation time of interest to determine if revocation information has been produced at a recent enough point in time.

TSP-enforcing: No

Definition at line 30 of file Duration.h.


Public Member Functions

 CPKIFDuration ()
 CPKIFDuration (const CPKIFDuration &duration_)
 ~CPKIFDuration ()
double asSeconds () const
double asDays () const
void setSeconds (double seconds_)
void setDays (double days_)
CPKIFDurationoperator= (const CPKIFDuration &duration_)
bool operator== (const CPKIFDuration &duration_) const
bool operator!= (const CPKIFDuration &duration_) const
bool operator> (const CPKIFDuration &duration_) const
bool operator>= (const CPKIFDuration &duration_) const
bool operator< (const CPKIFDuration &duration_) const
bool operator<= (const CPKIFDuration &duration_) const
CPKIFDurationoperator+= (const CPKIFDuration &duration_)
CPKIFDurationoperator-= (const CPKIFDuration &duration_)
CPKIFDuration operator+ (const CPKIFDuration &duration_) const
CPKIFDuration operator- (const CPKIFDuration &duration_) const
CPKIFTime operator+ (const CPKIFTime &time_)

Constructor & Destructor Documentation

CPKIFDuration::CPKIFDuration (  ) 

Interface: External

Default constructor

Returns:
None

Definition at line 29 of file Duration.cpp.

CPKIFDuration::CPKIFDuration ( const CPKIFDuration duration_  ) 

Interface: External

Copy constructor

Returns:
None
Parameters:
duration_  [in] Reference to a CPKIFDuration object containing values to use when creating and initializing a new instance of CPKIFDuration

Definition at line 41 of file Duration.cpp.

References m_impl.

CPKIFDuration::~CPKIFDuration (  ) 

Interface: External

The function destroys an instance of CPKIFDuration.

Returns:
None

Definition at line 56 of file Duration.cpp.


Member Function Documentation

double CPKIFDuration::asSeconds (  )  const

Interface: External

This function returns a double containing the value of the duration as a number of seconds.

Returns:
A double containing the value of the duration as a number of seconds.

Definition at line 77 of file Duration.cpp.

Referenced by CPKIFTime::operator+(), CPKIFTime::operator+=(), CPKIFTime::operator-(), and CPKIFTime::operator-=().

double CPKIFDuration::asDays (  )  const

Interface: External

This function returns a double containing the value of the duration as a number of days.

Returns:
A double containing the value of the duration as a number of days.

Definition at line 89 of file Duration.cpp.

void CPKIFDuration::setSeconds ( double  seconds_  ) 

Interface: External

This function is used to specify the value of the duration as a number of seconds.

Returns:
None
Parameters:
seconds_  [in] Double containing the value of the duration expressed as a number of seconds

Definition at line 122 of file Duration.cpp.

Referenced by PKIFHTTP::AddBlacklistedHttpServer(), PKIFLDAP::AddBlacklistedServer(), PKIFHTTP::GetHttpServerBlacklist(), PKIFLDAP::GetServerBlacklist(), PKIFLDAP::IsBlacklisted(), PKIFHTTP::IsHttpServerBlacklisted(), and CPKIFTime::operator-().

void CPKIFDuration::setDays ( double  days_  ) 

Interface: External

This function is used to specify the value of the duration as a number of days.

Returns:
None
Parameters:
days_  [in] Double containing the value of the duration expressed as a number of days

Definition at line 135 of file Duration.cpp.

CPKIFDuration & CPKIFDuration::operator= ( const CPKIFDuration duration_  ) 

Interface: External

This function assigns the value from the object passed via the duration parameter to object on which this function was invoked.

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

Definition at line 152 of file Duration.cpp.

References m_impl.

bool CPKIFDuration::operator== ( const CPKIFDuration duration_  )  const

Interface: External

This function returns true if the duration object passed via the duration_ parameter is equal to the duration value held by the object on which this function was invoked.

Return values:
True if the duration object passed via the duration_ parameter is equal to the duration value held by the object on which this function was invoked.
False if the duration object passed via the duration_ parameter is not equal to the duration value held by the object on which this function was invoked.
Parameters:
duration_  [in] Reference to a CPKIFDuration object containing the value to compare

Definition at line 168 of file Duration.cpp.

References m_impl.

bool CPKIFDuration::operator!= ( const CPKIFDuration duration_  )  const

Interface: External

This function returns true if the value passed via the duration_ parameter is not equal to the value help by the object on which this function was invoked and false otherwise.

Return values:
True if the duration object passed via the duration_ parameter is not equal to the duration value held by the object on which this function was invoked.
False if the duration object passed via the duration_ parameter is equal to the duration value held by the object on which this function was invoked.
Parameters:
duration_  [in] Reference to a CPKIFDuration object containing the value to compare

Definition at line 183 of file Duration.cpp.

References m_impl.

bool CPKIFDuration::operator> ( const CPKIFDuration duration_  )  const

Interface: External

This function returns true if the duration object passed via the duration_ parameter is less than the duration value held by the object on which this function was invoked.

Return values:
True if the duration object passed via the duration_ parameter is less to the duration value held by the object on which this function was invoked.
False if the duration object passed via the duration_ parameter is not less to the duration value held by the object on which this function was invoked.
Parameters:
duration_  [in] Reference to a CPKIFDuration object containing the value to compare

Definition at line 198 of file Duration.cpp.

References m_impl.

bool CPKIFDuration::operator>= ( const CPKIFDuration duration_  )  const

Interface: External

This function returns true if the duration object passed via the duration_ parameter is greater than or equal to the duration value held by the object on which this function was invoked.

Return values:
True if the duration object passed via the duration_ parameter is greater than or equal to the duration value held by the object on which this function was invoked.
False if the duration object passed via the duration_ parameter is not greater than or equal to the duration value held by the object on which this function was invoked.
Parameters:
duration_  [in] Reference to a CPKIFDuration object containing the value to compare

Definition at line 213 of file Duration.cpp.

References m_impl.

bool CPKIFDuration::operator< ( const CPKIFDuration duration_  )  const

Interface: External

This function returns true if the CPKIFDuration object passed via the duration_ parameter is greater than the CPKIFDuration object on which this function was invoked.

Return values:
True if the duration object passed via the duration_ parameter is greater then the duration value held by the object on which this function was invoked.
False if the duration object passed via the duration_ parameter is not greater then to the duration value held by the object on which this function was invoked.
Parameters:
duration_  [in] Reference to a CPKIFDuration object containing the value to compare

Definition at line 228 of file Duration.cpp.

References m_impl.

bool CPKIFDuration::operator<= ( const CPKIFDuration duration_  )  const

Interface: External

This function returns true if the duration object passed via the duration_ parameter is greater or equal to the duration value held by the object on which this function was invoked

Return values:
True if the duration object passed via the duration_ parameter is greater or equal to the duration value held by the object on which this function was invoked.
False if the duration object passed via the duration_ parameter is not greater or equal to the duration value held by the object on which this function was invoked.
Parameters:
duration_  [in] Reference to a CPKIFDuration object containing the value to compare

Definition at line 243 of file Duration.cpp.

References m_impl.

CPKIFDuration & CPKIFDuration::operator+= ( const CPKIFDuration duration_  ) 

Interface: External

This function adds the value from the object passed via the duration parameter to current duration value.

Returns:
A reference to CPKIFDuration object containing the result
Parameters:
duration_  [in] Reference to a CPKIFDuration object containing the value to add

Definition at line 256 of file Duration.cpp.

References m_impl.

CPKIFDuration & CPKIFDuration::operator-= ( const CPKIFDuration duration_  ) 

Interface: External

This function subtracts the value from the object passed via the duration parameter from the current duration value.

Returns:
A reference to CPKIFDuration object containing the result
Parameters:
duration_  [in] Reference to a CPKIFDuration object containing the value to subtract

Definition at line 271 of file Duration.cpp.

References m_impl.

CPKIFDuration CPKIFDuration::operator+ ( const CPKIFDuration duration_  )  const

Interface: External

This function return an instance (either CPKIFDuration or CPKIFTime) containing the sum of the specified duration or time object and the current duration value.

Returns:
A reference to CPKIFDuration object containing the result
Parameters:
duration_  [in] Reference to a CPKIFDuration object containing the value to add

Definition at line 287 of file Duration.cpp.

References m_impl.

CPKIFDuration CPKIFDuration::operator- ( const CPKIFDuration duration_  )  const

Interface: External

This function returns an instance containing the difference of the specified duration object and the current duration value.

Returns:
A reference to CPKIFDuration object containing the result
Parameters:
duration_  [in] Reference to a CPKIFDuration object containing the value to subtract

Definition at line 302 of file Duration.cpp.

References m_impl.

CPKIFTime CPKIFDuration::operator+ ( const CPKIFTime time_  ) 

Interface: External

This function return an instance (either CPKIFDuration or CPKIFTime) containing the sum of the specified duration or time object and the current duration value.

Returns:
A reference to CPKIFTime object containing the result
Parameters:
time_  [in] Reference to a CPKIFTime object to which the duration value should be added

Definition at line 318 of file Duration.cpp.


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

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