From: stephan b. <sg...@us...> - 2004-12-26 08:09:36
|
Update of /cvsroot/pclasses/pclasses2/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5502/test Modified Files: FactoryTest.h Log Message: Now uses P::SIO interface. Index: FactoryTest.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/test/FactoryTest.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- FactoryTest.h 26 Dec 2004 06:00:55 -0000 1.4 +++ FactoryTest.h 26 Dec 2004 08:09:26 -0000 1.5 @@ -11,14 +11,10 @@ #include <pclasses/Factory.h> -#ifndef USE_S11N -# define USE_S11N 0 -#endif - -#include <pclasses/s11n/s11n.h> +#include <pclasses/s11n/SIO.h> -#define NODE_TYPE ::P::s11n::s11n_node -#define NODETR ::P::s11n::node_traits< NODE_TYPE > +#define NODE_TYPE ::P::SIO::S11nNode +#define NODETR ::P::SIO::NodeTraits struct TheBase { @@ -55,12 +51,16 @@ } }; +//////////////////////////////////////////////////////////////////////// +// register TheBase with s11n's classloaders and register +// proxy: #define PS11N_TYPE TheBase #define PS11N_TYPE_IS_ABSTRACT #define PS11N_TYPE_NAME "TheBase" #define PS11N_SERIALIZE_FUNCTOR TheBase_s11n #include <pclasses/s11n/reg_serializable_traits.h> + struct AType : public TheBase { AType() @@ -90,20 +90,7 @@ virtual std::string classname() const { return "BType"; } }; - -// #ifndef PCLASSES_S11N_INCLUDED -// // avoid duplicate registrations... -// # define PFACREG_TYPE AType -// # define PFACREG_TYPE_INTERFACE TheBase -// // #define PFACREG_TYPE_IS_ABSTRACT // define to install a null factory for AType -// # define PFACREG_TYPE_NAME "AType" -// # include <pclasses/FactoryReg.h> - -// # define PFACREG_TYPE BType -// # define PFACREG_TYPE_INTERFACE TheBase -// # define PFACREG_TYPE_NAME "BType" -// # include <pclasses/FactoryReg.h> -// #endif // PCLASSES_S11N_INCLUDED - +// s11n registrations for AType and BType are in registrations.cpp, to +// demonstrate how scheiss-egal linkage is. #endif // ptest_FACTORYTEST_HPP_INCLUDED |