Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Protected Member Functions
ArcSec::OrderedCombiningAlg Class Reference

#include <OrderedAlg.h>

Inheritance diagram for ArcSec::OrderedCombiningAlg:
Inheritance graph
[legend]
Collaboration diagram for ArcSec::OrderedCombiningAlg:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 OrderedCombiningAlg ()
virtual ~OrderedCombiningAlg ()
virtual Result combine (EvaluationCtx *ctx, std::list< Policy * > policies)=0
 Evaluate request against policy, and if there are more than one policies, combine the evaluation results according to the combing algorithm implemented inside in the method combine(ctx, policies) itself.
virtual const std::string & getalgId (void) const =0
 Get the identifier of the combining algorithm class.

Protected Member Functions

Result combine (EvaluationCtx *ctx, std::list< Policy * > policies, const Result priorities[MAX_OREDERED_PRIORITIES])

Detailed Description

Definition at line 11 of file OrderedAlg.h.


Constructor & Destructor Documentation

Definition at line 13 of file OrderedAlg.h.

{};

Definition at line 14 of file OrderedAlg.h.

{};

Member Function Documentation

Result ArcSec::OrderedCombiningAlg::combine ( EvaluationCtx ctx,
std::list< Policy * >  policies,
const Result  priorities[MAX_OREDERED_PRIORITIES] 
) [protected]

Definition at line 210 of file OrderedAlg.cpp.

                                                                                                                                 {
  std::list<Policy*>::iterator it;
  int occurencies[MAX_OREDERED_PRIORITIES];
  memset(occurencies,0,sizeof(occurencies));
  for(it = policies.begin(); it != policies.end(); it++) {
    Policy* policy = *it;
    Result res = policy->eval(ctx);
    for(int n = 0;n<MAX_OREDERED_PRIORITIES;++n) {
      if(priorities[n] == res) {
        ++(occurencies[n]);
        break;
      };
    };
    if(occurencies[0]) break;
  };
  for(int n = 0;n<MAX_OREDERED_PRIORITIES;++n) {
    if(occurencies[n]) return priorities[n];
  };
  return priorities[MAX_OREDERED_PRIORITIES-1];
}

Here is the call graph for this function:

virtual Result ArcSec::CombiningAlg::combine ( EvaluationCtx ctx,
std::list< Policy * >  policies 
) [pure virtual, inherited]

Evaluate request against policy, and if there are more than one policies, combine the evaluation results according to the combing algorithm implemented inside in the method combine(ctx, policies) itself.

Parameters:
ctxThe information about request is included
policiesThe "match" and "eval" method inside each policy will be called, and then those results from each policy will be combined according to the combining algorithm inside CombingAlg class.

Implemented in ArcSec::PermitOverridesCombiningAlg, and ArcSec::DenyOverridesCombiningAlg.

Here is the caller graph for this function:

virtual const std::string& ArcSec::CombiningAlg::getalgId ( void  ) const [pure virtual, inherited]

Get the identifier of the combining algorithm class.

Returns:
The identity of the algorithm

Implemented in ArcSec::PermitOverridesCombiningAlg, and ArcSec::DenyOverridesCombiningAlg.

Here is the caller graph for this function:


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