entity_stream.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 
00036 #if !defined( _OESS_1__DB__STORAGE__ENTITY_STREAM_HPP_ )
00037 #define _OESS_1__DB__STORAGE__ENTITY_STREAM_HPP_
00038 
00039 #include <cpp_util_2/h/nocopy.hpp>
00040 
00041 #include <smart_ref_3/h/smart_ref.hpp>
00042 
00043 #include <oess_1/db/h/declspec.hpp>
00044 
00045 #include <oess_1/defs/h/types.hpp>
00046 
00047 #include <oess_1/io/h/stream.hpp>
00048 
00049 #include <oess_1/db/storage/h/chain_storage.hpp>
00050 
00051 namespace oess_1 {
00052 
00053 namespace db {
00054 
00055 namespace storage {
00056 
00058 const oess_1::uint_t  c_invalid_ent_id = 0;
00059 
00060 /*
00061 ** entity_stream_t
00062 */
00063 
00070 class OESS_1__DB__TYPE  entity_stream_t
00071   : private cpp_util_2::nocopy_t
00072   {
00073   public :
00074     virtual ~entity_stream_t();
00075 
00077     virtual oess_1::uint_t
00078     id() const = 0;
00079 
00081 
00087     virtual chain_id_t
00088     entity_create(
00090       oess_1::io::istream_t & ent_value,
00092       oess_1::uint_t ent_size ) = 0;
00093 
00096 
00099     virtual void
00100     entity_load(
00102       const chain_id_t & ent_id,
00104       oess_1::io::ostream_t & ent_value ) const = 0;
00105 
00108 
00116     virtual void
00117     entity_update(
00119       const chain_id_t & ent_id,
00121       oess_1::io::istream_t & ent_value,
00123       oess_1::uint_t ent_size ) = 0;
00124 
00126     virtual void
00127     entity_destroy(
00129       const chain_id_t & ent_id ) = 0;
00130 
00132 
00135     virtual void
00136     entity_destroy_all() = 0;
00137 
00139 
00148     virtual chain_id_t
00149     entity_find_next(
00150       const chain_id_t & ent_id ) const = 0;
00151 
00152 };
00153 
00154 //
00155 // ref_entity_stream_t
00156 //
00157 
00158 SMART_REF_3_DECL_REF( entity_stream_t, class OESS_1__DB__TYPE )
00159 
00160 //
00161 // create_std_entity_stream
00162 //
00163 
00164 
00171 OESS_1__DB__FUNC(entity_stream_t *)
00172 create_std_entity_stream(
00174   chain_storage_t & storage,
00176   oess_1::uint_t id,
00178   const chain_id_t & description_chain );
00179 
00180 //
00181 // create_entity_stream_description
00182 //
00183 
00188 OESS_1__DB__FUNC(chain_id_t)
00189 create_entity_stream_description(
00191   chain_storage_t & storage );
00192 
00193 //
00194 // destroy_entity_stream_description
00195 //
00196 
00202 OESS_1__DB__FUNC(void)
00203 destroy_entity_stream_description(
00205   chain_storage_t & storage,
00207   const chain_id_t & description_chain );
00208 
00209 } /* namespace storage */
00210 
00211 } /* namespace db */
00212 
00213 } /* namespace oess_1 */
00214 
00215 #endif

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