loaded_page.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 
00038 #if !defined( _OESS_1__DB__STORAGE__LOADED_PAGE_HPP_ )
00039 #define _OESS_1__DB__STORAGE__LOADED_PAGE_HPP_
00040 
00041 #include <cpp_util_2/h/nocopy.hpp>
00042 
00043 #include <smart_ref_3/h/smart_ref.hpp>
00044 
00045 #include <oess_1/db/h/declspec.hpp>
00046 
00047 #include <oess_1/defs/h/types.hpp>
00048 
00049 namespace oess_1 {
00050 
00051 namespace db {
00052 
00053 namespace storage {
00054 
00055 //
00056 // loaded_page_t
00057 //
00058 
00063 class OESS_1__DB__TYPE  loaded_page_t
00064   : private cpp_util_2::nocopy_t
00065   {
00066   public :
00068     loaded_page_t(
00070       oess_1::uint_t ordinal,
00072       oess_1::uint_t page_size );
00073     ~loaded_page_t();
00074 
00076     oess_1::uint_t
00077     ordinal() const
00078       {
00079         return m_ordinal;
00080       }
00081 
00083     oess_1::uint_t
00084     page_size() const
00085       {
00086         return m_page_size;
00087       }
00088     
00090     oess_1::char_t *
00091     current()
00092       {
00093         return m_buffer;
00094       }
00095 
00097     const oess_1::char_t *
00098     current() const
00099       {
00100         return m_buffer;
00101       }
00102 
00107     bool
00108     has_previous() const
00109       {
00110         return m_has_previous;
00111       }
00112 
00114 
00119     const oess_1::char_t *
00120     previous() const
00121       {
00122         return m_previous;
00123       }
00124 
00126     void
00127     change_previous_by_current();
00128 
00129   private :
00131     oess_1::uint_t  m_ordinal;
00133     oess_1::uint_t m_page_size;
00134 
00136 
00142     oess_1::char_t *  m_buffer;
00143 
00145     oess_1::char_t *  m_previous;
00146 
00148     bool  m_has_previous;
00149   };
00150 
00151 //
00152 // ref_loaded_page_t
00153 //
00154 
00155 SMART_REF_3_DECL_REF( loaded_page_t, class OESS_1__DB__TYPE )
00156 
00157 } /* namespace storage */
00158 
00159 } /* namespace db */
00160 
00161 } /* namespace oess */
00162 
00163 #endif
00164 
00165 

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