00001
00002 #ifndef __STORE_H__
00003 #define __STORE_H__
00004
00005 #include <boost/shared_ptr.hpp>
00006
00007 namespace Spm
00008 {
00009 namespace Core
00010 {
00011 class PackageSystem;
00012 class Element;
00013 class Category;
00014 class Branch;
00015
00016 class Store
00017 {
00018 protected:
00019 void add (PackageSystem * pSystem,
00020 const std::string & topCategoryName,
00021 Category * category);
00022 void add (PackageSystem * pSystem,
00023 Element * element);
00024 void setCategoryUser (Category * category,
00025 const std::string & user);
00026
00027 public:
00028 virtual ~Store ()
00029 {
00030 }
00031 virtual void store (PackageSystem * pSystem) = 0;
00032 virtual void store (Element * element) = 0;
00033 virtual void store (Branch * element) = 0;
00034 virtual void store (Category * category) = 0;
00035 virtual void remove (Element * element) = 0;
00036 virtual void remove (Branch * branch) = 0;
00037 virtual void remove (Category * category) = 0;
00038 virtual void init (PackageSystem * pSystem) = 0;
00039 };
00040 }
00041 }
00042
00043 #endif