Back to index

nordugrid-arc-nox  1.1.0~rc6
OrderedAlg.h
Go to the documentation of this file.
00001 #ifndef __ARC_SEC_ORDEREDCOMBININGALG_H__
00002 #define __ARC_SEC_ORDEREDCOMBININGALG_H__
00003 
00004 #include <arc/security/ArcPDP/alg/CombiningAlg.h>
00005 #include <arc/security/ArcPDP/EvaluationCtx.h>
00006 
00007 namespace ArcSec {
00008 
00009 #define MAX_OREDERED_PRIORITIES 4
00010 
00011 class OrderedCombiningAlg : public CombiningAlg {
00012 public:
00013   OrderedCombiningAlg() {};
00014   virtual ~OrderedCombiningAlg() {};
00015 protected:
00016   Result combine(EvaluationCtx* ctx, std::list<Policy*> policies,const Result priorities[MAX_OREDERED_PRIORITIES]);
00017 };
00018 
00019 #define ORDERED_ALG_CLASS(NAME) \
00020 class NAME: public OrderedCombiningAlg { \
00021 private: \
00022   static std::string algId; \
00023   static Result priorities[MAX_OREDERED_PRIORITIES]; \
00024 public: \
00025   NAME(void) {}; \
00026   virtual ~NAME(void) {}; \
00027   virtual const std::string& getalgId(void) const { return algId; }; \
00028   virtual Result combine(EvaluationCtx* ctx, std::list<Policy*> policies) { \
00029     return OrderedCombiningAlg::combine(ctx,policies,priorities); \
00030   }; \
00031 }
00032 
00033 ORDERED_ALG_CLASS(PermitDenyIndeterminateNotApplicableCombiningAlg);
00034 ORDERED_ALG_CLASS(PermitDenyNotApplicableIndeterminateCombiningAlg);
00035 ORDERED_ALG_CLASS(PermitIndeterminateDenyNotApplicableCombiningAlg);
00036 ORDERED_ALG_CLASS(PermitIndeterminateNotApplicableDenyCombiningAlg);
00037 ORDERED_ALG_CLASS(PermitNotApplicableDenyIndeterminateCombiningAlg);
00038 ORDERED_ALG_CLASS(PermitNotApplicableIndeterminateDenyCombiningAlg);
00039 ORDERED_ALG_CLASS(DenyPermitIndeterminateNotApplicableCombiningAlg);
00040 ORDERED_ALG_CLASS(DenyPermitNotApplicableIndeterminateCombiningAlg);
00041 ORDERED_ALG_CLASS(DenyIndeterminatePermitNotApplicableCombiningAlg);
00042 ORDERED_ALG_CLASS(DenyIndeterminateNotApplicablePermitCombiningAlg);
00043 ORDERED_ALG_CLASS(DenyNotApplicablePermitIndeterminateCombiningAlg);
00044 ORDERED_ALG_CLASS(DenyNotApplicableIndeterminatePermitCombiningAlg);
00045 ORDERED_ALG_CLASS(IndeterminatePermitDenyNotApplicableCombiningAlg);
00046 ORDERED_ALG_CLASS(IndeterminatePermitNotApplicableDenyCombiningAlg);
00047 ORDERED_ALG_CLASS(IndeterminateDenyPermitNotApplicableCombiningAlg);
00048 ORDERED_ALG_CLASS(IndeterminateDenyNotApplicablePermitCombiningAlg);
00049 ORDERED_ALG_CLASS(IndeterminateNotApplicablePermitDenyCombiningAlg);
00050 ORDERED_ALG_CLASS(IndeterminateNotApplicableDenyPermitCombiningAlg);
00051 ORDERED_ALG_CLASS(NotApplicablePermitDenyIndeterminateCombiningAlg);
00052 ORDERED_ALG_CLASS(NotApplicablePermitIndeterminateDenyCombiningAlg);
00053 ORDERED_ALG_CLASS(NotApplicableDenyPermitIndeterminateCombiningAlg);
00054 ORDERED_ALG_CLASS(NotApplicableDenyIndeterminatePermitCombiningAlg);
00055 ORDERED_ALG_CLASS(NotApplicableIndeterminatePermitDenyCombiningAlg);
00056 ORDERED_ALG_CLASS(NotApplicableIndeterminateDenyPermitCombiningAlg);
00057 
00058 } // namespace ArcSec
00059 
00060 #endif /* __ARC_SEC_ORDEREDCOMBININGALG_H__ */
00061