OSDN Git Service

[core] : query に関連して大改造を行った。
authorcaprice <caprice@users.sourceforge.jp>
Thu, 8 Aug 2013 16:13:41 +0000 (01:13 +0900)
committercaprice <caprice@users.sourceforge.jp>
Thu, 8 Aug 2013 16:13:41 +0000 (01:13 +0900)
core/include/config.hpp

index e244dbb..2aa315a 100644 (file)
@@ -2,40 +2,41 @@
 #define GIKOMONA_CORE_CONFIG_HPP
 
 #include <tuple>
+#include <unordered_map>
 
 #include <boost/mpl/bool.hpp>
+#include <boost/any.hpp>
 
 #include "GikoMona.hpp"
 #include "query.hpp"
 
 namespace monazilla { namespace GikoMona { namespace core {
 
-
 class config final {
 public:
     typedef config self_type;
 
     config() noexcept {}
     ~config() {}
+
+    template <typename ...ValueType>
+    void insert(const mona_string& into,
+                const std::tuple<ValueType...>& value) {}
+
+    template <typename T>
+    T select(const mona_string& column,
+             const mona_string& from) const noexcept {}
     
-    template <typename ...T>
-    std::tuple<T...> post_query(const query& query) {
-        /*
-        switch(query.type) {
-            case query_type::IN:
-                config_table[query.var] = query.value;
-                return std::tuple<T...>();
-
-            case query_type::OUT:
-               // = config_table[query.var];
-                
-        }
-        */
-    }
+    template <typename ...ValueType>
+    std::tuple<ValueType...>
+    select_all(const mona_string& from) const noexcept {}
+
+private:
+    std::unordered_map<mona_string, boost::any> map;
 };
 
 template <>
-struct is_responsible_to_query<config> : public boost::mpl::true_ {};
+struct is_satisfied_with_query_concept<config> : public boost::mpl::true_ {};
 
 } } }