Validity.cpp
Go to the documentation of this file.00001 
00009 #include "Validity.h"
00010 #include "PKIFTime.h"
00011 
00013 
00014 struct CPKIFValidityImpl
00015 {
00016   CPKIFTimePtr m_notBefore;
00017   CPKIFTimePtr m_notAfter;
00018 };
00019 
00021 
00029 CPKIFValidity::CPKIFValidity()
00030   :m_impl (new CPKIFValidityImpl)
00031 {
00032 }
00034 
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048 
00049 CPKIFValidity::CPKIFValidity(
00051     const CPKIFTimePtr ¬Before, 
00053     const CPKIFTimePtr ¬After)
00054   :m_impl (new CPKIFValidityImpl)
00055 {
00056     CPKIFTimePtr tmpNB(new CPKIFTime(notBefore->GetTime()));
00057     m_impl->m_notBefore = tmpNB;
00058     CPKIFTimePtr tmpNA(new CPKIFTime(notAfter->GetTime()));
00059     m_impl->m_notAfter = tmpNA;
00060 }
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00075 CPKIFValidity::~CPKIFValidity()
00076 {
00077     if(m_impl)
00078     {
00079         delete m_impl;
00080         m_impl = 0;
00081     }
00082 }
00083 
00092 CPKIFTimePtr CPKIFValidity::notBefore() const
00093 {
00094     return m_impl->m_notBefore;
00095 }
00104 CPKIFTimePtr CPKIFValidity::notAfter() const
00105 {
00106     return m_impl->m_notAfter;
00107 }