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;
44 Subject(std::istream&);
46 virtual bool serialize (std::ostream& os);
48 const std::list<Attribute>& getTargetAttributes() const;
50 void setSubjectId(const std::string & subjectId)
52 this->subjectId = subjectId;
55 //TODO maybe we should remove that becuase this causes a memory leak right now!! [CR] maybe thats true, maybe whe can remove this fun
56 // KW void setTargetAttributes(std::list<Attribute> * targetAttributes){ this->targetAttributes = targetAttributes; }
58 const std::string & getSubjectId() const
60 return this->subjectId;
63 void addNewAttribute(Attribute & attr)
65 this->targetAttributes.push_back(attr);
68 //TODO in 1.0 change to true/false/undetermined
69 bool matchSubject(const AttributeSet *attrSet,
70 bool &isUndetermined) const;
76 #endif /* _SUBJECT_H */