tizen 2.3 release
[framework/web/wearable/wrt-security.git] / ace / include / ace / Combiner.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 //
17 //
18 //
19 //  @ Project : Access Control Engine
20 //  @ File Name : Combiner.h
21 //  @ Date : 2009-05-06
22 //  @ Author : Samsung
23 //
24 //
25
26 #if !defined(_COMBINER_H)
27 #define _COMBINER_H
28
29 #include <set>
30
31 #include <ace/Attribute.h>
32 #include <ace/TreeNode.h>
33
34 class Combiner
35 {
36   protected:
37
38     const AttributeSet * attrSet;
39
40   public:
41
42     virtual ExtendedEffect combineRules(const TreeNode * rule) = 0;
43     virtual ExtendedEffect combinePolicies(const TreeNode * policy) = 0;
44
45     const AttributeSet * getAttributeSet() const
46     {
47         return this->attrSet;
48     }
49     void setAttributeSet(const AttributeSet * attrSet)
50     {
51         this->attrSet = attrSet;
52     }
53     virtual ~Combiner()
54     {
55     }                       //attrSet is deleted elsewhere
56 };
57
58 #endif  //_COMBINER_H