Update of /cvsroot/libfunutil/libfunutil/client/s11nconvert In directory sc8-pr-cvs1:/tmp/cvs-serv20021 Modified Files: AltSerializable.cpp AltSerializable.h BarClass.cpp BarClass.h FooClass.cpp FooClass.h Makefile main.cpp Log Message: ??? Index: AltSerializable.cpp =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/client/s11nconvert/AltSerializable.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- AltSerializable.cpp 14 Oct 2003 03:26:54 -0000 1.1 +++ AltSerializable.cpp 17 Oct 2003 09:07:35 -0000 1.2 @@ -2,6 +2,7 @@ #include <toolbox/debuggering_macros.h> // COUT/CERR #include <toolbox/ClassLoader.h> // COUT/CERR #include <toolbox/SimpleCLParser.h> // COUT/CERR +#include <s11n/serializable_adapter.h> #define VERBOSE if (toolbox::SimpleCLParser::args().get_bool( "v", false ) ) CERR Index: AltSerializable.h =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/client/s11nconvert/AltSerializable.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- AltSerializable.h 14 Oct 2003 03:26:54 -0000 1.1 +++ AltSerializable.h 17 Oct 2003 09:07:36 -0000 1.2 @@ -33,6 +33,7 @@ }; } // namespace alts11n:: + /** This creates the required serializable_adapter<AltSerializable> specializations to map the AltSerializable API to Index: BarClass.cpp =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/client/s11nconvert/BarClass.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- BarClass.cpp 14 Oct 2003 03:26:54 -0000 1.1 +++ BarClass.cpp 17 Oct 2003 09:07:36 -0000 1.2 @@ -1,10 +1,7 @@ #include <s11n/s11n-macros.h> // COUT/CERR -#include <s11n/serializable_adapter.h> -#include <s11n/Serializable.h> #include "BarClass.h" -SERIALIZABLE_REGISTER(s11n::Serializable,BarClass); using namespace s11n; using namespace std; Index: BarClass.h =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/client/s11nconvert/BarClass.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- BarClass.h 14 Oct 2003 03:26:54 -0000 1.1 +++ BarClass.h 17 Oct 2003 09:07:36 -0000 1.2 @@ -3,8 +3,10 @@ using namespace s11n; using namespace std; +// #include <s11n/serializable_adapter.h> +#include <s11n/Serializable.h> -struct BarClass: public Serializable +struct BarClass: public s11n::Serializable { std::string name; int magic_number; @@ -13,3 +15,5 @@ virtual bool s7e( s11n::s11n_node & ser ) const; virtual bool d9e( const s11n::s11n_node & node ); }; + +SERIALIZABLE_REGISTER(s11n::Serializable,BarClass); Index: FooClass.cpp =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/client/s11nconvert/FooClass.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- FooClass.cpp 14 Oct 2003 03:26:54 -0000 1.1 +++ FooClass.cpp 17 Oct 2003 09:07:36 -0000 1.2 @@ -9,8 +9,6 @@ using namespace s11n; using namespace std; -SERIALIZABLE_REGISTER(s11n::Serializable,foo::FooClass); - namespace foo { using namespace s11n; using namespace std; Index: FooClass.h =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/client/s11nconvert/FooClass.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- FooClass.h 14 Oct 2003 03:26:54 -0000 1.1 +++ FooClass.h 17 Oct 2003 09:07:36 -0000 1.2 @@ -1,21 +1,24 @@ #ifndef FOO_H_INCLUDED -#define FOO_H_INCLUDED +#define FOO_H_INCLUDED 1 -#include <s11n/S11n.h> #include <s11n/s11n_io.h> +#include <s11n/Serializable.h> namespace foo { -struct FooClass:public s11n::Serializable -{ - std::string name; - FooClass( ); - virtual ~ FooClass( ); - virtual bool s7e( s11n::s11n_node & ser ) const; - virtual bool d9e( const s11n::s11n_node & ser ); + struct FooClass : public s11n::Serializable + { + std::string name; + FooClass( ); + virtual ~ FooClass( ); + virtual bool s7e( s11n::s11n_node & ser ) const; + virtual bool d9e( const s11n::s11n_node & ser ); -// private: -// void bogosity(){} -// int incompatibility; -}; + // private: + // void bogosity(){} + // int incompatibility; + }; }; // namespace foo + +SERIALIZABLE_REGISTER(s11n::Serializable,foo::FooClass); + #endif // FOO_H_INCLUDED Index: Makefile =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/client/s11nconvert/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 14 Oct 2003 20:38:41 -0000 1.1 +++ Makefile 17 Oct 2003 09:07:36 -0000 1.2 @@ -30,13 +30,7 @@ endif main_cpp_CPPFLAGS = -DSERIALIZABLE_TYPE=$(SERIALIZABLE_TYPE) -DSERIALIZABLE_TYPE_STRING=\"$(SERIALIZABLE_TYPE)\" main2_cpp_CPPFLAGS = -DSERIALIZABLE_TYPE=alts11n::AltSerializable -DSERIALIZABLE_TYPE_STRING=\"alts11n::AltSerializable\" -ifeq (elib,$(PACKAGE_NAME)) - s11nconvert_bin_LDADD += $(ELIB_LDADD) -else - BIN_PROGRAMS_LDADD += $(S11N_CLIENT_LDADD) -# alts11nconvert_bin_LDADD += $(S11N_CLIENT_LDADD) -endif - +BIN_PROGRAMS_LDADD += $(S11N_CLIENT_LDADD) include $(toc_makesdir)/BIN_PROGRAMS.make INSTALL_BINS = $(BIN_PROGRAMS) Index: main.cpp =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/client/s11nconvert/main.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- main.cpp 14 Oct 2003 03:26:54 -0000 1.1 +++ main.cpp 17 Oct 2003 09:07:36 -0000 1.2 @@ -26,11 +26,15 @@ #include <toolbox/class_name.h> #include <toolbox/Instantiator.h> -#include <s11n/S11n.h> #include <s11n/s11n_io.h> #include <s11n/serializer_loader.h> #include <s11n/node_loader.h> + #include <s11n/Serializable.h> +// #include <s11n/serializable_adapter.h> +// SERIALIZABLE_ADAPTER(s11n::Serializable,s7e,d9e); + + // #include <s11n/include_from_main.h> #if HAVE_CONFIG_H @@ -54,6 +58,7 @@ #ifndef SERIALIZABLE_TYPE_STRING # define SERIALIZABLE_TYPE_STRING "s11n::Serializable" #endif + #include "AltSerializable.h" |