macro.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__STDSN__MACRO_HPP_ )
00038 #define _OESS_1__STDSN__MACRO_HPP_
00039 
00040 #include <oess_1/io/h/stream.hpp>
00041 
00073 #define OESS_SERIALIZER_EX(T, Ex) \
00074 public : \
00075   class Ex  oess_serializer_t { \
00076     public : \
00077       static void unpack( oess_1::stdsn::ient_t & s, T & o, \
00078         oess_1::stdsn::isubclass_extension_t * subclass ); \
00079       static void unpack_complete( oess_1::stdsn::ient_t & s, T & o ); \
00080       static void pack( oess_1::stdsn::oent_t & s, const T & o, \
00081         oess_1::stdsn::osubclass_extension_t * subclass ); \
00082       static void pack_complete( oess_1::stdsn::oent_t & s, const T & o ); \
00083       static void unpack_self( oess_1::stdsn::ient_t & s, T & o, \
00084         oess_1::stdsn::isubclass_extension_t * subclass ); \
00085       static void pack_self( oess_1::stdsn::oent_t & s, const T & o, \
00086         oess_1::stdsn::osubclass_extension_t * subclass ); \
00087       static void * cast( const std::string & cast_to, T * o ); \
00088       static const std::string &  type_name(); \
00089       static oess_1::stdsn::serializable_t *  factory(); \
00090       static const std::string &  scheme(); \
00091     private : \
00092       static oess_1::stdsn::factory_registrator_t m_factory_reg; \
00093   }; \
00094   friend class  oess_serializer_t; \
00095   virtual void  oess_unpack( oess_1::stdsn::ient_t & s ); \
00096   virtual void  oess_pack( oess_1::stdsn::oent_t & s ) const; \
00097   virtual void *  oess_cast( const std::string & type_name ); \
00098   virtual const std::string & oess_type_name() const; \
00099   virtual const std::string & oess_scheme() const; \
00100   virtual void  oess_get_subclass_extension_path( \
00101     oess_1::stdsn::subclass_extension_path_t & path, \
00102     const std::string & terminator ) const; \
00103   bool oess_present_if( const std::string & ) const; \
00104   void oess_set_default( const std::string & ); \
00105 private : \
00106   const oess_1::stdsn::unknown_extension_t & \
00107   oess_unknown_extension() const; \
00108   oess_1::stdsn::unknown_extension_t & \
00109   oess_writeable_unknown_extension();
00110 
00111 #define __OESS_1_EMPTY_EX__
00112 
00155 #define OESS_SERIALIZER(T) OESS_SERIALIZER_EX(T, __OESS_1_EMPTY_EX__ )
00156 
00157 #endif
00158 

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