Oracle ODB Runtime Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
statement-cache.hxx
Go to the documentation of this file.
1 // file : odb/oracle/statement-cache.hxx
2 // copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC
3 // license : ODB NCUEL; see accompanying LICENSE file
4 
5 #ifndef ODB_ORACLE_STATEMENT_CACHE_HXX
6 #define ODB_ORACLE_STATEMENT_CACHE_HXX
7 
8 #include <odb/pre.hxx>
9 
10 #include <map>
11 #include <typeinfo>
12 
13 #include <odb/forward.hxx>
14 #include <odb/traits.hxx>
15 
16 #include <odb/oracle/version.hxx>
17 #include <odb/oracle/forward.hxx>
19 
20 #include <odb/details/shared-ptr.hxx>
21 #include <odb/details/type-info.hxx>
22 
23 #include <odb/oracle/details/export.hxx>
24 
25 namespace odb
26 {
27  namespace oracle
28  {
29  class LIBODB_ORACLE_EXPORT statement_cache
30  {
31  public:
33  : conn_ (conn),
34  version_seq_ (conn.database ().schema_version_sequence ()) {}
35 
36  template <typename T>
38  find_object ();
39 
40  template <typename T>
42  find_view ();
43 
44  private:
45  typedef std::map<const std::type_info*,
46  details::shared_ptr<statements_base>,
47  details::type_info_comparator> map;
48 
49  connection& conn_;
50  unsigned int version_seq_;
51  map map_;
52  };
53  }
54 }
55 
56 #include <odb/oracle/statement-cache.txx>
57 
58 #include <odb/post.hxx>
59 
60 #endif // ODB_ORACLE_STATEMENT_CACHE_HXX
Definition: connection.hxx:35
Definition: forward.hxx:67
Definition: database.hxx:35
statement_cache(connection &conn)
Definition: statement-cache.hxx:32
Definition: statement-cache.hxx:29