00001
00002
00003
00004
00005
00006
00007
00008 #ifndef _SK_RT_SCOPE_AGGREGATOR_
00009 #define _SK_RT_SCOPE_AGGREGATOR_
00010
00011 #include <sk/util/Object.h>
00012 #include <sk/util/Holder.hxx>
00013 #include <sk/rt/scope/IConfig.h>
00014 #include <map>
00015
00016 namespace sk {
00017 namespace rt {
00018 namespace scope {
00019 class Config;
00020
00021 class Aggregator
00022 : public virtual sk::util::Object
00023 {
00024 public:
00025 Aggregator();
00026 Aggregator(const Aggregator& other);
00027 virtual ~Aggregator();
00028
00029 const IConfig& getConfig() const;
00030 IConfig& getConfigForUpdate();
00031 Aggregator& obtain(const sk::util::String& name);
00032 int size() const;
00033
00034
00035 const sk::util::Class getClass() const;
00036
00037 private:
00038 Aggregator& operator = (const Aggregator& other);
00039
00040 void ensureOwnConfigHolder();
00041 void ensureOwnConfig();
00042
00043 sk::util::Holder<sk::util::Holder<Config> > _configHolderHolder;
00044 typedef std::map<sk::util::String, Aggregator> registry;
00045 registry _subordinates;
00046 };
00047 }
00048 }
00049 }
00050
00051 #endif