attributecontainer.h
Go to the documentation of this file.00001 #ifndef DB_ATTRIBUTECONTAINER_H 00002 #define DB_ATTRIBUTECONTAINER_H 00003 //------------------------------------------------------------------------------ 00011 #include "util/narray.h" 00012 #include "db/attribute.h" 00013 00014 //------------------------------------------------------------------------------ 00015 namespace Db 00016 { 00017 class AttributeContainer 00018 { 00019 public: 00021 AttributeContainer(); 00023 ~AttributeContainer(); 00025 bool HasAttr(const Attr::AttributeID& attrId) const; 00027 void SetAttr(const Attribute& attr); 00029 const Attribute& GetAttr(const Attr::AttributeID& attrId) const; 00031 const nArray<Attribute>& GetAttrs() const; 00033 void Clear(); 00034 00035 private: 00037 int FindAttrIndex(const Attr::AttributeID& attrId) const; 00038 00039 nArray<Attribute> attrs; 00040 }; 00041 00042 }; // namespace Db 00043 //------------------------------------------------------------------------------ 00044 #endif