00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
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