00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef ATTRIBUTEGROUP_H
00022
00023 #define ATTRIBUTEGROUP_H
00024
00025
00026
00027 #include <list>
00028 #include "schemaparser/Schema.h"
00029 #include "schemaparser/Attribute.h"
00030
00031 namespace Schema {
00032 class AttributeGroup
00033 {
00034 public:
00035 AttributeGroup();
00036 AttributeGroup(const std::string & n);
00037 void addAttribute(const Attribute& a);
00038 std::string getName()const;
00039 std::list<Attribute>::iterator begin();
00040 std::list<Attribute>::iterator end();
00041
00042 private:
00043 std::list<Attribute> att_list;
00044 std::string name;
00045
00046 };
00047
00048 inline
00049 AttributeGroup::AttributeGroup(const std::string & n)
00050 :name(n)
00051 {
00052 att_list.clear();
00053 }
00054
00055 inline
00056 void
00057 AttributeGroup::addAttribute(const Attribute& a)
00058 {
00059 att_list.push_back(a);
00060 }
00061
00062 inline
00063 std::list<Attribute>::iterator
00064 AttributeGroup::begin()
00065 {
00066 return att_list.begin();
00067 }
00068
00069 inline
00070 std::list<Attribute>::iterator
00071 AttributeGroup::end()
00072 {
00073 return att_list.end();
00074 }
00075
00076 inline
00077 std::string
00078 AttributeGroup::getName()const
00079 {
00080 return name;
00081 }
00082 }
00083 #endif // ATTRIBUTEGROUP_H