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.
20 // Created on June 2, 2009, 8:47 AM
29 #include <dpl/assert.h>
30 #include <dpl/noncopyable.h>
32 #include "Attribute.h"
34 class Subject : DPL::Noncopyable
36 std::string subjectId;
37 std::list<Attribute> targetAttributes;
43 const std::list<Attribute>& getTargetAttributes() const;
45 void setSubjectId(const std::string & subjectId)
47 this->subjectId = subjectId;
50 //TODO maybe we should remove that becuase this causes a memory leak right now!! [CR] maybe thats true, maybe whe can remove this fun
51 // KW void setTargetAttributes(std::list<Attribute> * targetAttributes){ this->targetAttributes = targetAttributes; }
53 const std::string & getSubjectId() const
55 return this->subjectId;
58 void addNewAttribute(Attribute & attr)
60 this->targetAttributes.push_back(attr);
63 //TODO in 1.0 change to true/false/undetermined
64 bool matchSubject(const AttributeSet *attrSet,
65 bool &isUndetermined) const;
71 #endif /* _SUBJECT_H */