ent_id.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 
00037 #if !defined( _OESS_1__DEFS__ENT_ID_HPP_ )
00038 #define _OESS_1__DEFS__ENT_ID_HPP_
00039 
00040 #include <oess_1/defs/h/declspec.hpp>
00041 
00042 #include <iostream>
00043 
00044 #include <oess_1/defs/h/types.hpp>
00045 
00046 namespace oess_1 {
00047 
00048 //
00049 // ent_id_t
00050 //
00051 
00053 
00072 struct OESS_1__DEFS__TYPE ent_id_t {
00073   oess_1::uint_t  m_slice_id;
00074   oess_1::uint_t  m_ent_id;
00075 
00078   ent_id_t();
00080   ent_id_t(
00081     oess_1::uint_t slice_id,
00082     oess_1::uint_t ent_id );
00084   ent_id_t(
00085     const ent_id_t & o );
00086   ~ent_id_t();
00087 
00089   ent_id_t &
00090   operator=(
00091     const ent_id_t & o );
00092 
00094   operator bool() const;
00095 
00097   bool
00098   operator!() const;
00099 
00101   bool
00102   operator==( const ent_id_t & o ) const;
00103 
00105   bool
00106   operator!=( const ent_id_t & o ) const;
00107 
00109 
00114   bool
00115   operator<( const ent_id_t & o ) const;
00116 
00118   void
00119   make_null();
00120 };
00121 
00122 // Методы ввода/вывода объектов ent_id_t в std::stream.
00123 // Если при вводе обнаруживается не правильный формат,
00124 // то объекту присваивается значение, аналогичное NULL.
00125 
00126 OESS_1__DEFS__FUNC( std::ostream & )
00127 ent_id_to_std_ostream( std::ostream & s, const ent_id_t & o );
00128 
00129 OESS_1__DEFS__FUNC( std::istream & )
00130 ent_id_from_std_ostream( std::istream & s, ent_id_t & o );
00131 
00133 inline std::ostream &
00134 operator<<( std::ostream & s, const ent_id_t & o )
00135 {
00136   return ent_id_to_std_ostream( s, o );
00137 }
00138 
00140 
00144 inline std::istream &
00145 operator>>( std::istream & s, ent_id_t & o )
00146 {
00147   return ent_id_from_std_ostream( s, o );
00148 }
00149 
00150 } /* namespace oess_1 */
00151 
00152 #endif
00153 

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