local_db.hpp

См. документацию.
00001 /*
00002 
00003 Copyright (c) 2002-2005, Yauheni Akhotnikau
00004 All rights reserved.
00005 
00006 Redistribution and use in source and binary forms, with or without
00007 modification, are permitted provided that the following conditions are met:
00008 
00009 - Redistributions of source code must retain the above copyright notice, this
00010 list of conditions and the following disclaimer.
00011 
00012 - Redistributions in binary form must reproduce the above copyright notice, this
00013 list of conditions and the following disclaimer in the documentation and/or
00014 other materials provided with the distribution.
00015 
00016 - The name of the author may not be used to endorse or promote products derived
00017 from this software without specific prior written permission.
00018 
00019 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
00020 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00021 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
00022 EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00023 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
00024 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00026 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
00027 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
00028 OF SUCH DAMAGE.
00029 
00030 */
00031 
00032 /*
00033   ObjESSty-1
00034 */
00035 
00043 #if !defined( _OESS_1__DB__CLN__LOCAL_DB_HPP_ )
00044 #define _OESS_1__DB__CLN__LOCAL_DB_HPP_
00045 
00046 #include <exception>
00047 
00048 #include <oess_1/db/h/declspec.hpp>
00049 
00050 #include <auto_ptr_3/h/obj_ptr.hpp>
00051 
00052 #include <oess_1/db/site/h/localhost.hpp>
00053 
00054 #include <oess_1/db/cln/h/db.hpp>
00055 
00056 namespace oess_1 {
00057 
00058 namespace db {
00059 
00060 namespace cln {
00061 
00062 //
00063 // local_db_t
00064 //
00065 
00082 class OESS_1__DB__TYPE  local_db_t
00083 {
00084   public :
00087     enum
00088     {
00090       auto_create = 0x1,
00093 
00094       no_overwrite = 0x2,
00099       auto_flush_mode = 0x4,
00102       read_only_mode = 0x8
00103     };
00104 
00108     local_db_t(
00110       const std::string & phys_db_name,
00113       unsigned int  initial_actions =
00114         auto_create | no_overwrite )
00115     throw( std::exception );
00116 
00123     local_db_t(
00125       const std::string & physic_name,
00127       const oess_1::db::storage::config_t & config,
00130       unsigned int  initial_actions =
00131         auto_create | no_overwrite )
00132     throw( std::exception );
00133 
00136     ~local_db_t() throw();
00137 
00139     oess_1::db::cln::db_t *
00140     query_db() throw();
00141 
00142   private :
00144     auto_ptr_3::obj_ptr_t< oess_1::db::site::localhost_t >
00145       m_localhost;
00147     auto_ptr_3::obj_ptr_t< oess_1::db::cln::db_t >
00148       m_db;
00149 
00150     local_db_t( const local_db_t & );
00151     local_db_t &
00152     operator=( const local_db_t & );
00153 };
00154 
00155 
00156 } /* namespace cln */
00157 
00158 } /* namespace db */
00159 
00160 } /* namespace oess_1 */
00161 
00162 #endif

Документация по ObjESSty. Последние изменения: Fri Oct 13 18:35:35 2006. Создано системой  doxygen 1.4.7
Hosted by uCoz