00001
00009 #ifndef BS_FACILITY_MANAGER_H_
00010 #define BS_FACILITY_MANAGER_H_
00011
00012 #include "facility_base.h"
00013
00014 namespace blue_sky
00015 {
00016
00017 template <typename strategy_t>
00018 class well;
00019
00020 class data_storage_interface;
00021
00026 template <typename strategy_t>
00027 class BS_API_PLUGIN facility_manager : public objbase
00028 {
00029 public:
00030
00031 typedef facility_base <strategy_t> facility_base_t;
00032 typedef well <strategy_t> well_t;
00033
00034 typedef smart_ptr <facility_base_t> sp_facility_t;
00035 typedef bos_val_table <std::string, sp_facility_t> facility_map_t;
00036 typedef smart_ptr <facility_map_t> sp_facility_map_t;
00037 typedef smart_ptr <well_t, true> sp_well_t;
00038
00039 typedef smart_ptr <data_storage_interface, true> sp_storage_t;
00040
00041 typedef typename facility_map_t::iterator facility_iterator_t;
00042 typedef typename facility_map_t::const_iterator facility_const_iterator_t;
00043
00044
00045 typedef facility_iterator_t well_iterator_t;
00046 typedef facility_const_iterator_t well_const_iterator_t;
00047
00048 public:
00049
00056 sp_well_t
00057 get_well (const std::string &group_name, const std::string &well_name) const;
00058
00064 sp_well_t
00065 get_well (const std::string &well_name) const;
00066
00071 void
00072 add_well (const sp_well_t &well);
00073
00078 void
00079 save_data (const sp_storage_t &storage) const;
00080
00085 well_const_iterator_t
00086 wells_begin () const;
00087
00092 well_const_iterator_t
00093 wells_end () const;
00094
00096 BLUE_SKY_TYPE_DECL_T (facility_manager);
00097
00098 private:
00099
00100 sp_facility_map_t facility_list_;
00101
00102 };
00103
00109 bool
00110 facility_manager_register_type (const blue_sky::plugin_descriptor &pd);
00111
00112
00113 }
00114
00115
00116 #endif // #ifndef BS_FACILITY_MANAGER_H_
00117