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 AnyArrayPtr m_matchValues;
54 std::string m_matchFlag;
66 * constructor of abstraction filter
68 explicit AttributeFilter(const std::string attributeName,
69 const AnyArrayPtr& matchValues,
70 const std::string& matchFlag,
71 const bool caseSensitive);
73 virtual ~AttributeFilter();
76 * method used to identify filter type
78 virtual FilterType getFilterType() const
80 return ATTRIBUTE_FILTER;
83 virtual bool setFilterType(const FilterType& filterType) { return false; };
85 virtual bool validate(FilterValidatorPtr& validator, int depth = 0);
87 virtual void travel(IFilterVisitorPtr& traversal, int depth = 0);
89 std::string getAttributeName() const;
90 void setAttributeName(const std::string &value);
92 AnyArrayPtr getMatchValues() const;
93 void setMatchValues(const AnyArrayPtr &value);
95 std::string getMatchFlag() const;
96 void setMatchFlag(const std::string& value);
98 bool getCaseSensitive() const;
99 void setCaseSensitive(const bool &value);
102 typedef DPL::SharedPtr<AttributeFilter> AttributeFilterPtr;
108 #endif // _API_ATTRIBUTE_FILTER_H_