binbuffer.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__IO__BINBUFFER_HPP_ )
00039 #define _OESS_1__IO__BINBUFFER_HPP_
00040 
00041 #include <oess_1/io/h/declspec.hpp>
00042 
00043 #include <oess_1/io/h/binstream.hpp>
00044 
00045 namespace oess_1 {
00046 
00047 namespace io {
00048 
00049 //
00050 // ibinbuffer_t
00051 //
00052 
00066 class OESS_1__IO__TYPE  ibinbuffer_t
00067   : public ibinstream_t
00068 {
00069   public :
00070     virtual ~ibinbuffer_t();
00071 
00073     virtual size_t
00074     size() const = 0;
00075 
00077     virtual size_t
00078     pos() const = 0;
00079 
00080     virtual bool
00081     eof() const = 0;
00082 
00083   protected :
00084     virtual const oess_1::char_t *
00085     in_reserve(
00086       size_t item_count,
00087       size_t item_size,
00088       size_t & item_available ) = 0;
00089 
00090     virtual void
00091     in_shift(
00092       size_t item_count,
00093       size_t item_size ) = 0;
00094 };
00095 
00096 //
00097 // obinbuffer_t
00098 //
00099 
00120 class OESS_1__IO__TYPE  obinbuffer_t
00121   : public obinstream_t
00122 {
00123   public :
00124     virtual ~obinbuffer_t();
00125 
00127     virtual size_t
00128     capacity() const = 0;
00129 
00131     virtual size_t
00132     size() const = 0;
00133 
00135     virtual size_t
00136     pos() const = 0;
00137 
00138   protected :
00139     virtual oess_1::char_t *
00140     out_reserve(
00141       size_t item_count,
00142       size_t item_size,
00143       size_t & item_available ) = 0;
00144 
00145     virtual void
00146     out_shift(
00147       size_t item_count,
00148       size_t item_size ) = 0;
00149 };
00150 
00151 } /* namespace io */
00152 
00153 } /* namespace oess_1 */
00154 
00155 #endif

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