// file : odb/sqlite/statement-cache.txx // copyright : Copyright (c) 2005-2012 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file namespace odb { namespace sqlite { template typename object_traits_impl::statements_type& statement_cache:: find_object () { typedef typename object_traits_impl::statements_type statements_type; map::iterator i (map_.find (&typeid (T))); if (i != map_.end ()) return static_cast (*i->second); details::shared_ptr p ( new (details::shared) statements_type (conn_)); map_.insert (map::value_type (&typeid (T), p)); return *p; } template view_statements& statement_cache:: find_view () { map::iterator i (map_.find (&typeid (T))); if (i != map_.end ()) return static_cast&> (*i->second); details::shared_ptr > p ( new (details::shared) view_statements (conn_)); map_.insert (map::value_type (&typeid (T), p)); return *p; } } }