00001 #ifndef __RMOL_FIELD_FLDOVERBOOKING_POLICY_HPP 00002 #define __RMOL_FIELD_FLDOVERBOOKING_POLICY_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STL 00008 #include <string> 00009 // RMOL 00010 #include <rmol/field/FldAbstract.hpp> 00011 00012 namespace RMOL { 00013 00015 class FldOverbookingPolicy : public FldAbstract { 00016 public: 00017 typedef enum { 00018 HEUR = 0, // Heuristic 00019 RISK, // Risk-Based 00020 SL1, // Service-Level 1 00021 SL2, // Service-Level 2 00022 HYBRID, // Hybrid 00023 LAST_VALUE 00024 } EN_Policy; 00025 00027 static const std::string& getLabel (const EN_Policy&); 00028 00029 // Getters 00031 EN_Policy getPolicy() const { 00032 return _policy; 00033 } 00034 00035 // Setters 00037 void setPolicy (const EN_Policy& iPolicy) { 00038 _policy = iPolicy; 00039 } 00040 00041 00043 FldOverbookingPolicy (const FldOverbookingPolicy&); 00044 FldOverbookingPolicy (const EN_Policy iPolicy = HEUR); 00045 00047 virtual ~FldOverbookingPolicy(); 00048 00049 00050 // ///////// Display methods //////// 00053 void toStream (std::ostream&) const; 00054 00057 void fromStream (std::istream&); 00058 00059 00060 private: 00061 // ///////// Attributes ////////// 00063 EN_Policy _policy; 00064 00066 static const std::string _labels[LAST_VALUE]; 00067 }; 00068 } 00069 #endif // __RMOL_FIELD_FLDOVERBOOKING_POLICY_HPP
Generated on Tue Sep 7 2010 18:38:31 for RMOL by Doxygen 1.7.1