From: <baz...@us...> - 2008-02-25 11:00:34
|
Revision: 8111 http://armagetronad.svn.sourceforge.net/armagetronad/?rev=8111&view=rev Author: bazaarmagetron Date: 2008-02-25 03:00:37 -0800 (Mon, 25 Feb 2008) Log Message: ----------- Manuel Moos: Moved instantiation of standard primitive proxies (for int& et al) to .cpp file. Modified Paths: -------------- clio/trunk/clio/clio/dataconversion.hpp clio/trunk/clio/clio/dataconversion_extended.cpp clio/trunk/clio/clio/dataconversion_extended.hpp Property Changed: ---------------- clio/trunk/clio/ Property changes on: clio/trunk/clio ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-02-25 11:05:12.898000002 +0100 committer: Manuel Moos <z-...@us...> properties: branch-nick: clio + timestamp: 2008-02-25 11:37:27.279999971 +0100 committer: Manuel Moos <z-...@us...> properties: branch-nick: clio Name: bzr:revision-id:v3-list-QlpoOTFBWSZTWZvbKhsAAAdRgAAQABK6798QIABURMgAAaeoNT1TxT1DQbKaeobXKiyAmlWT7Y5MkdJOtXDtB7w7DOGFBHiOBxaUIu7HQyyQSvxdyRThQkJvbKhs - 4 z-...@us...-20080222202821-mkuiwckx41jof2gj 5 z-...@us...-20080222202957-htiysaaxkiroqd7e 6 z-...@us...-20080222211806-jc50b77qlgn2dp8j 7 z-...@us...-20080222215601-p8y78c77ncvq5eb1 8 z-...@us...-20080222223809-mmh9wh6yzrdm7oa1 9 z-...@us...-20080222232123-uhnuqd9db0p27rkf 10 z-...@us...-20080222232154-k64q4ee9zuq5r2jp 11 z-...@us...-20080222234236-ny0hc8lwybz73rv6 12 z-...@us...-20080223000039-566psft2c96236kw 13 z-...@us...-20080223000530-4mtket15l6oeo1ju 14 z-...@us...-20080223001030-5t86d3u3bidpoq6r 15 z-...@us...-20080223002857-qvx8z72tmsoguku0 16 z-...@us...-20080223004917-abqn3vdfqb1euyzc 17 z-...@us...-20080223010025-h0nul9yntjvutdbq 18 z-...@us...-20080223013357-1nzhrjwjr4g0h7g9 19 z-...@us...-20080223015240-btmt95d1vvlip4gl 20 z-...@us...-20080223124731-dlwuagon76gq2o3g 21 z-...@us...-20080223133015-0hjqyrki59ydwdcv 22 z-...@us...-20080223135113-icwd4g99yev9n0u2 23 z-...@us...-20080223152916-8rm942q1rmjlueca 24 z-...@us...-20080223174524-3lb2wm6tt5nytd4b 25 z-...@us...-20080223174610-gwmr3fn8456rwvmg 26 z-...@us...-20080223183115-ub0hshkf3zfs69ko 27 z-...@us...-20080223185539-cvhsltp2u12d5lgc 28 z-...@us...-20080223211352-km18u9bp9qhufyta 29 z-...@us...-20080223225132-94n2bwt307fujbg4 30 z-...@us...-20080223234541-mqp3d64uyn3no98y 31 z-...@us...-20080223235231-5lshcanhqlkwv36n 32 z-...@us...-20080224001425-n6xziwrp0hh3nz2f 33 z-...@us...-20080224161454-lyyn0grllfn5qx8w 34 z-...@us...-20080224180639-fr6dqfch7kboocs0 35 z-...@us...-20080224181843-8iq9zyjoz4dprm8b 36 z-...@us...-20080224224147-cmxp11hux8yn3jbp 37 z-...@us...-20080224224848-0h65c9bpg637lgar 38 z-...@us...-20080224225219-0arhdm8hw42hptrf 39 z-...@us...-20080225000421-fh9p1qmu32awa41y 40 z-...@us...-20080225000607-bsvlilqbv5ssltr3 41 z-...@us...-20080225003311-fnfdbdvp3p2bw8b4 42 z-...@us...-20080225013618-jrkbe6q8gpdzbj3n 43 z-...@us...-20080225015144-8j759e33zdztmena 44 z-...@us...-20080225022114-1360a7t61rtei61d 45 z-...@us...-20080225023750-vf22upkbeiyoclbc 46 z-...@us...-20080225024308-j2a0nomtfuzfbjf8 47 z-...@us...-20080225100512-ck04wcqo0w3jibyq + 4 z-...@us...-20080222202821-mkuiwckx41jof2gj 5 z-...@us...-20080222202957-htiysaaxkiroqd7e 6 z-...@us...-20080222211806-jc50b77qlgn2dp8j 7 z-...@us...-20080222215601-p8y78c77ncvq5eb1 8 z-...@us...-20080222223809-mmh9wh6yzrdm7oa1 9 z-...@us...-20080222232123-uhnuqd9db0p27rkf 10 z-...@us...-20080222232154-k64q4ee9zuq5r2jp 11 z-...@us...-20080222234236-ny0hc8lwybz73rv6 12 z-...@us...-20080223000039-566psft2c96236kw 13 z-...@us...-20080223000530-4mtket15l6oeo1ju 14 z-...@us...-20080223001030-5t86d3u3bidpoq6r 15 z-...@us...-20080223002857-qvx8z72tmsoguku0 16 z-...@us...-20080223004917-abqn3vdfqb1euyzc 17 z-...@us...-20080223010025-h0nul9yntjvutdbq 18 z-...@us...-20080223013357-1nzhrjwjr4g0h7g9 19 z-...@us...-20080223015240-btmt95d1vvlip4gl 20 z-...@us...-20080223124731-dlwuagon76gq2o3g 21 z-...@us...-20080223133015-0hjqyrki59ydwdcv 22 z-...@us...-20080223135113-icwd4g99yev9n0u2 23 z-...@us...-20080223152916-8rm942q1rmjlueca 24 z-...@us...-20080223174524-3lb2wm6tt5nytd4b 25 z-...@us...-20080223174610-gwmr3fn8456rwvmg 26 z-...@us...-20080223183115-ub0hshkf3zfs69ko 27 z-...@us...-20080223185539-cvhsltp2u12d5lgc 28 z-...@us...-20080223211352-km18u9bp9qhufyta 29 z-...@us...-20080223225132-94n2bwt307fujbg4 30 z-...@us...-20080223234541-mqp3d64uyn3no98y 31 z-...@us...-20080223235231-5lshcanhqlkwv36n 32 z-...@us...-20080224001425-n6xziwrp0hh3nz2f 33 z-...@us...-20080224161454-lyyn0grllfn5qx8w 34 z-...@us...-20080224180639-fr6dqfch7kboocs0 35 z-...@us...-20080224181843-8iq9zyjoz4dprm8b 36 z-...@us...-20080224224147-cmxp11hux8yn3jbp 37 z-...@us...-20080224224848-0h65c9bpg637lgar 38 z-...@us...-20080224225219-0arhdm8hw42hptrf 39 z-...@us...-20080225000421-fh9p1qmu32awa41y 40 z-...@us...-20080225000607-bsvlilqbv5ssltr3 41 z-...@us...-20080225003311-fnfdbdvp3p2bw8b4 42 z-...@us...-20080225013618-jrkbe6q8gpdzbj3n 43 z-...@us...-20080225015144-8j759e33zdztmena 44 z-...@us...-20080225022114-1360a7t61rtei61d 45 z-...@us...-20080225023750-vf22upkbeiyoclbc 46 z-...@us...-20080225024308-j2a0nomtfuzfbjf8 47 z-...@us...-20080225100512-ck04wcqo0w3jibyq 48 z-...@us...-20080225103727-f42008yfu3y6q5r5 Modified: clio/trunk/clio/clio/dataconversion.hpp =================================================================== --- clio/trunk/clio/clio/dataconversion.hpp 2008-02-25 10:59:47 UTC (rev 8110) +++ clio/trunk/clio/clio/dataconversion.hpp 2008-02-25 11:00:37 UTC (rev 8111) @@ -534,8 +534,8 @@ CLIO_CONVERT_AS( TYPE, std::string ) CLIO_NODEFAULT_DATACONVERSION( std::string ); -CLIO_NODEFAULT_DATACONVERSION( char * ); -CLIO_NODEFAULT_DATACONVERSION( char const * ); +// CLIO_NODEFAULT_DATACONVERSION( char * ); +// CLIO_NODEFAULT_DATACONVERSION( char const * ); CLIO_NODEFAULT_DATACONVERSION( bool ); CLIO_NODEFAULT_DATACONVERSION( IoObject * ); @@ -551,9 +551,6 @@ template<> struct DataConverterDefsBase< NUMBER >: public DataConverterDefsBaseFloat{}; \ CLIO_NODEFAULT_DATACONVERSION( NUMBER ) -CLIO_CONVERT_AS_FLOAT( double ); -CLIO_CONVERT_AS_FLOAT( float ); - #define CLIO_CONVERT_AS_PRIMITIVE( PRIMITIVE ) \ CLIO_NODEFAULT_DATACONVERSION( PRIMITIVE & );\ CLIO_NODEFAULT_DATACONVERSION( PRIMITIVE const & );\ @@ -563,6 +560,8 @@ #define CLIO_CONVERT_AS_INT( NUMBER ) \ template<> struct DataConverterDefsBase< NUMBER >: public DataConverterDefsBaseInt{}; \ template<> struct DataConverterDefsBase< unsigned NUMBER >: public DataConverterDefsBaseIntUnsigned{}; \ +CLIO_CONVERT_AS_PRIMITIVE( NUMBER );\ +CLIO_CONVERT_AS_PRIMITIVE( unsigned NUMBER );\ CLIO_NODEFAULT_DATACONVERSION( NUMBER );\ CLIO_NODEFAULT_DATACONVERSION( unsigned NUMBER ) @@ -570,8 +569,14 @@ CLIO_CONVERT_AS_INT( short int ); CLIO_CONVERT_AS_INT( int ); CLIO_CONVERT_AS_INT( long int ); +CLIO_CONVERT_AS_FLOAT( double ); +CLIO_CONVERT_AS_FLOAT( float ); +CLIO_CONVERT_AS_PRIMITIVE( float ); +CLIO_CONVERT_AS_PRIMITIVE( double ); +CLIO_CONVERT_AS_PRIMITIVE( bool ); + } } Modified: clio/trunk/clio/clio/dataconversion_extended.cpp =================================================================== --- clio/trunk/clio/clio/dataconversion_extended.cpp 2008-02-25 10:59:47 UTC (rev 8110) +++ clio/trunk/clio/clio/dataconversion_extended.cpp 2008-02-25 11:00:37 UTC (rev 8111) @@ -197,6 +197,23 @@ #define CLIO_OVERRIDE_DATACONVERSION_FLOAT( TYPE )\ DataConverterOverrider< TYPE, DataConverterNumber<DataConverterDefsBaseFloat> >::Register() +#define CLIO_OVERRIDE_DATACONVERSION_REFERENCE( TYPE )\ +DataConverterOverrider< TYPE &, DataConverterProxy<TYPE &, PrimitiveProxy< Proxy< TYPE > > > >::Register();\ +DataConverterOverrider< TYPE const &, DataConverterProxy<TYPE const &, PrimitiveProxy< Proxy< TYPE const > > > >::Register() + +#define CLIO_OVERRIDE_DATACONVERSION_POINTER( TYPE )\ +DataConverterOverrider< TYPE *, DataConverterProxy<TYPE *, PrimitiveProxy< Proxy< TYPE > > > >::Register();\ +DataConverterOverrider< TYPE const *, DataConverterProxy<TYPE const *, PrimitiveProxy< Proxy< TYPE const > > > >::Register() + +#define CLIO_OVERRIDE_DATACONVERSION_INDIRECTION( TYPE )\ +CLIO_OVERRIDE_DATACONVERSION_REFERENCE( TYPE );\ +CLIO_OVERRIDE_DATACONVERSION_POINTER( TYPE ) + +#define CLIO_OVERRIDE_DATACONVERSION_INDIRECTION_INT( TYPE )\ +CLIO_OVERRIDE_DATACONVERSION_INT( TYPE );\ +CLIO_OVERRIDE_DATACONVERSION_INDIRECTION( TYPE );\ +CLIO_OVERRIDE_DATACONVERSION_INDIRECTION( unsigned TYPE );\ + void ForceLinkDataConversionExtended() { static bool done = false; @@ -211,18 +228,25 @@ // bools DataConverterOverrider< bool, DataConverterBool >::Register(); + + // numbers + CLIO_OVERRIDE_DATACONVERSION_INT( char ); + CLIO_OVERRIDE_DATACONVERSION_REFERENCE( char ); + CLIO_OVERRIDE_DATACONVERSION_INDIRECTION( unsigned char ); + CLIO_OVERRIDE_DATACONVERSION_INDIRECTION_INT( short int ); + CLIO_OVERRIDE_DATACONVERSION_INDIRECTION_INT( int ); + CLIO_OVERRIDE_DATACONVERSION_INDIRECTION_INT( long int ); + CLIO_OVERRIDE_DATACONVERSION_FLOAT( float ); + CLIO_OVERRIDE_DATACONVERSION_FLOAT( double ); + CLIO_OVERRIDE_DATACONVERSION_INDIRECTION( float ); + CLIO_OVERRIDE_DATACONVERSION_INDIRECTION( double ); + CLIO_OVERRIDE_DATACONVERSION_INDIRECTION( bool ); + // strings DataConverterOverrider< std::string, DataConverterSTDString >::Register(); DataConverterOverrider< char const *, DataConverterCString >::Register(); DataConverterOverrider< char *, DataConverterMutableCString >::Register(); - // numbers - CLIO_OVERRIDE_DATACONVERSION_INT( char ); - CLIO_OVERRIDE_DATACONVERSION_INT( short int ); - CLIO_OVERRIDE_DATACONVERSION_INT( int ); - CLIO_OVERRIDE_DATACONVERSION_INT( long int ); - CLIO_OVERRIDE_DATACONVERSION_FLOAT( float ); - CLIO_OVERRIDE_DATACONVERSION_FLOAT( double ); } } Modified: clio/trunk/clio/clio/dataconversion_extended.hpp =================================================================== --- clio/trunk/clio/clio/dataconversion_extended.hpp 2008-02-25 10:59:47 UTC (rev 8110) +++ clio/trunk/clio/clio/dataconversion_extended.hpp 2008-02-25 11:00:37 UTC (rev 8111) @@ -291,7 +291,6 @@ #define CLIO_INSTANTIATE_PRIMITIVE( INT, NAME ) \ CLIO_INSTANTIATE_PRIMITIVE_PROXY( INT, NAME );\ -CLIO_CONVERTAS_PROXY_INDIRECTION( INT, PrimitiveProxy );\ CLIO_IO_COMPLETE_CLASSNAME( INT, "Clio " NAME ) #define CLIO_INSTANTIATE_PRIMITIVE_INT( INT, NAME ) \ @@ -301,15 +300,7 @@ CLIO_INSTANTIATE_PRIMITIVE_INT( long int, "LongInt" ); CLIO_INSTANTIATE_PRIMITIVE_INT( int, "Int" ); CLIO_INSTANTIATE_PRIMITIVE_INT( short int, "ShortInt" ); - -// chars need a bit of manual work, otherwise char * would not convert as string -CLIO_INSTANTIATE_PRIMITIVE_PROXY( char, "Char" ); -CLIO_IO_COMPLETE_CLASSNAME( char, "Clio " "Char" ); -CLIO_INSTANTIATE_PRIMITIVE_PROXY( unsigned char, "UnsignedChar" ); -CLIO_IO_COMPLETE_CLASSNAME( unsigned char, "Clio UnsignedChar" ); -CLIO_CONVERTAS_PROXY_REFERENCE( char, PrimitiveProxy ); -CLIO_CONVERTAS_PROXY_REFERENCE( unsigned char, PrimitiveProxy ); - +CLIO_INSTANTIATE_PRIMITIVE_INT( char, "Char" ); CLIO_INSTANTIATE_PRIMITIVE( std::string, "String" ); CLIO_INSTANTIATE_PRIMITIVE( double, "Double" ); CLIO_INSTANTIATE_PRIMITIVE( float, "Float" ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |