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.
18 * @file AttributeFilter.h
19 * @author Kisub Song (kisubs.song@samsung.com)
24 #ifndef _API_ATTRIBUTE_FILTER_H_
25 #define _API_ATTRIBUTE_FILTER_H_
28 #include <dpl/shared_ptr.h>
31 #include "FilterTypes.h"
37 class AttributeFilter : public IFilter
42 * attribute name object
44 std::string m_attributeName;
49 MatchFlag m_matchFlag;
54 AnyArrayPtr m_matchValues;
61 * constructor of abstraction filter
63 explicit AttributeFilter(const std::string attributeName,
64 const MatchFlag& matchFlag,
65 const AnyArrayPtr& matchValues);
67 virtual ~AttributeFilter();
70 * method used to identify filter type
72 virtual FilterType getFilterType() const
74 return ATTRIBUTE_FILTER;
77 virtual bool setFilterType(const FilterType& filterType) { return false; };
79 virtual bool validate(FilterValidatorPtr& validator, int depth = 0);
81 virtual void travel(IFilterVisitorPtr& traversal, int depth = 0);
83 std::string getAttributeName() const;
84 void setAttributeName(const std::string &value);
86 AnyArrayPtr getMatchValues() const;
87 void setMatchValues(const AnyArrayPtr &value);
89 MatchFlag getMatchFlag() const;
90 void setMatchFlag(const MatchFlag& value);
93 typedef DPL::SharedPtr<AttributeFilter> AttributeFilterPtr;
99 #endif // _API_ATTRIBUTE_FILTER_H_