2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 // @ Project : Access Control Engine
20 // @ File Name : CombinerImpl.h
21 // @ Date : 2009-05-06
26 #ifndef _COMBINER_IMPL_H
27 #define _COMBINER_IMPL_H
30 #include <dpl/log/log.h>
37 class CombinerImpl : public Combiner
41 virtual Effect combineRules(const TreeNode * rule);
42 virtual Effect combinePolicies(const TreeNode * policy);
44 virtual ~CombinerImpl()
50 bool checkIfTargetMatches(const std::list<const Subject *> * subjectsSet,
51 bool &isUndetermined);
53 Effect combine(Policy::CombineAlgorithm algorithm,
54 std::list<Effect> & effects);
56 Effect denyOverrides(const std::list<Effect> & effects);
57 Effect permitOverrides(const std::list<Effect> & effects);
58 Effect firstApplicable(const std::list<Effect> & effects);
59 Effect firstMatchingTarget(const std::list<Effect> & effects);
61 std::list<int> * convertEffectsToInts(const std::list<Effect> * effects);
62 Effect convertIntToEffect(int intEffect);
64 void showEffectList(std::list<Effect> & effects)
66 std::list<Effect>::iterator it = effects.begin();
67 for (; it != effects.end(); ++it) {
68 LogDebug(toString(*it));
73 bool isError(const std::list<Effect> & effects);
86 #endif //_COMBINERIMPL_H