RowDoesNotContainPolicyInSet.cpp

Go to the documentation of this file.
00001 
00009 #include "RowDoesNotContainPolicyInSet.h"
00010 #include "PolicyInformation.h"
00012 struct RowDoesNotContainPolicyInSetImpl 
00013 {
00014   CPKIFPolicyInformationListPtr m_policySet;
00015 };
00017 
00024 RowDoesNotContainPolicyInSet::RowDoesNotContainPolicyInSet ()
00025   : m_impl (new RowDoesNotContainPolicyInSetImpl)
00026 {
00027 }
00035 RowDoesNotContainPolicyInSet::RowDoesNotContainPolicyInSet (const RowDoesNotContainPolicyInSet& r)
00036 {
00037   m_impl = new RowDoesNotContainPolicyInSetImpl;
00038   m_impl->m_policySet = r.m_impl->m_policySet;
00039 }
00047 RowDoesNotContainPolicyInSet::~RowDoesNotContainPolicyInSet ()
00048 {
00049   delete m_impl;
00050   m_impl = 0;
00051 }
00052 
00060 bool RowDoesNotContainPolicyInSet::operator ()(const CPKIFPolicyInformationListPtr& test)
00061 {
00062     //the "path depth" column is all we are interested in as far as the test list is concerned
00063     //"path depth" is the node returned by back()
00064     CPKIFPolicyInformationPtr testPol = test->back();
00065 
00066     //iterate over the set that was associated with this class prior to invoking find_if
00067     //return false if the the set contains testPol
00068     CPKIFPolicyInformationList::iterator currentPolicy;
00069     CPKIFPolicyInformationList::iterator end = m_impl->m_policySet->end();
00070     for(currentPolicy = m_impl->m_policySet->begin(); currentPolicy != end; ++currentPolicy)
00071     {
00072         if(*(*currentPolicy) == *testPol)
00073             return false;
00074     }
00075 
00076     return true;
00077 }
00085 void RowDoesNotContainPolicyInSet::SetPolicySet(
00087     CPKIFPolicyInformationListPtr& certPols) 
00088 {
00089         m_impl->m_policySet = certPols;
00090 }
00091 

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