cppunit-cvs Mailing List for CppUnit - C++ port of JUnit (Page 25)
Brought to you by:
blep
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(94) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(114) |
Mar
(80) |
Apr
|
May
|
Jun
(36) |
Jul
(67) |
Aug
(37) |
Sep
(33) |
Oct
(28) |
Nov
(91) |
Dec
(16) |
2006 |
Jan
(1) |
Feb
(7) |
Mar
(45) |
Apr
|
May
|
Jun
(36) |
Jul
(7) |
Aug
|
Sep
(32) |
Oct
(3) |
Nov
|
Dec
|
2007 |
Jan
(29) |
Feb
(11) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(35) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(14) |
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(13) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
(15) |
From: Baptiste L. <bl...@us...> - 2005-03-05 13:11:33
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15160/include/cpptl Modified Files: config.h Log Message: * no std::wstring for gcc 2.95 Index: config.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/config.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** config.h 5 Mar 2005 12:21:07 -0000 1.12 --- config.h 5 Mar 2005 13:11:23 -0000 1.13 *************** *** 59,62 **** --- 59,63 ---- # define CPPTL_NO_SSTREAM 1 // No #include <sstream> # define CPPTL_NO_STL_SEQUENCE_AT 1 // No std::vector<>::at std::deque<>::at + # define CPPTL_NO_STD_WSTRING 1 # endif |
From: Baptiste L. <bl...@us...> - 2005-03-05 12:56:06
|
Update of /cvsroot/cppunit/cppunit2/src/cpputtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11477/src/cpputtest Modified Files: main.cpp Log Message: * removed include of commandlineoptiontest Index: main.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/main.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** main.cpp 3 Mar 2005 08:15:54 -0000 1.17 --- main.cpp 5 Mar 2005 12:55:50 -0000 1.18 *************** *** 4,8 **** #include "assertenumtest.h" #include "assertstringtest.h" - #include "commandlineoptionstest.h" #include "registrytest.h" #include "enumeratortest.h" --- 4,7 ---- |
From: Baptiste L. <bl...@us...> - 2005-03-05 12:43:37
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9070/include/cpput Modified Files: stringize.h Log Message: * use deprecated ostrstream if the standard one are not available. Index: stringize.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/stringize.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** stringize.h 5 Mar 2005 12:41:18 -0000 1.4 --- stringize.h 5 Mar 2005 12:43:24 -0000 1.5 *************** *** 113,117 **** std::ostrstream os; os << value; ! return std::string( std::ostrstream::str(), pcount() ); # endif } --- 113,117 ---- std::ostrstream os; os << value; ! return std::string( os.str(), os.pcount() ); # endif } |
From: Baptiste L. <bl...@us...> - 2005-03-05 12:41:39
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8599/include/cpput Modified Files: stringize.h Log Message: * use deprecated ostrstream if the standard one are not available. Index: stringize.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/stringize.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** stringize.h 27 Feb 2005 10:15:41 -0000 1.3 --- stringize.h 5 Mar 2005 12:41:18 -0000 1.4 *************** *** 93,97 **** # ifndef CPPUT_NO_DEFAULT_STRINGIZE ! # include <sstream> namespace CppUT { --- 93,101 ---- # ifndef CPPUT_NO_DEFAULT_STRINGIZE ! # ifndef CPPTL_NO_SSTREAM ! # include <sstream> ! # else // standard stream are not available, use the deprecated one ! # include <strstream> ! # endif namespace CppUT { *************** *** 102,108 **** --- 106,118 ---- static std::string stringize( const ValueType &value ) { + # ifndef CPPTL_NO_SSTREAM std::ostringstream os; os << value; return os.str(); + # else // standard stream are not available, use the deprecated one + std::ostrstream os; + os << value; + return std::string( std::ostrstream::str(), pcount() ); + # endif } }; |
From: Baptiste L. <bl...@us...> - 2005-03-05 12:29:51
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6276/src/cpput Modified Files: testsuite.cpp Log Message: * added config macro CPPTL_NO_SSTREAM and CPPTL_NO_STL_SEQUENCE_AT for gcc 2.95 * added portability macro CPPTL_AT to access sequence container portably Index: testsuite.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/testsuite.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** testsuite.cpp 27 Feb 2005 14:38:27 -0000 1.7 --- testsuite.cpp 5 Mar 2005 12:29:39 -0000 1.8 *************** *** 52,60 **** TestSuite::testAt( int index ) const { ! #ifdef CPPUT_HAS_VECTOR_AT ! return tests_.at( index ); ! #else ! return tests_[ index ]; ! #endif } --- 52,56 ---- TestSuite::testAt( int index ) const { ! return CPPTL_AT( tests_, index ); } |
From: Baptiste L. <bl...@us...> - 2005-03-05 12:29:48
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6276/include/cpput Modified Files: config.h Log Message: * added config macro CPPTL_NO_SSTREAM and CPPTL_NO_STL_SEQUENCE_AT for gcc 2.95 * added portability macro CPPTL_AT to access sequence container portably Index: config.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/config.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** config.h 3 Mar 2005 20:57:14 -0000 1.10 --- config.h 5 Mar 2005 12:29:38 -0000 1.11 *************** *** 72,87 **** - // Indicates if the stl provides std::vector::at() - # define CPPUT_HAS_VECTOR_AT 1 - - // GCC 2.95 STL don't provides std::vector::at(). Don't know how to detect that - // version of STL, so we detect gcc version. - // Though, it would be better to detect the stl vendor & version (stlport could be used for instance) - # if defined __GNUC__ && __GNUC__ < 3 - # undef CPPUT_HAS_VECTOR_AT - # define CPPUT_HAS_VECTOR_AT 0 - # endif - - // define CPPUT_DLL_BUILD when building CppUnit dll. # ifdef CPPUT_DLL_BUILD --- 72,75 ---- |
From: Baptiste L. <bl...@us...> - 2005-03-05 12:29:25
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6161/src/cpput Modified Files: properties.cpp Log Message: * returned bool instead of string in unreachable default. Index: properties.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/properties.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** properties.cpp 5 Mar 2005 12:21:08 -0000 1.9 --- properties.cpp 5 Mar 2005 12:29:11 -0000 1.10 *************** *** 463,467 **** default: // unreachable CPPTL_DEBUG_ASSERT_UNREACHABLE; ! return false; } } --- 463,467 ---- default: // unreachable CPPTL_DEBUG_ASSERT_UNREACHABLE; ! return ""; } } |
From: Baptiste L. <bl...@us...> - 2005-03-05 12:21:49
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4444/include/cpptl Modified Files: config.h Log Message: * added config macro CPPTL_NO_SSTREAM and CPPTL_NO_STL_SEQUENCE_AT for gcc 2.95 * added portability macro CPPTL_AT to access sequence container portably Index: config.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/config.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** config.h 4 Mar 2005 22:16:57 -0000 1.11 --- config.h 5 Mar 2005 12:21:07 -0000 1.12 *************** *** 56,59 **** --- 56,63 ---- # endif + # if defined(__GNUC__) && (__GNUC__ < 3) && !defined(__STL_USE_NEW_IOSTREAMS) + # define CPPTL_NO_SSTREAM 1 // No #include <sstream> + # define CPPTL_NO_STL_SEQUENCE_AT 1 // No std::vector<>::at std::deque<>::at + # endif // Common to all compilers *************** *** 94,102 **** /// doSomething( CppTL::Type<int>() ); /// @todo Should this be kept. It is not used at the time... ! #if defined(CPPTL_NO_TYPE_DEFAULT_ARG) # define CPPTL_TYPE_DEFAULT_ARG(aType) ! #else # define CPPTL_TYPE_DEFAULT_ARG(aType) = ::CppTL::Type<aType>() ! #endif --- 98,114 ---- /// doSomething( CppTL::Type<int>() ); /// @todo Should this be kept. It is not used at the time... ! # if defined(CPPTL_NO_TYPE_DEFAULT_ARG) # define CPPTL_TYPE_DEFAULT_ARG(aType) ! # else # define CPPTL_TYPE_DEFAULT_ARG(aType) = ::CppTL::Type<aType>() ! # endif ! ! ! // CPPTL_NO_STL_SEQUENCE_AT is defined if the STL does not provide std::vector<>::at ! # if defined(CPPTL_NO_STL_SEQUENCE_AT) ! # define CPPTL_AT( container, index ) container[index] ! # else ! # define CPPTL_AT( container, index ) (container).at(index) ! # endif |
From: Baptiste L. <bl...@us...> - 2005-03-05 12:21:25
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4444/src/cpput Modified Files: properties.cpp Log Message: * added config macro CPPTL_NO_SSTREAM and CPPTL_NO_STL_SEQUENCE_AT for gcc 2.95 * added portability macro CPPTL_AT to access sequence container portably Index: properties.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/properties.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** properties.cpp 4 Mar 2005 22:16:59 -0000 1.8 --- properties.cpp 5 Mar 2005 12:21:08 -0000 1.9 *************** *** 861,865 **** Properties::at( unsigned int index ) const { ! return indexedProperties_.at( index ); } --- 861,865 ---- Properties::at( unsigned int index ) const { ! return CPPTL_AT( indexedProperties_, index ); } *************** *** 884,888 **** const Value &defaultValue ) const { ! return index < indexedProperties_.size() ? indexedProperties_.at( index ) : defaultValue; } --- 884,888 ---- const Value &defaultValue ) const { ! return index < indexedProperties_.size() ? CPPTL_AT(indexedProperties_, index ) : defaultValue; } *************** *** 892,896 **** Properties::operator[]( unsigned int index ) const { ! return indexedProperties_.at( index ); } --- 892,896 ---- Properties::operator[]( unsigned int index ) const { ! return CPPTL_AT( indexedProperties_, index ); } *************** *** 906,910 **** Properties::operator[]( unsigned int index ) { ! return indexedProperties_.at( index ); } --- 906,910 ---- Properties::operator[]( unsigned int index ) { ! return CPPTL_AT( indexedProperties_, index ); } |
From: Baptiste L. <bl...@us...> - 2005-03-05 12:21:21
|
Update of /cvsroot/cppunit/cppunit2/src/opentest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4444/src/opentest Modified Files: texttestdriver.cpp Log Message: * added config macro CPPTL_NO_SSTREAM and CPPTL_NO_STL_SEQUENCE_AT for gcc 2.95 * added portability macro CPPTL_AT to access sequence container portably Index: texttestdriver.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/opentest/texttestdriver.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** texttestdriver.cpp 28 Feb 2005 22:31:37 -0000 1.2 --- texttestdriver.cpp 5 Mar 2005 12:21:09 -0000 1.3 *************** *** 323,327 **** { // @todo update to new result properties structure ! const TestResult &testResult = results_.at( *failuresIt ); PropertiesAccessor info = testResult.result().accessor(); Properties::ValueEnum enumFaults = info["result/faults"].listValues(); --- 323,327 ---- { // @todo update to new result properties structure ! const TestResult &testResult = CPPTL_AT( results_, *failuresIt ); PropertiesAccessor info = testResult.result().accessor(); Properties::ValueEnum enumFaults = info["result/faults"].listValues(); |
From: Baptiste L. <bl...@us...> - 2005-03-05 12:21:21
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4444/include/cpput Modified Files: message.h Log Message: * added config macro CPPTL_NO_SSTREAM and CPPTL_NO_STL_SEQUENCE_AT for gcc 2.95 * added portability macro CPPTL_AT to access sequence container portably Index: message.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/message.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** message.h 28 Feb 2005 20:32:52 -0000 1.7 --- message.h 5 Mar 2005 12:21:07 -0000 1.8 *************** *** 83,87 **** CppTL::ConstString at( int index ) const { ! return details_.at( index ); } --- 83,87 ---- CppTL::ConstString at( int index ) const { ! return CPPTL_AT( details_, index ); } |
From: Baptiste L. <bl...@us...> - 2005-03-05 12:20:01
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4119/include/cpptl Modified Files: stringtools.h Log Message: * added missing include of stdio.h Index: stringtools.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/stringtools.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** stringtools.h 28 Feb 2005 20:45:41 -0000 1.6 --- stringtools.h 5 Mar 2005 12:19:51 -0000 1.7 *************** *** 4,7 **** --- 4,8 ---- # include <cpptl/conststring.h> # include <float.h> // toString( double ) + # include <stdio.h> // sprintf namespace CppTL { |
From: Baptiste L. <bl...@us...> - 2005-03-05 11:03:10
|
Update of /cvsroot/cppunit/cppunit2/examples/parametrized_test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19560/examples/parametrized_test Modified Files: SConscript Log Message: * changed from using string split() method to scons Split() helper function for portability with python 1.5.2. Index: SConscript =================================================================== RCS file: /cvsroot/cppunit/cppunit2/examples/parametrized_test/SConscript,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SConscript 1 Mar 2005 22:16:46 -0000 1.3 --- SConscript 5 Mar 2005 11:02:24 -0000 1.4 *************** *** 1,6 **** Import( 'env_testing buildCppUnitExample' ) ! buildCppUnitExample( env_testing, """ main.cpp ! """.split(), 'parametrized_test' ) --- 1,6 ---- Import( 'env_testing buildCppUnitExample' ) ! buildCppUnitExample( env_testing, Split( """ main.cpp ! """ ), 'parametrized_test' ) |
From: Baptiste L. <bl...@us...> - 2005-03-05 11:03:09
|
Update of /cvsroot/cppunit/cppunit2/examples/checking_assertions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19560/examples/checking_assertions Modified Files: SConscript Log Message: * changed from using string split() method to scons Split() helper function for portability with python 1.5.2. Index: SConscript =================================================================== RCS file: /cvsroot/cppunit/cppunit2/examples/checking_assertions/SConscript,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SConscript 1 Mar 2005 22:17:41 -0000 1.1 --- SConscript 5 Mar 2005 11:02:22 -0000 1.2 *************** *** 1,6 **** Import( 'env_testing buildCppUnitExample' ) ! buildCppUnitExample( env_testing, """ main.cpp ! """.split(), 'checking_assertions' ) --- 1,6 ---- Import( 'env_testing buildCppUnitExample' ) ! buildCppUnitExample( env_testing, Split( """ main.cpp ! """ ), 'checking_assertions' ) |
From: Baptiste L. <bl...@us...> - 2005-03-05 11:03:09
|
Update of /cvsroot/cppunit/cppunit2/examples/input_based_test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19560/examples/input_based_test Modified Files: SConscript Log Message: * changed from using string split() method to scons Split() helper function for portability with python 1.5.2. Index: SConscript =================================================================== RCS file: /cvsroot/cppunit/cppunit2/examples/input_based_test/SConscript,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SConscript 1 Mar 2005 22:16:46 -0000 1.3 --- SConscript 5 Mar 2005 11:02:23 -0000 1.4 *************** *** 1,6 **** Import( 'env_testing buildCppUnitExample' ) ! buildCppUnitExample( env_testing, """ main.cpp ! """.split(), 'input_based_test' ) --- 1,6 ---- Import( 'env_testing buildCppUnitExample' ) ! buildCppUnitExample( env_testing, Split( """ main.cpp ! """ ), 'input_based_test' ) |
From: Baptiste L. <bl...@us...> - 2005-03-05 11:02:38
|
Update of /cvsroot/cppunit/cppunit2/src/opentest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19560/src/opentest Modified Files: SConscript Log Message: * changed from using string split() method to scons Split() helper function for portability with python 1.5.2. Index: SConscript =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/opentest/SConscript,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SConscript 4 Mar 2005 08:23:39 -0000 1.2 --- SConscript 5 Mar 2005 11:02:26 -0000 1.3 *************** *** 1,6 **** Import( 'env buildLibary' ) ! buildLibary( env, """ texttestdriver.cpp ! """.split(), 'opentest' ) --- 1,6 ---- Import( 'env buildLibary' ) ! buildLibary( env, Split( """ texttestdriver.cpp ! """ ), 'opentest' ) |
From: Baptiste L. <bl...@us...> - 2005-03-05 11:02:36
|
Update of /cvsroot/cppunit/cppunit2/src/cpputtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19560/src/cpputtest Modified Files: SConscript Log Message: * changed from using string split() method to scons Split() helper function for portability with python 1.5.2. Index: SConscript =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/SConscript,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SConscript 4 Mar 2005 08:23:39 -0000 1.10 --- SConscript 5 Mar 2005 11:02:25 -0000 1.11 *************** *** 1,5 **** Import( 'env_testing buildLibraryUnitTest' ) ! buildLibraryUnitTest( env_testing, """ assertenumtest.cpp assertstringtest.cpp --- 1,5 ---- Import( 'env_testing buildLibraryUnitTest' ) ! buildLibraryUnitTest( env_testing, Split( """ assertenumtest.cpp assertstringtest.cpp *************** *** 14,17 **** testtestsuite.cpp reflectiontest.cpp ! """.split(), 'cpputtest' ) --- 14,17 ---- testtestsuite.cpp reflectiontest.cpp ! """ ), 'cpputtest' ) |
From: Baptiste L. <bl...@us...> - 2005-03-05 11:02:35
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19560/src/cpput Modified Files: SConscript Log Message: * changed from using string split() method to scons Split() helper function for portability with python 1.5.2. Index: SConscript =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/SConscript,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SConscript 4 Mar 2005 08:23:39 -0000 1.4 --- SConscript 5 Mar 2005 11:02:25 -0000 1.5 *************** *** 1,5 **** Import( 'env buildLibary' ) ! buildLibary( env, """ assert.cpp assertstring.cpp --- 1,5 ---- Import( 'env buildLibary' ) ! buildLibary( env, Split( """ assert.cpp assertstring.cpp *************** *** 12,15 **** testsuite.cpp thread.cpp ! """.split(), 'cpput' ) --- 12,15 ---- testsuite.cpp thread.cpp ! """ ), 'cpput' ) |
From: Baptiste L. <bl...@us...> - 2005-03-05 10:52:37
|
Update of /cvsroot/cppunit/cppunit2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17634 Modified Files: sconstruct Log Message: * added support for linux-gcc platform Index: sconstruct =================================================================== RCS file: /cvsroot/cppunit/cppunit2/sconstruct,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sconstruct 4 Mar 2005 22:23:20 -0000 1.8 --- sconstruct 5 Mar 2005 10:52:18 -0000 1.9 *************** *** 3,7 **** options = Options() ! options.Add( 'platform', 'platform used to build cppunit 2: suncc, vacpp, mingw, msvc6, msvc7, msvc71', 'mingw' ) platform = ARGUMENTS.get( 'platform' ) --- 3,7 ---- options = Options() ! options.Add( 'platform', 'platform used to build cppunit 2: suncc, vacpp, mingw, msvc6, msvc7, msvc71, linux-gcc', 'mingw' ) platform = ARGUMENTS.get( 'platform' ) *************** *** 63,66 **** --- 63,68 ---- elif platform == 'mingw': env.Tool( 'mingw' ) + elif platform == 'linux-gcc': + env.Tool( 'default' ) else: print "UNSUPPORTED PLATFORM." |
From: Baptiste L. <bl...@us...> - 2005-03-05 10:15:22
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8769/include/cpptl Modified Files: reflection.h reflectionimpl.py reflectionimpl10.h Log Message: * added support for reflection of method with return value Index: reflectionimpl.py =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/reflectionimpl.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** reflectionimpl.py 5 Mar 2005 09:41:00 -0000 1.2 --- reflectionimpl.py 5 Mar 2005 10:15:12 -0000 1.3 *************** *** 14,17 **** --- 14,22 ---- %(invokables)s + template< class Arg> + void setReturnType( Invokable &invokable, Type<Arg> ) + { + invokable.returnType_ = typeId( Type<Arg>() ); + } template< class Arg1 > *************** *** 51,55 **** { public: ! typedef void (Object::*Member)( %(fn_parameter_types)s )%(const_method)s; %(invokable)s( Member member ) --- 56,60 ---- { public: ! typedef %(return_type)s (Object::*Member)( %(fn_parameter_types)s )%(const_method)s; %(invokable)s( Member member ) *************** *** 61,65 **** { Object &object = *any_cast( call.holder_, Type<Object *>() ); ! (object.*member_)( %(fn_call)s ); } --- 66,70 ---- { Object &object = *any_cast( call.holder_, Type<Object *>() ); ! %(return_keyword)s(object.*member_)( %(fn_call)s ); } *************** *** 74,79 **** --- 79,86 ---- # ,class Arg2> # invokable : Invokable2 + # return_type : void # fn_parameter_types : Arg1, Arg2 # const_method : const + # return_keyword : return # fn_call : # any_cast( call.args_.at(0), Type<Arg1>() ), *************** *** 83,91 **** """ %(invokable_template_decl)s ! Invokable makeInvokable( void (Object::*member)( %(fn_parameter_types)s )%(const_method)s ) { Invokable invokable( InvokableBasePtr( new %(invokable_instantiation)s( member ) ) ); ! %(push_back_parameter_types)s ! return invokable; } """ --- 90,97 ---- """ %(invokable_template_decl)s ! Invokable makeInvokable%(return_suffix)s( %(return_type)s (Object::*member)( %(fn_parameter_types)s )%(const_method)s ) { Invokable invokable( InvokableBasePtr( new %(invokable_instantiation)s( member ) ) ); ! %(push_back_parameter_types)s%(set_return_type)s return invokable; } """ *************** *** 94,110 **** # invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); # invokable.argTypes_.push_back( typeId( Type<Arg2>() ) ); class GenerationParameters(object): ! def __init__( self, count, is_const ): self.count = count self.is_const = is_const args = [ 'Arg%d' % n for n in xrange(1,count+1) ] ! invokable_template_parameters = ['Object'] + args self.invokable_template_decl = self.makeTemplateDecl( invokable_template_parameters ) if is_const: ! self.invokable = 'InvokableConst%d' % count else: ! self.invokable = 'Invokable%d' % count self.fn_parameter_types = ', '.join( args ) self.const_method = (is_const and ' const') or '' --- 100,123 ---- # invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); # invokable.argTypes_.push_back( typeId( Type<Arg2>() ) ); + # set_return_type: + # setReturnType( invokable, Type<Return>() ); class GenerationParameters(object): ! def __init__( self, count, is_const, has_return ): self.count = count self.is_const = is_const args = [ 'Arg%d' % n for n in xrange(1,count+1) ] ! return_param = (has_return and ['Return']) or [] ! return_suffix = (has_return and 'R') or '' ! self.return_suffix = return_suffix ! self.return_type = (has_return and 'Return') or 'void' ! self.return_keyword = (has_return and 'call.result_ = ') or '' ! invokable_template_parameters = ['Object'] + return_param + args self.invokable_template_decl = self.makeTemplateDecl( invokable_template_parameters ) if is_const: ! self.invokable = 'InvokableConst%d%s' % (count,return_suffix) else: ! self.invokable = 'Invokable%d%s' % (count,return_suffix) self.fn_parameter_types = ', '.join( args ) self.const_method = (is_const and ' const') or '' *************** *** 113,116 **** --- 126,130 ---- self.invokable_instantiation = self.invokable + self.makeTemplateInstantiation( invokable_template_parameters ) self.push_back_parameter_types = self.makePushBackParameterTypes( args ) + self.set_return_type = (has_return and ' setReturnType( invokable, Type<Return>() );\n') or '' def __getitem__( self, key ): *************** *** 142,148 **** for argument_count in xrange(MIN_ARGUMENT_COUNT,MAX_ARGUMENT_COUNT+1): for is_const in (False,True): ! parameters = GenerationParameters( argument_count, is_const ) ! invokables += invokable % parameters ! invokable_generators += invokable_generator % parameters final_header = header % locals() --- 156,163 ---- for argument_count in xrange(MIN_ARGUMENT_COUNT,MAX_ARGUMENT_COUNT+1): for is_const in (False,True): ! for has_return in (False,True): ! parameters = GenerationParameters( argument_count, is_const, has_return ) ! invokables += invokable % parameters ! invokable_generators += invokable_generator % parameters final_header = header % locals() Index: reflectionimpl10.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/reflectionimpl10.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** reflectionimpl10.h 5 Mar 2005 09:41:00 -0000 1.2 --- reflectionimpl10.h 5 Mar 2005 10:15:12 -0000 1.3 *************** *** 27,30 **** --- 27,51 ---- }; + template< class Object, class Return > + class Invokable0R : public InvokableBase + { + public: + typedef Return (Object::*Member)( ); + + Invokable0R( Member member ) [...1055 lines suppressed...] } *************** *** 801,805 **** --- 1545,1560 ---- registerArgTypes( invokable, Type<Arg7>(), Type<Arg8>(), Type<Arg9>() ); registerArgTypes( invokable, Type<Arg10>() ); + return invokable; + } + template< class Object, class Return, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9, class Arg10 > + Invokable makeInvokableR( Return (Object::*member)( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10 ) const ) + { + Invokable invokable( InvokableBasePtr( new InvokableConst10R< Object, Return, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10 >( member ) ) ); + registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); + registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>(), Type<Arg6>() ); + registerArgTypes( invokable, Type<Arg7>(), Type<Arg8>(), Type<Arg9>() ); + registerArgTypes( invokable, Type<Arg10>() ); + setReturnType( invokable, Type<Return>() ); return invokable; } Index: reflection.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/reflection.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** reflection.h 4 Mar 2005 07:30:32 -0000 1.4 --- reflection.h 5 Mar 2005 10:15:12 -0000 1.5 *************** *** 251,254 **** --- 251,261 ---- } + # define CPPTL_REFLECT_METHOD_WITH_RETURN( method ) \ + { \ + ::CppTL::Impl::Invokable invokable = ::CppTL::Impl::makeInvokableR( \ + &_Reflection_SelfType::method ); \ + class_.addMethod( #method, invokable ); \ + } + # define CPPTL_REFLECT_RENAMED_ATTRIBUT( attribut, name ) \ { \ |
From: Baptiste L. <bl...@us...> - 2005-03-05 10:15:22
|
Update of /cvsroot/cppunit/cppunit2/src/cpputtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8769/src/cpputtest Modified Files: reflectiontest.cpp Log Message: * added support for reflection of method with return value Index: reflectiontest.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/reflectiontest.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** reflectiontest.cpp 5 Mar 2005 09:41:00 -0000 1.3 --- reflectiontest.cpp 5 Mar 2005 10:15:12 -0000 1.4 *************** *** 13,16 **** --- 13,18 ---- CPPTL_REFLECT_METHOD( multiplyAndAdd ) CPPTL_REFLECT_METHOD( checkTotal ) + CPPTL_REFLECT_METHOD_WITH_RETURN( isInitialized ) + CPPTL_REFLECT_METHOD_WITH_RETURN( getTotal ) CPPTL_REFLECT_ATTRIBUT( initialized_ ) CPPTL_REFLECT_RENAMED_ATTRIBUT( total_, "total" ) *************** *** 43,46 **** --- 45,58 ---- } + bool isInitialized() const + { + return initialized_; + } + + int getTotal() + { + return total_; + } + bool initialized_; int total_; *************** *** 112,115 **** --- 124,139 ---- CPPUT_ASSERT_EQUAL( 7 + 2*6, sampleTarget.total_ ); + const CppTL::Method *getTotalMethod = class_->findMethod( "getTotal" ); + CPPUT_ASSERT( getTotalMethod != 0, "Method 'getTotal' not found by reflection." ); + CppTL::MethodParameters argsGetTotal; + CPPUT_ASSERT_EQUAL( 7 + 2*6, any_cast( getTotalMethod->invoke( target, argsGetTotal ), + CppTL::Type<int>() ) ); + + const CppTL::Method *isInitializedMethod = class_->findMethod( "isInitialized" ); + CPPUT_ASSERT( isInitializedMethod != 0, "Method 'isInitialized' not found by reflection." ); + CppTL::MethodParameters argsIsInitialized; + CPPUT_ASSERT_EQUAL( true, any_cast( isInitializedMethod->invoke( target, argsIsInitialized ), + CppTL::Type<bool>() ) ); + const CppTL::Attribut *initializedAttribut = class_->findAttribut( "initialized_" ); CPPUT_ASSERT( initializedAttribut != 0, "Attribut 'initialized_' not found by reflection." ); |
From: Baptiste L. <bl...@us...> - 2005-03-05 09:41:10
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1644/include/cpptl Modified Files: reflectionimpl.py reflectionimpl10.h Log Message: * added support for reflection of const methods * factorised parameter type registration for better template function reuse. Index: reflectionimpl.py =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/reflectionimpl.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** reflectionimpl.py 4 Mar 2005 07:30:32 -0000 1.1 --- reflectionimpl.py 5 Mar 2005 09:41:00 -0000 1.2 *************** *** 14,17 **** --- 14,41 ---- %(invokables)s + + template< class Arg1 > + void registerArgTypes( Invokable &invokable, Type<Arg1> ) + { + invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); + } + + template< class Arg1, class Arg2 > + void registerArgTypes( Invokable &invokable, Type<Arg1>, Type<Arg2> ) + { + registerArgTypes( invokable, Type<Arg1>() ); + registerArgTypes( invokable, Type<Arg2>() ); + + } + + template< class Arg1, class Arg2, class Arg3 > + void registerArgTypes( Invokable &invokable, Type<Arg1>, Type<Arg2>, Type<Arg3> ) + { + registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>() ); + registerArgTypes( invokable, Type<Arg3>() ); + + } + + %(invokable_generators)s *************** *** 27,31 **** { public: ! typedef void (Object::*Member)( %(fn_parameter_types)s ); %(invokable)s( Member member ) --- 51,55 ---- { public: ! typedef void (Object::*Member)( %(fn_parameter_types)s )%(const_method)s; %(invokable)s( Member member ) *************** *** 51,63 **** # invokable : Invokable2 # fn_parameter_types : Arg1, Arg2 # fn_call : # any_cast( call.args_.at(0), Type<Arg1>() ), # any_cast( call.args_.at(1), Type<Arg2>() ) - invokable_generator = \ """ %(invokable_template_decl)s ! Invokable makeInvokable( void (Object::*member)( %(fn_parameter_types)s ) ) { Invokable invokable( InvokableBasePtr( new %(invokable_instantiation)s( member ) ) ); --- 75,87 ---- # invokable : Invokable2 # fn_parameter_types : Arg1, Arg2 + # const_method : const # fn_call : # any_cast( call.args_.at(0), Type<Arg1>() ), # any_cast( call.args_.at(1), Type<Arg2>() ) invokable_generator = \ """ %(invokable_template_decl)s ! Invokable makeInvokable( void (Object::*member)( %(fn_parameter_types)s )%(const_method)s ) { Invokable invokable( InvokableBasePtr( new %(invokable_instantiation)s( member ) ) ); *************** *** 72,88 **** class GenerationParameters(object): ! def __init__( self, count ): self.count = count ! invokable_template_parameters = ['Object'] + [ 'Arg%d' % n for n in xrange(1,count+1) ] self.invokable_template_decl = self.makeTemplateDecl( invokable_template_parameters ) ! self.invokable = 'Invokable%d' % count ! self.fn_parameter_types = ', '.join( [ 'Arg%d' % n for n in xrange(1,count+1) ] ) self.fn_call = '\n ,'.join( [ 'any_cast( call.args_.at(%d), Type<Arg%d>() )' % (n,n+1) for n in xrange(0,count) ] ) self.invokable_instantiation = self.invokable + self.makeTemplateInstantiation( invokable_template_parameters ) ! self.push_back_parameter_types = '\n'.join( ! [ ' invokable.argTypes_.push_back( typeId( Type<Arg%d>() ) );' % (n+1) ! for n in xrange(0,count) ] ) def __getitem__( self, key ): --- 96,116 ---- class GenerationParameters(object): ! def __init__( self, count, is_const ): self.count = count + self.is_const = is_const ! args = [ 'Arg%d' % n for n in xrange(1,count+1) ] ! invokable_template_parameters = ['Object'] + args self.invokable_template_decl = self.makeTemplateDecl( invokable_template_parameters ) ! if is_const: ! self.invokable = 'InvokableConst%d' % count ! else: ! self.invokable = 'Invokable%d' % count ! self.fn_parameter_types = ', '.join( args ) ! self.const_method = (is_const and ' const') or '' self.fn_call = '\n ,'.join( [ 'any_cast( call.args_.at(%d), Type<Arg%d>() )' % (n,n+1) for n in xrange(0,count) ] ) self.invokable_instantiation = self.invokable + self.makeTemplateInstantiation( invokable_template_parameters ) ! self.push_back_parameter_types = self.makePushBackParameterTypes( args ) def __getitem__( self, key ): *************** *** 98,101 **** --- 126,139 ---- return '' return '< ' + ', '.join( parameters ) + ' >' + + def makePushBackParameterTypes( self, args ): + args = args[:] + source = '' + for limit in (3,2,1): + while len(args) >= limit: + source += ' registerArgTypes( invokable, %s );\n' % ', '.join( + [ 'Type<%s>()' % type for type in args[0:limit] ]) + args = args[limit:] + return source invokables = '' *************** *** 103,109 **** for argument_count in xrange(MIN_ARGUMENT_COUNT,MAX_ARGUMENT_COUNT+1): ! parameters = GenerationParameters( argument_count ) ! invokables += invokable % parameters ! invokable_generators += invokable_generator % parameters final_header = header % locals() --- 141,148 ---- for argument_count in xrange(MIN_ARGUMENT_COUNT,MAX_ARGUMENT_COUNT+1): ! for is_const in (False,True): ! parameters = GenerationParameters( argument_count, is_const ) ! invokables += invokable % parameters ! invokable_generators += invokable_generator % parameters final_header = header % locals() Index: reflectionimpl10.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/reflectionimpl10.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** reflectionimpl10.h 4 Mar 2005 07:30:32 -0000 1.1 --- reflectionimpl10.h 5 Mar 2005 09:41:00 -0000 1.2 *************** *** 27,30 **** --- 27,51 ---- }; + template< class Object > + class InvokableConst0 : public InvokableBase + { + public: + typedef void (Object::*Member)( ) const; + + InvokableConst0( Member member ) + : member_( member ) + { + } + + void invoke( MethodCall &call ) const + { + Object &object = *any_cast( call.holder_, Type<Object *>() ); + (object.*member_)( ); + } + + private: + Member member_; + }; + template< class Object, class Arg1 > class Invokable1 : public InvokableBase *************** *** 48,51 **** --- 69,93 ---- }; + template< class Object, class Arg1 > + class InvokableConst1 : public InvokableBase + { + public: + typedef void (Object::*Member)( Arg1 ) const; + + InvokableConst1( Member member ) + : member_( member ) + { + } + + void invoke( MethodCall &call ) const + { + Object &object = *any_cast( call.holder_, Type<Object *>() ); + (object.*member_)( any_cast( call.args_.at(0), Type<Arg1>() ) ); + } + + private: + Member member_; + }; + template< class Object, class Arg1, class Arg2 > class Invokable2 : public InvokableBase *************** *** 70,73 **** --- 112,137 ---- }; + template< class Object, class Arg1, class Arg2 > + class InvokableConst2 : public InvokableBase + { + public: + typedef void (Object::*Member)( Arg1, Arg2 ) const; + + InvokableConst2( Member member ) + : member_( member ) + { + } + + void invoke( MethodCall &call ) const + { + Object &object = *any_cast( call.holder_, Type<Object *>() ); + (object.*member_)( any_cast( call.args_.at(0), Type<Arg1>() ) + ,any_cast( call.args_.at(1), Type<Arg2>() ) ); + } + + private: + Member member_; + }; + template< class Object, class Arg1, class Arg2, class Arg3 > class Invokable3 : public InvokableBase *************** *** 93,96 **** --- 157,183 ---- }; + template< class Object, class Arg1, class Arg2, class Arg3 > + class InvokableConst3 : public InvokableBase + { + public: + typedef void (Object::*Member)( Arg1, Arg2, Arg3 ) const; + + InvokableConst3( Member member ) + : member_( member ) + { + } + + void invoke( MethodCall &call ) const + { + Object &object = *any_cast( call.holder_, Type<Object *>() ); + (object.*member_)( any_cast( call.args_.at(0), Type<Arg1>() ) + ,any_cast( call.args_.at(1), Type<Arg2>() ) + ,any_cast( call.args_.at(2), Type<Arg3>() ) ); + } + + private: + Member member_; + }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4 > class Invokable4 : public InvokableBase *************** *** 117,120 **** --- 204,231 ---- }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4 > + class InvokableConst4 : public InvokableBase + { + public: + typedef void (Object::*Member)( Arg1, Arg2, Arg3, Arg4 ) const; + + InvokableConst4( Member member ) + : member_( member ) + { + } + + void invoke( MethodCall &call ) const + { + Object &object = *any_cast( call.holder_, Type<Object *>() ); + (object.*member_)( any_cast( call.args_.at(0), Type<Arg1>() ) + ,any_cast( call.args_.at(1), Type<Arg2>() ) + ,any_cast( call.args_.at(2), Type<Arg3>() ) + ,any_cast( call.args_.at(3), Type<Arg4>() ) ); + } + + private: + Member member_; + }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5 > class Invokable5 : public InvokableBase *************** *** 142,145 **** --- 253,281 ---- }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5 > + class InvokableConst5 : public InvokableBase + { + public: + typedef void (Object::*Member)( Arg1, Arg2, Arg3, Arg4, Arg5 ) const; + + InvokableConst5( Member member ) + : member_( member ) + { + } + + void invoke( MethodCall &call ) const + { + Object &object = *any_cast( call.holder_, Type<Object *>() ); + (object.*member_)( any_cast( call.args_.at(0), Type<Arg1>() ) + ,any_cast( call.args_.at(1), Type<Arg2>() ) + ,any_cast( call.args_.at(2), Type<Arg3>() ) + ,any_cast( call.args_.at(3), Type<Arg4>() ) + ,any_cast( call.args_.at(4), Type<Arg5>() ) ); + } + + private: + Member member_; + }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6 > class Invokable6 : public InvokableBase *************** *** 168,171 **** --- 304,333 ---- }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6 > + class InvokableConst6 : public InvokableBase + { + public: + typedef void (Object::*Member)( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6 ) const; + + InvokableConst6( Member member ) + : member_( member ) + { + } + + void invoke( MethodCall &call ) const + { + Object &object = *any_cast( call.holder_, Type<Object *>() ); + (object.*member_)( any_cast( call.args_.at(0), Type<Arg1>() ) + ,any_cast( call.args_.at(1), Type<Arg2>() ) + ,any_cast( call.args_.at(2), Type<Arg3>() ) + ,any_cast( call.args_.at(3), Type<Arg4>() ) + ,any_cast( call.args_.at(4), Type<Arg5>() ) + ,any_cast( call.args_.at(5), Type<Arg6>() ) ); + } + + private: + Member member_; + }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7 > class Invokable7 : public InvokableBase *************** *** 195,198 **** --- 357,387 ---- }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7 > + class InvokableConst7 : public InvokableBase + { + public: + typedef void (Object::*Member)( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7 ) const; + + InvokableConst7( Member member ) + : member_( member ) + { + } + + void invoke( MethodCall &call ) const + { + Object &object = *any_cast( call.holder_, Type<Object *>() ); + (object.*member_)( any_cast( call.args_.at(0), Type<Arg1>() ) + ,any_cast( call.args_.at(1), Type<Arg2>() ) + ,any_cast( call.args_.at(2), Type<Arg3>() ) + ,any_cast( call.args_.at(3), Type<Arg4>() ) + ,any_cast( call.args_.at(4), Type<Arg5>() ) + ,any_cast( call.args_.at(5), Type<Arg6>() ) + ,any_cast( call.args_.at(6), Type<Arg7>() ) ); + } + + private: + Member member_; + }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8 > class Invokable8 : public InvokableBase *************** *** 223,226 **** --- 412,443 ---- }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8 > + class InvokableConst8 : public InvokableBase + { + public: + typedef void (Object::*Member)( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8 ) const; + + InvokableConst8( Member member ) + : member_( member ) + { + } + + void invoke( MethodCall &call ) const + { + Object &object = *any_cast( call.holder_, Type<Object *>() ); + (object.*member_)( any_cast( call.args_.at(0), Type<Arg1>() ) + ,any_cast( call.args_.at(1), Type<Arg2>() ) + ,any_cast( call.args_.at(2), Type<Arg3>() ) + ,any_cast( call.args_.at(3), Type<Arg4>() ) + ,any_cast( call.args_.at(4), Type<Arg5>() ) + ,any_cast( call.args_.at(5), Type<Arg6>() ) + ,any_cast( call.args_.at(6), Type<Arg7>() ) + ,any_cast( call.args_.at(7), Type<Arg8>() ) ); + } + + private: + Member member_; + }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9 > class Invokable9 : public InvokableBase *************** *** 252,255 **** --- 469,501 ---- }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9 > + class InvokableConst9 : public InvokableBase + { + public: + typedef void (Object::*Member)( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9 ) const; + + InvokableConst9( Member member ) + : member_( member ) + { + } + + void invoke( MethodCall &call ) const + { + Object &object = *any_cast( call.holder_, Type<Object *>() ); + (object.*member_)( any_cast( call.args_.at(0), Type<Arg1>() ) + ,any_cast( call.args_.at(1), Type<Arg2>() ) + ,any_cast( call.args_.at(2), Type<Arg3>() ) + ,any_cast( call.args_.at(3), Type<Arg4>() ) + ,any_cast( call.args_.at(4), Type<Arg5>() ) + ,any_cast( call.args_.at(5), Type<Arg6>() ) + ,any_cast( call.args_.at(6), Type<Arg7>() ) + ,any_cast( call.args_.at(7), Type<Arg8>() ) + ,any_cast( call.args_.at(8), Type<Arg9>() ) ); + } + + private: + Member member_; + }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9, class Arg10 > class Invokable10 : public InvokableBase *************** *** 282,285 **** --- 528,585 ---- }; + template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9, class Arg10 > + class InvokableConst10 : public InvokableBase + { + public: + typedef void (Object::*Member)( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10 ) const; + + InvokableConst10( Member member ) + : member_( member ) + { + } + + void invoke( MethodCall &call ) const + { + Object &object = *any_cast( call.holder_, Type<Object *>() ); + (object.*member_)( any_cast( call.args_.at(0), Type<Arg1>() ) + ,any_cast( call.args_.at(1), Type<Arg2>() ) + ,any_cast( call.args_.at(2), Type<Arg3>() ) + ,any_cast( call.args_.at(3), Type<Arg4>() ) + ,any_cast( call.args_.at(4), Type<Arg5>() ) + ,any_cast( call.args_.at(5), Type<Arg6>() ) + ,any_cast( call.args_.at(6), Type<Arg7>() ) + ,any_cast( call.args_.at(7), Type<Arg8>() ) + ,any_cast( call.args_.at(8), Type<Arg9>() ) + ,any_cast( call.args_.at(9), Type<Arg10>() ) ); + } + + private: + Member member_; + }; + + + + + template< class Arg1 > + void registerArgTypes( Invokable &invokable, Type<Arg1> ) + { + invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); + } + + template< class Arg1, class Arg2 > + void registerArgTypes( Invokable &invokable, Type<Arg1>, Type<Arg2> ) + { + registerArgTypes( invokable, Type<Arg1>() ); + registerArgTypes( invokable, Type<Arg2>() ); + + } + + template< class Arg1, class Arg2, class Arg3 > + void registerArgTypes( Invokable &invokable, Type<Arg1>, Type<Arg2>, Type<Arg3> ) + { + registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>() ); + registerArgTypes( invokable, Type<Arg3>() ); + + } *************** *** 293,301 **** } template< class Object, class Arg1 > Invokable makeInvokable( void (Object::*member)( Arg1 ) ) { Invokable invokable( InvokableBasePtr( new Invokable1< Object, Arg1 >( member ) ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); return invokable; } --- 593,619 ---- } + template< class Object > + Invokable makeInvokable( void (Object::*member)( ) const ) + { + Invokable invokable( InvokableBasePtr( new InvokableConst0< Object >( member ) ) ); + + return invokable; + } + template< class Object, class Arg1 > Invokable makeInvokable( void (Object::*member)( Arg1 ) ) { Invokable invokable( InvokableBasePtr( new Invokable1< Object, Arg1 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>() ); ! ! return invokable; ! } ! ! template< class Object, class Arg1 > ! Invokable makeInvokable( void (Object::*member)( Arg1 ) const ) ! { ! Invokable invokable( InvokableBasePtr( new InvokableConst1< Object, Arg1 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>() ); ! return invokable; } *************** *** 305,310 **** { Invokable invokable( InvokableBasePtr( new Invokable2< Object, Arg1, Arg2 >( member ) ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg2>() ) ); return invokable; } --- 623,637 ---- { Invokable invokable( InvokableBasePtr( new Invokable2< Object, Arg1, Arg2 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>() ); ! ! return invokable; ! } ! ! template< class Object, class Arg1, class Arg2 > ! Invokable makeInvokable( void (Object::*member)( Arg1, Arg2 ) const ) ! { ! Invokable invokable( InvokableBasePtr( new InvokableConst2< Object, Arg1, Arg2 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>() ); ! return invokable; } *************** *** 314,320 **** { Invokable invokable( InvokableBasePtr( new Invokable3< Object, Arg1, Arg2, Arg3 >( member ) ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg2>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg3>() ) ); return invokable; } --- 641,655 ---- { Invokable invokable( InvokableBasePtr( new Invokable3< Object, Arg1, Arg2, Arg3 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! ! return invokable; ! } ! ! template< class Object, class Arg1, class Arg2, class Arg3 > ! Invokable makeInvokable( void (Object::*member)( Arg1, Arg2, Arg3 ) const ) ! { ! Invokable invokable( InvokableBasePtr( new InvokableConst3< Object, Arg1, Arg2, Arg3 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! return invokable; } *************** *** 324,331 **** { Invokable invokable( InvokableBasePtr( new Invokable4< Object, Arg1, Arg2, Arg3, Arg4 >( member ) ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg2>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg3>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg4>() ) ); return invokable; } --- 659,675 ---- { Invokable invokable( InvokableBasePtr( new Invokable4< Object, Arg1, Arg2, Arg3, Arg4 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>() ); ! ! return invokable; ! } ! ! template< class Object, class Arg1, class Arg2, class Arg3, class Arg4 > ! Invokable makeInvokable( void (Object::*member)( Arg1, Arg2, Arg3, Arg4 ) const ) ! { ! Invokable invokable( InvokableBasePtr( new InvokableConst4< Object, Arg1, Arg2, Arg3, Arg4 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>() ); ! return invokable; } *************** *** 335,343 **** { Invokable invokable( InvokableBasePtr( new Invokable5< Object, Arg1, Arg2, Arg3, Arg4, Arg5 >( member ) ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg2>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg3>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg4>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg5>() ) ); return invokable; } --- 679,695 ---- { Invokable invokable( InvokableBasePtr( new Invokable5< Object, Arg1, Arg2, Arg3, Arg4, Arg5 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>() ); ! ! return invokable; ! } ! ! template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5 > ! Invokable makeInvokable( void (Object::*member)( Arg1, Arg2, Arg3, Arg4, Arg5 ) const ) ! { ! Invokable invokable( InvokableBasePtr( new InvokableConst5< Object, Arg1, Arg2, Arg3, Arg4, Arg5 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>() ); ! return invokable; } *************** *** 347,356 **** { Invokable invokable( InvokableBasePtr( new Invokable6< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6 >( member ) ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg2>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg3>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg4>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg5>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg6>() ) ); return invokable; } --- 699,715 ---- { Invokable invokable( InvokableBasePtr( new Invokable6< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>(), Type<Arg6>() ); ! ! return invokable; ! } ! ! template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6 > ! Invokable makeInvokable( void (Object::*member)( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6 ) const ) ! { ! Invokable invokable( InvokableBasePtr( new InvokableConst6< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>(), Type<Arg6>() ); ! return invokable; } *************** *** 360,370 **** { Invokable invokable( InvokableBasePtr( new Invokable7< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7 >( member ) ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg2>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg3>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg4>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg5>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg6>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg7>() ) ); return invokable; } --- 719,737 ---- { Invokable invokable( InvokableBasePtr( new Invokable7< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>(), Type<Arg6>() ); ! registerArgTypes( invokable, Type<Arg7>() ); ! ! return invokable; ! } ! ! template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7 > ! Invokable makeInvokable( void (Object::*member)( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7 ) const ) ! { ! Invokable invokable( InvokableBasePtr( new InvokableConst7< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>(), Type<Arg6>() ); ! registerArgTypes( invokable, Type<Arg7>() ); ! return invokable; } *************** *** 374,385 **** { Invokable invokable( InvokableBasePtr( new Invokable8< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8 >( member ) ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg2>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg3>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg4>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg5>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg6>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg7>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg8>() ) ); return invokable; } --- 741,759 ---- { Invokable invokable( InvokableBasePtr( new Invokable8< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>(), Type<Arg6>() ); ! registerArgTypes( invokable, Type<Arg7>(), Type<Arg8>() ); ! ! return invokable; ! } ! ! template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8 > ! Invokable makeInvokable( void (Object::*member)( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8 ) const ) ! { ! Invokable invokable( InvokableBasePtr( new InvokableConst8< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>(), Type<Arg6>() ); ! registerArgTypes( invokable, Type<Arg7>(), Type<Arg8>() ); ! return invokable; } *************** *** 389,401 **** { Invokable invokable( InvokableBasePtr( new Invokable9< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9 >( member ) ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg2>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg3>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg4>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg5>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg6>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg7>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg8>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg9>() ) ); return invokable; } --- 763,781 ---- { Invokable invokable( InvokableBasePtr( new Invokable9< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>(), Type<Arg6>() ); ! registerArgTypes( invokable, Type<Arg7>(), Type<Arg8>(), Type<Arg9>() ); ! ! return invokable; ! } ! ! template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9 > ! Invokable makeInvokable( void (Object::*member)( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9 ) const ) ! { ! Invokable invokable( InvokableBasePtr( new InvokableConst9< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>(), Type<Arg6>() ); ! registerArgTypes( invokable, Type<Arg7>(), Type<Arg8>(), Type<Arg9>() ); ! return invokable; } *************** *** 405,418 **** { Invokable invokable( InvokableBasePtr( new Invokable10< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10 >( member ) ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg1>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg2>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg3>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg4>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg5>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg6>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg7>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg8>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg9>() ) ); ! invokable.argTypes_.push_back( typeId( Type<Arg10>() ) ); return invokable; } --- 785,805 ---- { Invokable invokable( InvokableBasePtr( new Invokable10< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>(), Type<Arg6>() ); ! registerArgTypes( invokable, Type<Arg7>(), Type<Arg8>(), Type<Arg9>() ); ! registerArgTypes( invokable, Type<Arg10>() ); ! ! return invokable; ! } ! ! template< class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9, class Arg10 > ! Invokable makeInvokable( void (Object::*member)( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10 ) const ) ! { ! Invokable invokable( InvokableBasePtr( new InvokableConst10< Object, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10 >( member ) ) ); ! registerArgTypes( invokable, Type<Arg1>(), Type<Arg2>(), Type<Arg3>() ); ! registerArgTypes( invokable, Type<Arg4>(), Type<Arg5>(), Type<Arg6>() ); ! registerArgTypes( invokable, Type<Arg7>(), Type<Arg8>(), Type<Arg9>() ); ! registerArgTypes( invokable, Type<Arg10>() ); ! return invokable; } |
From: Baptiste L. <bl...@us...> - 2005-03-05 09:41:09
|
Update of /cvsroot/cppunit/cppunit2/src/cpputtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1644/src/cpputtest Modified Files: reflectiontest.cpp Log Message: * added support for reflection of const methods * factorised parameter type registration for better template function reuse. Index: reflectiontest.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/reflectiontest.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** reflectiontest.cpp 3 Mar 2005 20:48:54 -0000 1.2 --- reflectiontest.cpp 5 Mar 2005 09:41:00 -0000 1.3 *************** *** 38,42 **** } ! void checkTotal( int expected ) { CPPUT_ASSERT_EQUAL( expected, total_, "Total did not match expected value" ); --- 38,42 ---- } ! void checkTotal( int expected ) const { CPPUT_ASSERT_EQUAL( expected, total_, "Total did not match expected value" ); |
From: Baptiste L. <bl...@us...> - 2005-03-04 22:23:29
|
Update of /cvsroot/cppunit/cppunit2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4564 Modified Files: sconstruct Log Message: * build platform must now be specified on the command-line: scons platform=mingw Index: sconstruct =================================================================== RCS file: /cvsroot/cppunit/cppunit2/sconstruct,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sconstruct 4 Mar 2005 08:23:39 -0000 1.7 --- sconstruct 4 Mar 2005 22:23:20 -0000 1.8 *************** *** 2,6 **** import os.path ! platform = 'mingw' build_dir = os.path.join( '#buildscons', platform ) --- 2,11 ---- import os.path ! options = Options() ! options.Add( 'platform', 'platform used to build cppunit 2: suncc, vacpp, mingw, msvc6, msvc7, msvc71', 'mingw' ) ! ! platform = ARGUMENTS.get( 'platform' ) ! ##print ARGUMENTS ! ##print "PLATFORM=", platform build_dir = os.path.join( '#buildscons', platform ) *************** *** 17,35 **** SConsignFile( sconsign_path ) if platform == 'suncc': ! env = Environment( ENV = {'PATH' : os.environ['PATH']}, ! CPPPATH = '#include', ! LIBPATH = '#libs', ! tools=['default','suncc'] ) elif platform == 'vacpp': ! env = Environment( ENV = {'PATH' : os.environ['PATH']}, ! CCFLAGS = '-qrtti=all', ! tools=['default','aixcc'], ! CXX ='xlC_r', ! LINKFLAGS='-bh:5' ) # -bh:5 remove duplicate symbol warning ! elif platform == 'msvc': ! env = Environment( CCFLAGS = '-GX -GR -nologo' ) elif platform == 'mingw': ! env = Environment( tools=['default','mingw'] ) env.Append( CPPPATH = '#include', --- 22,69 ---- SConsignFile( sconsign_path ) + ##if platform == 'suncc': + ## env = Environment( ENV = {'PATH' : os.environ['PATH']}, + ## tools=['default','suncc'] ) + ##elif platform == 'vacpp': + ## env = Environment( ENV = {'PATH' : os.environ['PATH']}, + ## CCFLAGS = '-qrtti=all', + ## tools=['default','aixcc'], + ## CXX ='xlC_r', + ## LINKFLAGS='-bh:5' ) # -bh:5 remove duplicate symbol warning + ##elif platform == 'msvc': + ## env = Environment( CCFLAGS = '-GX -GR -nologo' ) + ##elif platform == 'mingw': + ## env = Environment( tools=['default','mingw'] ) + + env = Environment( ENV = {'PATH' : os.environ['PATH']}, + tools=[] ) #, tools=['default'] ) + if platform == 'suncc': ! env.Tools( 'suncc' ) elif platform == 'vacpp': ! env.Tool( 'default', 'aixcc' ) ! env.Append( CCFLAGS = '-qrtti=all', ! CXX ='xlC_r', #scons does not pick-up the correct one ! ! LINKFLAGS='-bh:5' ) # -bh:5 remove duplicate symbol warning ! elif platform == 'msvc6': ! env['MSVS_VERSION']='6.0' ! for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']: ! env.Tool( tool ) ! env['CXXFLAGS']='-GR -GX' ! elif platform == 'msvc70': ! env['MSVS_VERSION']='7.0' ! for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']: ! env.Tool( tool ) ! env['CXXFLAGS']='-GR -GX' ! elif platform == 'msvc71': ! env['MSVS_VERSION']='7.1' ! for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']: ! env.Tool( tool ) ! env['CXXFLAGS']='-GR -GX' elif platform == 'mingw': ! env.Tool( 'mingw' ) ! else: ! print "UNSUPPORTED PLATFORM." ! env.Exit(1) env.Append( CPPPATH = '#include', |
From: Baptiste L. <bl...@us...> - 2005-03-04 22:18:27
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3159/include/cpptl Modified Files: reflection.inl Log Message: * fixed bad return statement in void Functor. Index: reflection.inl =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/reflection.inl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** reflection.inl 3 Mar 2005 20:48:54 -0000 1.2 --- reflection.inl 4 Mar 2005 22:18:14 -0000 1.3 *************** *** 195,199 **** const Any &value ) const { ! return accessor_->set( object, value ); } --- 195,199 ---- const Any &value ) const { ! accessor_->set( object, value ); } |