Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

pqxx-object/tmp.h

Go to the documentation of this file.
00001 #include <list>
00002 #include <string>
00003 
00004 template< typename T, template <typename T> class F >
00005 struct add_helper
00006 {
00007   std::pair< std::string, std::string >
00008   apply(const F<T>& field)
00009   {
00010     // Add T here...
00011   }
00012 };
00013 
00014 //  template<>
00015 template<template <typename std::string> class F >
00016 struct add_helper< F <std::string> >
00017 {
00018   std::pair< std::string, std::string >
00019   apply(const F<std::string>& field)
00020   {
00021     // Add std::string here...
00022   }
00023 };
00024 
00025 class insert_query
00026 {
00027 public:
00028   insert_query();
00029 
00030   typedef std::pair<std::string, std::string> field_value;
00031 
00032   template< typename T, template <typename> class F >
00033   void add(const F<T>& field)
00034   {
00035     remove(field);
00036     field_list.push_back(add_helper<T, F>::apply(field));
00037   }
00038 
00039   template< typename T, template <typename> class F >
00040   void remove(const F<T>& field)
00041   {
00042   }
00043 
00044 private:
00045   std::list< field_value > field_list;
00046 
00047 }; // class insert_query

Generated on Thu Apr 1 10:37:56 2004 for pqxx-object API Reference by doxygen 1.3.5