00001 00016 #ifndef eleve_runtime2_hpp 00017 #define eleve_runtime2_hpp 00018 00019 #include "eleve/config.hpp" 00020 00021 #include <list> 00022 #include <vector> 00023 #include <stdexcept> 00024 00025 #include <boost/noncopyable.hpp> 00026 #include <boost/smart_ptr.hpp> 00027 #include <boost/any.hpp> 00028 #include <boost/date_time/gregorian/gregorian_types.hpp> 00029 00030 #include <boost/none.hpp> 00031 #include <boost/optional.hpp> 00032 00033 namespace eepgwde { 00034 00035 namespace detail { 00036 using namespace std; 00037 using namespace boost; 00038 00039 class Renderer; 00040 00044 00046 struct Typing { 00047 class Impl; 00048 friend class Impl; 00049 00050 typedef std::map<std::string, Renderer const *> types0_t; 00051 00053 std::string as(const boost::any & operand) const throw (std::exception) ; 00054 00056 00072 00077 typedef struct mapping_t { 00078 std::string old_; 00079 std::string new_; 00080 } mapping_t; 00081 typedef std::map<std::string, std::string> mappings_t; 00082 00084 types0_t & types0(); 00085 00087 Renderer const * add(Renderer *); 00088 00090 mappings_t & mappings(); 00091 00093 void mappings(const mapping_t mappings[]); 00094 00096 00107 00108 static const locale posix; 00109 static const locale us; 00110 static const locale uk; 00111 00113 void set(const std::locale & ours) throw (std::domain_error); 00114 00116 const std::locale & get() throw (std::domain_error); 00117 00119 00124 Typing() throw(std::exception); 00125 00126 virtual ~Typing() throw(std::exception); 00127 00128 protected: 00129 const boost::shared_ptr<eepgwde::detail::Typing::Impl> impl; 00130 }; 00131 00132 } 00133 00135 00136 } 00137 00138 #endif 00139 00140 00141