00001 00010 #ifndef BS_WELL_LIMIT_OPERATION_H_ 00011 #define BS_WELL_LIMIT_OPERATION_H_ 00012 00013 namespace blue_sky 00014 { 00015 namespace wells 00016 { 00017 00018 enum limit_operation_type 00019 { 00020 operation_none, 00021 operation_con, 00022 operation_well, 00023 operation_total, 00024 }; 00025 00026 limit_operation_type 00027 limit_operation_cast (const std::string &str); 00028 00029 class BS_API_PLUGIN well_limit_operation : public objbase 00030 { 00031 public: 00032 00033 typedef double item_t; 00034 00035 public: 00036 00037 void set_min_oil_rate (item_t min_oil_rate); 00038 void set_max_water_cut (item_t max_water_cut); 00039 void set_min_water_cut (item_t min_water_cut); 00040 00041 void set_value (int value_type, item_t value); 00042 00043 bool fi_check_limits () const; 00044 00045 BLUE_SKY_TYPE_DECL (well_limit_operation); 00046 00047 private: 00048 00049 //friend class well_limit_operation; 00050 00051 item_t min_oil_rate_; 00052 item_t max_water_cut_; 00053 item_t min_water_cut_; 00054 00055 }; 00056 00057 class BS_API_PLUGIN well_limit_operation_factory : public objbase 00058 { 00059 public: 00060 00061 typedef smart_ptr <well_limit_operation> sp_well_limit_operation_t; 00062 00063 public: 00064 00065 virtual ~well_limit_operation_factory () {} 00066 00067 virtual sp_well_limit_operation_t create_limit (limit_operation_type type) const; 00068 00069 BLUE_SKY_TYPE_DECL (well_limit_operation_factory); 00070 }; 00071 00072 bool 00073 well_limit_operation_register_type (const blue_sky::plugin_descriptor &pd); 00074 00075 bool 00076 well_limit_operation_factory_register_type (const blue_sky::plugin_descriptor &pd); 00077 00078 00079 } // namespace wells 00080 } // namespace blue_sky 00081 00082 00083 #endif // #ifndef BS_WELL_LIMIT_OPERATION_H_