You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(76) |
Jun
(1) |
Jul
|
Aug
(13) |
Sep
|
Oct
|
Nov
|
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(53) |
Feb
(31) |
Mar
|
Apr
(3) |
May
|
Jun
(4) |
Jul
(2) |
Aug
|
Sep
|
Oct
(3) |
Nov
(2) |
Dec
(1) |
2004 |
Jan
(5) |
Feb
(52) |
Mar
(23) |
Apr
(40) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(2) |
Nov
(5) |
Dec
|
2005 |
Jan
|
Feb
(5) |
Mar
|
Apr
(8) |
May
(6) |
Jun
(5) |
Jul
|
Aug
(2) |
Sep
|
Oct
(3) |
Nov
|
Dec
(4) |
2006 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(20) |
May
(2) |
Jun
(31) |
Jul
(30) |
Aug
(20) |
Sep
(1) |
Oct
|
Nov
(14) |
Dec
|
2007 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(37) |
Jul
(8) |
Aug
(10) |
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
(15) |
Apr
(4) |
May
(4) |
Jun
|
Jul
(1) |
Aug
|
Sep
(11) |
Oct
(4) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(18) |
Aug
(3) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: <pat...@us...> - 2010-07-23 23:11:46
|
Revision: 660 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=660&view=rev Author: patrickh Date: 2010-07-23 23:11:39 +0000 (Fri, 23 Jul 2010) Log Message: ----------- Use std::tr1::unordered_map when building with Visual C++ 9.0 and newer. Modified Paths: -------------- trunk/cppdom/cppdom.h Modified: trunk/cppdom/cppdom.h =================================================================== --- trunk/cppdom/cppdom.h 2010-05-09 20:45:27 UTC (rev 659) +++ trunk/cppdom/cppdom.h 2010-07-23 23:11:39 UTC (rev 660) @@ -75,8 +75,15 @@ // Use fastest map available #if defined(CPPDOM_USE_HASH_MAP) -# if defined(__GNUC__) && (__GNUC__ >= 4) -# include <tr1/unordered_map> +# if defined(__GNUC__) && __GNUC__ >= 4 || \ + defined(_MSC_VER) && _MSC_VER >= 1500 + +# if defined(__GNUC__) +# include <tr1/unordered_map> +# else +# include <unordered_map> +# endif + # include <map> namespace cppdom This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-05-09 20:45:34
|
Revision: 659 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=659&view=rev Author: patrickh Date: 2010-05-09 20:45:27 +0000 (Sun, 09 May 2010) Log Message: ----------- Merged r657 from the trunk: When using GCC 4.x or newer, prefer the use of std::tr1::unordered_map over the deprecated, non-standard std::hash_map. Submitted by: Jan P. Springer Modified Paths: -------------- branches/1.0/cppdom/cppdom.h Modified: branches/1.0/cppdom/cppdom.h =================================================================== --- branches/1.0/cppdom/cppdom.h 2010-05-09 20:39:42 UTC (rev 658) +++ branches/1.0/cppdom/cppdom.h 2010-05-09 20:45:27 UTC (rev 659) @@ -73,11 +73,22 @@ #define CPPDOM_USE_HASH_MAP 1 // Use fastest map available -#if defined(CPPDOM_USE_HASH_MAP) && defined(__GNUC__) && (__GNUC__ >= 3) +#if defined(CPPDOM_USE_HASH_MAP) -#include <ext/hash_map> -#include <map> +# if defined(__GNUC__) && (__GNUC__ >= 4) +# include <tr1/unordered_map> +# include <map> +namespace cppdom +{ + typedef std::tr1::unordered_map<TagNameHandle,std::string> TagNameMap_t; + typedef std::tr1::unordered_map<std::string, TagNameHandle> NameToTagMap_t; +} + +# elif defined(__GNUC__) && (__GNUC__ >= 3) +# include <ext/hash_map> +# include <map> + namespace std { using namespace __gnu_cxx; } @@ -92,16 +103,18 @@ typedef std::hash_map<TagNameHandle,std::string> TagNameMap_t; typedef std::hash_map<std::string, TagNameHandle, HashString> NameToTagMap_t; } +# endif // # elif defined(__GNUC__) && (__GNUC__ >= 3) -#else +#else // #if defined(CPPDOM_USE_HASH_MAP) -#include <map> +# include <map> + namespace cppdom { typedef std::map<TagNameHandle,std::string> TagNameMap_t; typedef std::map<std::string, TagNameHandle> NameToTagMap_t; } -#endif +#endif // #if defined(CPPDOM_USE_HASH_MAP) #include "config.h" #include "shared_ptr.h" // the boost::shared_ptr class This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-05-09 20:39:48
|
Revision: 658 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=658&view=rev Author: patrickh Date: 2010-05-09 20:39:42 +0000 (Sun, 09 May 2010) Log Message: ----------- Merged r656 from the trunk: Avoid polluting the global namespace with 'using namespace' declarations in a header file. Submitted by: Jan P. Springer Modified Paths: -------------- branches/1.0/cppdom/SpiritParser.cpp branches/1.0/cppdom/SpiritParser.h Modified: branches/1.0/cppdom/SpiritParser.cpp =================================================================== --- branches/1.0/cppdom/SpiritParser.cpp 2010-05-09 20:37:14 UTC (rev 657) +++ branches/1.0/cppdom/SpiritParser.cpp 2010-05-09 20:39:42 UTC (rev 658) @@ -41,6 +41,9 @@ */ #include <cppdom/SpiritParser.h> +namespace bs = boost::spirit; +using namespace boost::spirit; + namespace cppdom { Modified: branches/1.0/cppdom/SpiritParser.h =================================================================== --- branches/1.0/cppdom/SpiritParser.h 2010-05-09 20:37:14 UTC (rev 657) +++ branches/1.0/cppdom/SpiritParser.h 2010-05-09 20:39:42 UTC (rev 658) @@ -56,10 +56,6 @@ #include <boost/spirit/iterator/multi_pass.hpp> #include <iostream> - -namespace bs = boost::spirit; -using namespace boost::spirit; - namespace cppdom { @@ -193,7 +189,7 @@ * type: BUILDER_T must implement the interface concept similar to XmlBuilder above. */ template<typename BUILDER_T> -struct XmlGrammar : public grammar<XmlGrammar<BUILDER_T> > +struct XmlGrammar : public boost::spirit::grammar<XmlGrammar<BUILDER_T> > { XmlGrammar(BUILDER_T* builder) : mBuilder(builder) @@ -207,6 +203,9 @@ { definition(XmlGrammar const& self) { + namespace bs = boost::spirit; + using namespace boost::spirit; + document = prolog >> element >> *misc; // Main document root ws = +space_p; // Whitespace, simplified from XML spec @@ -273,7 +272,7 @@ BOOST_SPIRIT_DEBUG_RULE(xmldecl); } - rule<ScannerT> attribute, + boost::spirit::rule<ScannerT> attribute, attrib_value, cdata_sect, cdata, @@ -295,7 +294,7 @@ xmldecl ; - rule<ScannerT> const& start() const + boost::spirit::rule<ScannerT> const& start() const { return document; } }; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-05-09 20:37:20
|
Revision: 657 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=657&view=rev Author: patrickh Date: 2010-05-09 20:37:14 +0000 (Sun, 09 May 2010) Log Message: ----------- When using GCC 4.x or newer, prefer the use of std::tr1::unordered_map over the deprecated, non-standard std::hash_map. Submitted by: Jan P. Springer Modified Paths: -------------- trunk/cppdom/cppdom.h Modified: trunk/cppdom/cppdom.h =================================================================== --- trunk/cppdom/cppdom.h 2010-05-09 20:35:24 UTC (rev 656) +++ trunk/cppdom/cppdom.h 2010-05-09 20:37:14 UTC (rev 657) @@ -73,11 +73,22 @@ #define CPPDOM_USE_HASH_MAP 1 // Use fastest map available -#if defined(CPPDOM_USE_HASH_MAP) && defined(__GNUC__) && (__GNUC__ >= 3) +#if defined(CPPDOM_USE_HASH_MAP) -#include <ext/hash_map> -#include <map> +# if defined(__GNUC__) && (__GNUC__ >= 4) +# include <tr1/unordered_map> +# include <map> +namespace cppdom +{ + typedef std::tr1::unordered_map<TagNameHandle,std::string> TagNameMap_t; + typedef std::tr1::unordered_map<std::string, TagNameHandle> NameToTagMap_t; +} + +# elif defined(__GNUC__) && (__GNUC__ >= 3) +# include <ext/hash_map> +# include <map> + namespace std { using namespace __gnu_cxx; } @@ -92,16 +103,18 @@ typedef std::hash_map<TagNameHandle,std::string> TagNameMap_t; typedef std::hash_map<std::string, TagNameHandle, HashString> NameToTagMap_t; } +# endif // # elif defined(__GNUC__) && (__GNUC__ >= 3) -#else +#else // #if defined(CPPDOM_USE_HASH_MAP) -#include <map> +# include <map> + namespace cppdom { typedef std::map<TagNameHandle,std::string> TagNameMap_t; typedef std::map<std::string, TagNameHandle> NameToTagMap_t; } -#endif +#endif // #if defined(CPPDOM_USE_HASH_MAP) #include "config.h" #include "shared_ptr.h" // the boost::shared_ptr class This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-05-09 20:35:30
|
Revision: 656 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=656&view=rev Author: patrickh Date: 2010-05-09 20:35:24 +0000 (Sun, 09 May 2010) Log Message: ----------- Avoid polluting the global namespace with 'using namespace' declarations in a header file. Submitted by: Jan P. Springer Modified Paths: -------------- trunk/cppdom/SpiritParser.cpp trunk/cppdom/SpiritParser.h Modified: trunk/cppdom/SpiritParser.cpp =================================================================== --- trunk/cppdom/SpiritParser.cpp 2010-04-14 13:26:39 UTC (rev 655) +++ trunk/cppdom/SpiritParser.cpp 2010-05-09 20:35:24 UTC (rev 656) @@ -41,6 +41,9 @@ */ #include <cppdom/SpiritParser.h> +namespace bs = boost::spirit; +using namespace boost::spirit; + namespace cppdom { Modified: trunk/cppdom/SpiritParser.h =================================================================== --- trunk/cppdom/SpiritParser.h 2010-04-14 13:26:39 UTC (rev 655) +++ trunk/cppdom/SpiritParser.h 2010-05-09 20:35:24 UTC (rev 656) @@ -56,10 +56,6 @@ #include <boost/spirit/iterator/multi_pass.hpp> #include <iostream> - -namespace bs = boost::spirit; -using namespace boost::spirit; - namespace cppdom { @@ -194,7 +190,7 @@ * XmlBuilder above. */ template<typename BUILDER_T> -struct XmlGrammar : public grammar<XmlGrammar<BUILDER_T> > +struct XmlGrammar : public boost::spirit::grammar<XmlGrammar<BUILDER_T> > { XmlGrammar(BUILDER_T* builder) : mBuilder(builder) @@ -208,6 +204,9 @@ { definition(XmlGrammar const& self) { + namespace bs = boost::spirit; + using namespace boost::spirit; + document = prolog >> element >> *misc; // Main document root ws = +space_p; // Whitespace, simplified from XML spec @@ -274,7 +273,7 @@ BOOST_SPIRIT_DEBUG_RULE(xmldecl); } - rule<ScannerT> attribute, + boost::spirit::rule<ScannerT> attribute, attrib_value, cdata_sect, cdata, @@ -296,7 +295,7 @@ xmldecl ; - rule<ScannerT> const& start() const + boost::spirit::rule<ScannerT> const& start() const { return document; } }; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-04-14 13:26:46
|
Revision: 655 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=655&view=rev Author: patrickh Date: 2010-04-14 13:26:39 +0000 (Wed, 14 Apr 2010) Log Message: ----------- Roll the version to 1.1.2. Modified Paths: -------------- trunk/ChangeLog trunk/cppdom/version.h trunk/cppdom.spec Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-04-14 13:25:20 UTC (rev 654) +++ trunk/ChangeLog 2010-04-14 13:26:39 UTC (rev 655) @@ -1,5 +1,8 @@ DATE AUTHOR CHANGE ---------- ----------- ------------------------------------------------------- +2010-04-14 patrickh Preserve newlines in CDATA. + Submitted by: Carsten Neumann + VERSION: 1.1.2 2010-03-06 patrickh Fixed conflicts with the operator<< overload for std::ostream and implicit constructio of cppdom::Attribute objects. Modified: trunk/cppdom/version.h =================================================================== --- trunk/cppdom/version.h 2010-04-14 13:25:20 UTC (rev 654) +++ trunk/cppdom/version.h 2010-04-14 13:26:39 UTC (rev 655) @@ -55,7 +55,7 @@ // The major/minor/patch version (up to 3 digits each). #define CPPDOM_VERSION_MAJOR 1 #define CPPDOM_VERSION_MINOR 1 -#define CPPDOM_VERSION_PATCH 1 +#define CPPDOM_VERSION_PATCH 2 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- Modified: trunk/cppdom.spec =================================================================== --- trunk/cppdom.spec 2010-04-14 13:25:20 UTC (rev 654) +++ trunk/cppdom.spec 2010-04-14 13:26:39 UTC (rev 655) @@ -1,6 +1,6 @@ # Spec file for cppdom. %define name cppdom -%define version 1.1.1 +%define version 1.1.2 %define release 1 Name: %{name} @@ -127,6 +127,9 @@ %doc %{_docdir}/cppdom-%{version}/html %changelog +* Wed Apr 14 2010 Patrick Hartling <pa...@pr...> 1.1.2-1 +- Updated to version 1.1.2. + * Sat Mar 06 2010 Patrick Hartling <pa...@pr...> 1.1.1-1 - Updated to version 1.1.1. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-04-14 13:25:26
|
Revision: 654 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=654&view=rev Author: patrickh Date: 2010-04-14 13:25:20 +0000 (Wed, 14 Apr 2010) Log Message: ----------- Roll the version to 1.0.2. Modified Paths: -------------- branches/1.0/ChangeLog branches/1.0/cppdom/version.h branches/1.0/cppdom.spec Modified: branches/1.0/ChangeLog =================================================================== --- branches/1.0/ChangeLog 2010-04-14 13:25:08 UTC (rev 653) +++ branches/1.0/ChangeLog 2010-04-14 13:25:20 UTC (rev 654) @@ -1,7 +1,12 @@ DATE AUTHOR CHANGE ---------- ----------- ------------------------------------------------------- -[Version 1.0.1 released - 3.2.2009]============================================ +[Version 1.0.2 released - 4.14.2010]=========================================== +2010-04-14 patrickh Preserve newlines in CDATA. + Submitted by: Carsten Neumann + +[Version 1.0.1 released - 3.2.2010]============================================ + 2010-03-06 patrickh Fixed conflicts with the operator<< overload for std::ostream and implicit constructio of cppdom::Attribute objects. Modified: branches/1.0/cppdom/version.h =================================================================== --- branches/1.0/cppdom/version.h 2010-04-14 13:25:08 UTC (rev 653) +++ branches/1.0/cppdom/version.h 2010-04-14 13:25:20 UTC (rev 654) @@ -55,7 +55,7 @@ // The major/minor/patch version (up to 3 digits each). #define CPPDOM_VERSION_MAJOR 1 #define CPPDOM_VERSION_MINOR 0 -#define CPPDOM_VERSION_PATCH 1 +#define CPPDOM_VERSION_PATCH 2 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- Modified: branches/1.0/cppdom.spec =================================================================== --- branches/1.0/cppdom.spec 2010-04-14 13:25:08 UTC (rev 653) +++ branches/1.0/cppdom.spec 2010-04-14 13:25:20 UTC (rev 654) @@ -1,6 +1,6 @@ # Spec file for cppdom. %define name cppdom -%define version 1.0.1 +%define version 1.0.2 %define release 1 Name: %{name} @@ -127,6 +127,9 @@ %doc %{_docdir}/cppdom-%{version}/html %changelog +* Wed Apr 14 2010 Patrick Hartling <pa...@pr...> 1.0.2-1 +- Updated to version 1.0.2. + * Sat Mar 06 2010 Patrick Hartling <pa...@pr...> 1.0.1-1 - Updated to version 1.0.1. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-04-14 13:25:17
|
Revision: 653 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=653&view=rev Author: patrickh Date: 2010-04-14 13:25:08 +0000 (Wed, 14 Apr 2010) Log Message: ----------- Merged r652 from the trunk: Preserve newlines in CDATA. Submitted by: Carsten Neumann Modified Paths: -------------- branches/1.0/cppdom/xmltokenizer.cpp Modified: branches/1.0/cppdom/xmltokenizer.cpp =================================================================== --- branches/1.0/cppdom/xmltokenizer.cpp 2010-04-14 13:22:25 UTC (rev 652) +++ branches/1.0/cppdom/xmltokenizer.cpp 2010-04-14 13:25:08 UTC (rev 653) @@ -284,12 +284,8 @@ // a newline char? if (isNewLine(c) ) { - if (mCdataMode && generic.length() != 0) + if (!mCdataMode || generic.length() == 0) { - c = ' '; - } - else - { continue; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-04-14 13:22:31
|
Revision: 652 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=652&view=rev Author: patrickh Date: 2010-04-14 13:22:25 +0000 (Wed, 14 Apr 2010) Log Message: ----------- Preserve newlines in CDATA. Submitted by: Carsten Neumann Modified Paths: -------------- trunk/cppdom/xmltokenizer.cpp Modified: trunk/cppdom/xmltokenizer.cpp =================================================================== --- trunk/cppdom/xmltokenizer.cpp 2010-03-06 17:19:51 UTC (rev 651) +++ trunk/cppdom/xmltokenizer.cpp 2010-04-14 13:22:25 UTC (rev 652) @@ -284,12 +284,8 @@ // a newline char? if (isNewLine(c) ) { - if (mCdataMode && generic.length() != 0) + if (!mCdataMode || generic.length() == 0) { - c = ' '; - } - else - { continue; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 17:19:57
|
Revision: 651 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=651&view=rev Author: patrickh Date: 2010-03-06 17:19:51 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Updated for version 1.1.1. Modified Paths: -------------- trunk/cppdom.spec Modified: trunk/cppdom.spec =================================================================== --- trunk/cppdom.spec 2010-03-06 17:10:08 UTC (rev 650) +++ trunk/cppdom.spec 2010-03-06 17:19:51 UTC (rev 651) @@ -1,6 +1,6 @@ # Spec file for cppdom. %define name cppdom -%define version 1.1.0 +%define version 1.1.1 %define release 1 Name: %{name} @@ -127,10 +127,13 @@ %doc %{_docdir}/cppdom-%{version}/html %changelog -* Mon Mar 02 2009 Patrick Hartling <pat...@pr...> 1.1.0-1 +* Sat Mar 06 2010 Patrick Hartling <pa...@pr...> 1.1.1-1 +- Updated to version 1.1.1. + +* Mon Mar 02 2009 Patrick Hartling <pa...@pr...> 1.1.0-1 - Updated to version 1.1.0. -* Mon Mar 02 2009 Patrick Hartling <pat...@pr...> 1.0.0-1 +* Mon Mar 02 2009 Patrick Hartling <pa...@pr...> 1.0.0-1 - Updated to version 1.0.0. * Wed Aug 01 2007 Patrick Hartling <pa...@in...> 0.7.10-1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 17:10:14
|
Revision: 650 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=650&view=rev Author: patrickh Date: 2010-03-06 17:10:08 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Tag version 1.0.1. Added Paths: ----------- tags/1.0.1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 17:09:29
|
Revision: 649 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=649&view=rev Author: patrickh Date: 2010-03-06 17:09:23 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Update for version 1.0.1. Modified Paths: -------------- branches/1.0/cppdom.spec Modified: branches/1.0/cppdom.spec =================================================================== --- branches/1.0/cppdom.spec 2010-03-06 17:08:16 UTC (rev 648) +++ branches/1.0/cppdom.spec 2010-03-06 17:09:23 UTC (rev 649) @@ -1,6 +1,6 @@ # Spec file for cppdom. %define name cppdom -%define version 1.0.0 +%define version 1.0.1 %define release 1 Name: %{name} @@ -127,7 +127,10 @@ %doc %{_docdir}/cppdom-%{version}/html %changelog -* Mon Mar 02 2009 Patrick Hartling <pat...@pr...> 1.0.0-1 +* Sat Mar 06 2010 Patrick Hartling <pa...@pr...> 1.0.1-1 +- Updated to version 1.0.1. + +* Mon Mar 02 2009 Patrick Hartling <pa...@pr...> 1.0.0-1 - Updated to version 1.0.0. * Wed Aug 01 2007 Patrick Hartling <pa...@in...> 0.7.10-1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 17:08:22
|
Revision: 648 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=648&view=rev Author: patrickh Date: 2010-03-06 17:08:16 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Merged r638 from the trunk: From the patch submission: cppdom::Attribute has (among others) the following c'tor: template <class T> Attribute(const T& val); and an output operator: std::ostream& operator<<(std::ostream& os, const Attribute& att); together these two constructs will grab any type that does not have a operator<< overload of its own and turn it into an infinite recursion at runtime (because the above c'tor uses setValue<T>(val) which uses a std::ostringstream to convert val into a string representation. Bumped the version to 1.0.1. Submited by: Carsten Neumann Modified Paths: -------------- branches/1.0/ChangeLog branches/1.0/cppdom/cppdom.h branches/1.0/cppdom/version.h Modified: branches/1.0/ChangeLog =================================================================== --- branches/1.0/ChangeLog 2010-03-06 17:02:22 UTC (rev 647) +++ branches/1.0/ChangeLog 2010-03-06 17:08:16 UTC (rev 648) @@ -1,5 +1,12 @@ DATE AUTHOR CHANGE ---------- ----------- ------------------------------------------------------- +[Version 1.0.1 released - 3.2.2009]============================================ + +2010-03-06 patrickh Fixed conflicts with the operator<< overload for + std::ostream and implicit constructio of + cppdom::Attribute objects. + Submitted by: Carsten Neumann + [Version 1.0.0 released - 3.2.2009]============================================ 2007-08-01 patrickh Updated for SConsAddons changes. On Windows, the Modified: branches/1.0/cppdom/cppdom.h =================================================================== --- branches/1.0/cppdom/cppdom.h 2010-03-06 17:02:22 UTC (rev 647) +++ branches/1.0/cppdom/cppdom.h 2010-03-06 17:08:16 UTC (rev 648) @@ -335,7 +335,7 @@ #ifndef CPPDOM_NO_MEMBER_TEMPLATES template<class T> - Attribute(const T& val) + explicit Attribute(const T& val) { setValue<T>(val); } @@ -548,6 +548,24 @@ */ void setAttribute(const std::string& attr, const Attribute& value); + /** + * Sets new attribute value. + * + * @post Element.attr is set to value. If it did not exist before, now + * it does. + * + * @param attr Attribute name to set. There must not be ANY spaces in + * this name. + * @param value Attribute value to set. + * + * @since 1.0.1 + */ + template<class T> + void setAttribute(const std::string& attr, const T& value) + { + setAttribute(attr, Attribute(value)); + } + /** Direct access to attribute map. */ Attributes& attrib(); Modified: branches/1.0/cppdom/version.h =================================================================== --- branches/1.0/cppdom/version.h 2010-03-06 17:02:22 UTC (rev 647) +++ branches/1.0/cppdom/version.h 2010-03-06 17:08:16 UTC (rev 648) @@ -55,7 +55,7 @@ // The major/minor/patch version (up to 3 digits each). #define CPPDOM_VERSION_MAJOR 1 #define CPPDOM_VERSION_MINOR 0 -#define CPPDOM_VERSION_PATCH 0 +#define CPPDOM_VERSION_PATCH 1 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 17:02:28
|
Revision: 647 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=647&view=rev Author: patrickh Date: 2010-03-06 17:02:22 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Bring Revision 406 of SConsAddons onto this branch. Revision Links: -------------- http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=406&view=rev Added Paths: ----------- trunk/deps/scons-addons/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 16:59:07
|
Revision: 646 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=646&view=rev Author: patrickh Date: 2010-03-06 16:59:00 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Removed the svn:externals to a repository that is not currently accessible. Property Changed: ---------------- trunk/deps/ Property changes on: trunk/deps ___________________________________________________________________ Deleted: svn:externals - scons-addons https://realityforge.vrsource.org/svn/scons-addons/trunk/scons-addons This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 16:50:50
|
Revision: 645 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=645&view=rev Author: patrickh Date: 2010-03-06 16:50:44 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Bring Revision 406 of SConsAddons onto this branch. Revision Links: -------------- http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=406&view=rev Added Paths: ----------- branches/1.0/deps/scons-addons/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 16:49:15
|
Revision: 644 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=644&view=rev Author: patrickh Date: 2010-03-06 16:49:09 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Removed the svn:externals to a repository that is not currently accessible. Property Changed: ---------------- branches/1.0/deps/ Property changes on: branches/1.0/deps ___________________________________________________________________ Deleted: svn:externals - scons-addons https://realityforge.vrsource.org/svn/scons-addons/trunk/scons-addons This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 16:48:01
|
Revision: 643 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=643&view=rev Author: patrickh Date: 2010-03-06 16:47:55 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Tag Revision 406 of SConsAddons. Revision Links: -------------- http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=406&view=rev Added Paths: ----------- vendor/scons-addons/r406/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 16:31:58
|
Revision: 642 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=642&view=rev Author: patrickh Date: 2010-03-06 16:31:51 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Import Revision 406 of SConsAddons. Revision Links: -------------- http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=406&view=rev Added Paths: ----------- vendor/ vendor/scons-addons/ vendor/scons-addons/current/ vendor/scons-addons/current/AUTHORS vendor/scons-addons/current/COPYING vendor/scons-addons/current/ChangeLog vendor/scons-addons/current/README vendor/scons-addons/current/TODO vendor/scons-addons/current/src/ vendor/scons-addons/current/src/SConsAddons/ vendor/scons-addons/current/src/SConsAddons/AutoDist.py vendor/scons-addons/current/src/SConsAddons/Builders.py vendor/scons-addons/current/src/SConsAddons/EnvironmentBuilder.py vendor/scons-addons/current/src/SConsAddons/Options/ vendor/scons-addons/current/src/SConsAddons/Options/Boost.py vendor/scons-addons/current/src/SConsAddons/Options/Cal3D.py vendor/scons-addons/current/src/SConsAddons/Options/CppDom.py vendor/scons-addons/current/src/SConsAddons/Options/CppUnit.py vendor/scons-addons/current/src/SConsAddons/Options/FlagPollBasedOption.py vendor/scons-addons/current/src/SConsAddons/Options/GMTL.py vendor/scons-addons/current/src/SConsAddons/Options/OSG.py vendor/scons-addons/current/src/SConsAddons/Options/OpenSG.py vendor/scons-addons/current/src/SConsAddons/Options/OpenSG2.py vendor/scons-addons/current/src/SConsAddons/Options/Options.py vendor/scons-addons/current/src/SConsAddons/Options/OptionsTest.py vendor/scons-addons/current/src/SConsAddons/Options/Plexus.py vendor/scons-addons/current/src/SConsAddons/Options/PyJuggler.py vendor/scons-addons/current/src/SConsAddons/Options/Pyste.py vendor/scons-addons/current/src/SConsAddons/Options/SDL.py vendor/scons-addons/current/src/SConsAddons/Options/VRJuggler/ vendor/scons-addons/current/src/SConsAddons/Options/VRJuggler/JugglerCommon.py vendor/scons-addons/current/src/SConsAddons/Options/VRJuggler/VRJ.py vendor/scons-addons/current/src/SConsAddons/Options/VRJuggler/Vapor.py vendor/scons-addons/current/src/SConsAddons/Options/VRJuggler/__init__.py vendor/scons-addons/current/src/SConsAddons/Options/VTK.py vendor/scons-addons/current/src/SConsAddons/Options/WxWidgets.py vendor/scons-addons/current/src/SConsAddons/Options/Xerces.py vendor/scons-addons/current/src/SConsAddons/Options/Zipios.py vendor/scons-addons/current/src/SConsAddons/Options/__init__.py vendor/scons-addons/current/src/SConsAddons/Util.py vendor/scons-addons/current/src/SConsAddons/Variants.py vendor/scons-addons/current/src/SConsAddons/__init__.py vendor/scons-addons/current/templates/ vendor/scons-addons/current/templates/__init__.py vendor/scons-addons/current/templates/code.py Added: vendor/scons-addons/current/AUTHORS =================================================================== --- vendor/scons-addons/current/AUTHORS (rev 0) +++ vendor/scons-addons/current/AUTHORS 2010-03-06 16:31:51 UTC (rev 642) @@ -0,0 +1,4 @@ +Allen Bierbaum <al...@vr...> +Josh Brown <br...@ia...> +Ben Scott <bs...@vr...> + Added: vendor/scons-addons/current/COPYING =================================================================== --- vendor/scons-addons/current/COPYING (rev 0) +++ vendor/scons-addons/current/COPYING 2010-03-06 16:31:51 UTC (rev 642) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: vendor/scons-addons/current/ChangeLog =================================================================== --- vendor/scons-addons/current/ChangeLog (rev 0) +++ vendor/scons-addons/current/ChangeLog 2010-03-06 16:31:51 UTC (rev 642) @@ -0,0 +1,78 @@ +DATE AUTHOR CHANGE +---------- ------------ ------------------------------------------------------- +2006-07-05 allenb Significant refactoring of Options code. + Options object interface is not simplified and more + flexible for adding options to environments. + Add ListOption, SeparatorOption. + NEW VERSION: 0.1.0 +2006-07-02 allenb Added BooleanOption. +2005-08-18 allenb Pyste Option: Added cache environment flag and param. +2005-08-18 allenb OpenSG Options: + - Minimize calls to osg-config + - Capture defines + - Add flag for putting options in cpppath +2005-07-30 allenb Make OpenSG option smarter about handling opts + and libs. Delay calling osg-config until necessary. +2005-05-13 allenb Added a couple of globs to utils to test out. +2005-04-14 allenb Moved over to subversion. +2004-11-17 allenb Added utility method to get a relative path + from a known path and base directory. +2004-11-10 allenb Refactored AutoDist to make better use of FileBundles. + Now packages can have multiple file bundles and + files bundles can have their own install prefix. + Fix relative path handling with FileBundles. +2004-09-24 allenb Updated Boost python to get more info from python + about current version, libs, etc. This allows building + with 2.2 or 2.3 (or future versions hopefully). +2004-05-31 allenb Added option to updateEnv for boost and vapor options + to explicitly tell it to update CPPPATH with include + paths. +2004-04-16 allenb Removed auto-creation of install alias in AutoDist. + This was causing problems when multiple packages + install to the same prefix. +2004-04-14 allenb Added RPM packager. +2004-04-14 allenb Added support for packagers. +2004-04-13 allenb Refactor AutoDist to make it handle files and prefixes + better. +2004-03-25 allenb Require param to boost option stating wether to use + debug and multi-threaded libraries. This should help + avoid problems that occur if you just let the defaults + get used. +2004-03-09 allenb Updated pyste builder to scons 0.95 +2004-03-06 allenb Updated the autodist factory methods for libs and + programs to use the package environment by default. +2004-03-06 allenb Add smarter search for boost include path. +2004-02-27 allenb Added OpenSG option set. +2004-02-25 allenb Updated Options code so options with multiple keys + could have help text per option. + Fixed boost option to work with the new boost build. +2003-12-30 allenb Fixed problem with boost/filesystem/operations.hpp in + Boost options class. +2003-12-22 allenb Added FileBundle object for installing sets of files + within a package. + NEW VERSION: 0.0.10 +2003-11-20 allenb Added new util methods for getting paths in SConscripts + NEW VERSION: 0.0.9 +2003-11-19 allenb Fixed bug in pyste option when script does not exist. +2003-11-10 allenb Added builder for package config scripts. +2003-11-10 allenb Removed global Prefix() method replacing it with + storing the prefix in the autodist package instead. +2003-10-?? allenb Added support for Pyste +2003-09-09 allenb Added install prefixes to all AutoDist packages. + NEW VERSION 0.0.8 +2003-09-09 allenb Added isBuilt interface. + Fixed bug that prevented libraries from building in + build directories + NEW VERSION 0.0.7 + allenb major refactoring of system + NEW VERSION 0.0.6 + NEW VERSION 0.0.5 + NEW VERSION 0.0.4 + NEW VERSION 0.0.3 + NEW VERSION 0.0.2 +2003-08-22 allenb Initial version + NEW VERSION 0.0.1 +2003-08-22 allenb Added initial implementation of Options addon. + NEW VERSION 0.1.0 + + Added: vendor/scons-addons/current/README =================================================================== --- vendor/scons-addons/current/README (rev 0) +++ vendor/scons-addons/current/README 2010-03-06 16:31:51 UTC (rev 642) @@ -0,0 +1,81 @@ +o------------------------------------------------------------------------------o +|Scons-addons +| +o------------------------------------------------------------------------------o + +o------------------------------------------------------------------------------o +| What is it? +o------------------------------------------------------------------------------o + +This project is a collection of addons for the scons build system. + +See: http://www.scons.org + +o------------------------------------------------------------------------------o +| Why does this project exist? Why not just put this all in SCons? +o------------------------------------------------------------------------------o +There are two answers for this question: + +First, this allows for a place to test new addon capabilities that *may* end up +in scons in the long term for all I know. + +Second, SCons doesn't have to be a kitchen sink of everything under the sun. +Many things can be written as addons to SCons that are distributed and used +separately. That is where this project comes in. + +o------------------------------------------------------------------------------o +| Requirements +o------------------------------------------------------------------------------o + +We generally require the latest released version of scons. Some addons may require the CVS version though. + +o------------------------------------------------------------------------------o +| Installation +o------------------------------------------------------------------------------o + +To install system-wide: +cd scons-addons/src +cp -r SconsAddons /path/to/python/lib/site-packages/ + +If you do not want scons-addons installed in a standard location for python files you +will need to set your PYTHONPATH variable to reflect where it is installed at. +For example: + +(bash) +export PYTHONPATH=/home/username/scons-addons/src + +(csh based shells) +setenv PYTHONPATH /home/username/scons-addons/src + +o------------------------------------------------------------------------------o +| Documentation +o------------------------------------------------------------------------------o + +o------------------------------------------------------------------------------o +| License: GPL +o------------------------------------------------------------------------------o + +This file is part of scons-addons. + +Scons-addons is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +Scons-addons is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with scons-addons; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +o------------------------------------------------------------------------------o +| Questions +o------------------------------------------------------------------------------o + + Please feel free to email comments, questions, suggestions, etc to + + sco...@re... Property changes on: vendor/scons-addons/current/README ___________________________________________________________________ Added: svn:eol-style + native Added: vendor/scons-addons/current/TODO =================================================================== --- vendor/scons-addons/current/TODO (rev 0) +++ vendor/scons-addons/current/TODO 2010-03-06 16:31:51 UTC (rev 642) @@ -0,0 +1,7 @@ +- Option handling must be improved + +There is a problem with the way options and build environments interact in scons-addons. For example consider how an option should validate and set itself if we are using debug runtimes and compile flags vs. using optimized run-times. + +We do not have a good way to take this into account to know what the correct way to use this is. + +Release. Added: vendor/scons-addons/current/src/SConsAddons/AutoDist.py =================================================================== --- vendor/scons-addons/current/src/SConsAddons/AutoDist.py (rev 0) +++ vendor/scons-addons/current/src/SConsAddons/AutoDist.py 2010-03-06 16:31:51 UTC (rev 642) @@ -0,0 +1,1160 @@ +""" +AutoDist + +Automatic distribution builder and packager for SCons. + +""" +############################################################## autodist-cpr beg +# +# AutoDist - Automatic distribution builder and packager for +# SCons-based builds +# AutoDist is (C) Copyright 2002 by Ben Scott +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# +# ----------------------------------------------------------------- +# File: $RCSfile$ +# Date modified: $Date: 2009-03-12 16:51:31 -0500 (Thu, 12 Mar 2009) $ +# Version: $Revision: 401 $ +# ----------------------------------------------------------------- +############################################################## autodist-cpr end + +__version__ = '0.2.1' +__author__ = 'Ben Scott and Allen Bierbaum' + + +import os +from os import path +import stat +import re + +import SCons.Defaults +import SCons.Environment +import SCons.Node.FS +import SCons.Util +import types +import re +import time +import glob +import shutil +import SConsAddons.Util as sca_util + +pj = os.path.join + + +# SCons shorthand mappings +Action = SCons.Action.Action +Builder = SCons.Builder.Builder +Environment = SCons.Environment.Environment +File = SCons.Node.FS.default_fs.File +Value = SCons.Node.Python.Value + +config_script_contents = "" + +class InstallableFile: + """ Class to wrap any installable file. ex. progs, libs, headers, docs, etc """ + def __init__(self, fileNode, prefix=""): + """ fileNode - The scons node for the file. + prefix - The prefix to use for the file (munus the package/bundle prefix) + """ + assert isinstance(fileNode, SCons.Node.Node), "Installable file called with non file node: [%s]"%str(fileNode) + self.fileNode = fileNode + self.prefix = prefix + + def __str__(self): + """ an installable file's string representation is its prefix/name.""" + if prefix: + return path.join(prefix, str(fileNode)) + else: + return str(fileNode) + + def getFileNode(self): + return self.fileNode + + def getPrefix(self): + return self.prefix + + +class Header(InstallableFile): + """ This class is meant to wrap a header file to install. """ + def __init__(self, fileNode, prefix=""): + InstallableFile.__init__(self, fileNode, prefix) + + +class FileBundle: + """ Wrapper class for a group of files to bundle together to install, archive, etc. + + This class provides a method to hold a group of files together with their destination + structure information. Then it can be used to call install builders to setup an + install where needed. + + One area of note is prefix handling. To allow maximum flexibility there are + several prefixes used. + + When built, a prefix is passed as a base prefix (build_prefix) + The file bundle has a prefix (bundle_prefix). + Each bundled file has a prefix (file.prefix added when files is added). + If path to the added file has a prefix it is added on as well. + + Final file location: build.prefix/bundle.prefix/passed_prefix/file.prefix/file.name + """ + + def __init__(self, bundlePrefix=""): + """ + Construct file bundle object. + """ + self.files = [] # Installable files of class InstallableFile + self.bundlePrefix = bundlePrefix + self.built = False + + def addFiles(self, files, prefix = "", useRelPath=True): + """ + Add these files to the list of installable files. + The list can either be string file names or File() nodes. + files - List of files to add to bundle. + prefix - A common prefix to use for all installed files (beyond the bundle prefix) + useRelPath - If true, append the relative path in the file to + the prefix to get the real full install path. + """ + if not SCons.Util.is_List(files): + files = [files] + + for f in files: # For all files + local_dir_prefix = "" + # If we are a string filename create file object + if not isinstance(f, SCons.Node.FS.Base): + f = File(f) + if useRelPath: + local_dir_prefix = str(f.dir) + install_file = InstallableFile(f, pj(prefix, local_dir_prefix)) + self.files.append(install_file) # Append it on + + def getFiles(self): + return self.files + + def buildInstall(self, env=None, installPrefix="", ignoreBuilt=False): + """ + Calls install builder to setup the installation of the packaged files. + Installs all files using the env environment under prefix. + NOTE: file is installed into: installPrefix/bundle.prefix/passed_prefix/file.prefix/file.name + + NOTE: Whatever the current directly is when this is called is the directory + used for the builder command associated with this assembly. + + Returns list of the Install() targets. + ifgnoreBuilt - If true, just rebuild for the given environment and don't test/set the built flag. + """ + if not ignoreBuilt: + assert not self.built + self.built = True + + # Clone the base environment if we have one + if env: + env = env.Clone() + else: + env = Environment() + + ret_targets = [] + + # Install the files from the bundle + common_prefix = pj(installPrefix, self.bundlePrefix) + name = common_prefix + if hasattr(self,"name"): + name = self.name + #print "FileBundle-[%s]: buildInstall: "%name + + for f in self.files: + fnode = f.getFileNode() + target_dir = path.join(installPrefix, self.bundlePrefix, f.getPrefix()) + #print " file:[%s] --> target dir: [%s]"%(str(fnode),target_dir) + inst_tgt = env.Install(target_dir, fnode) + ret_targets.append(inst_tgt) + + return ret_targets + + +# ############################################################################ # +# ASSEMBLIES +# ############################################################################ # +class _Assembly: + """ Base class for all assembly types that can be managed by a package. + This is an abstract type that provides common functionality and interface for all assemblies. + """ + def __init__(self, pkg, baseEnv, prefix=""): + """ + Constructs a new Assembly object with the given name within the given + environment. + """ + self.package = pkg # The package object we belong to + self.built = False; # Flag set once we have been built + self.installPrefix = prefix; # Default install prefix + + # Clone the base environment if we have one + if baseEnv: + self.env = baseEnv.Clone() + else: + self.env = Environment() + + def setInstallPrefix(self, prefix): + self.installPrefix = prefix + + def getInstallPrefix(self): + return self.installPrefix + + def isBuilt(self): + return self.built + + def getEnv(self): + return self.env + + def build(self): + """ + Sets up the build targets for this assembly. + May only be called once. + NOTE: Whatever the current directly is when this is called is the directory + used for the builder command associated with this assembly. + """ + + # Now actually do the build + self._buildImpl() + self.built = True; + + + +class FileBundleAssembly(_Assembly): + """ Wrapper class for a group of files to manage in an assembly for packaging. + + One area of note is prefix handling. To allow maximum flexibility there + are several used prefixes. + + The file bundle has a prefix (this is relative to the package prefix). + Each bundled file has a prefix (added when files is added). + If path to the added file has a prefix it is added on as well. + + Final file location: package.prefix/filebundle.prefix/added.prefix/file.prefix/file_name + """ + + def __init__(self, pkg, baseEnv, prefix=""): + """ + Construct file bundle object. + prefix - Prefix to install the files (relative to package) + pkg - The package this bundle is a part of + baseEnv - The environment that this bundle should be included in + """ + print "WARNING: Usage of FileBundleAssembly is deprecated." + _Assembly.__init__(self, pkg, baseEnv, prefix) + + self.files = [] # Installable files of class InstallableFile + self.built = False # Flag set once we have been built + + def addFiles(self, files, prefix = None): + """ + Add these files to the list of installable files. They will be installed as: + package.prefix/self.prefix/prefix/file_prefix. The list must come + in as strings as they are processed through File(). + files - List of filenames (file nodes should also work) + """ + if not SCons.Util.is_List(files): + files = [files] + + for fn in files: # For all filenames + local_dir_prefix = "" + if not isinstance(fn, SCons.Node.FS.Base): # If we are a string filename, then get our local prefix + local_dir_prefix = os.path.dirname(fn) + f = InstallableFile( File(fn), pj(prefix, local_dir_prefix)) # Create new installable file + self.files.append(f) # Append it on + + def getInstallableFiles(self): + return self.files + + def isBuilt(self): + return self.built; + + def build(self): + """ + Sets up the build and install targets for this file bundle. + May only be called once. + NOTE: Whatever the current directly is when this is called is the directory + used for the builder command associated with this assembly. + """ + # Add files to the package file bundle + fb = self.package.createFileBundle() + + for f in self.files: + fnode = f.getFileNode() + fb.addFiles(fnode, f.getPrefix()) + + self.built = True; + + + +class _CodeAssembly(_Assembly): + """ + Base type for assemblys that are based on "code". + + This "abstract" class provides common functionality for Program, + StaticLibrary, and SharedLibrary. You don't want to instantiate this class + directly. It is meant to be private. + """ + + def __init__(self, filename, pkg, baseEnv, prefix=""): + """ + Constructs a new Assembly object with the given name within the given + environment. + """ + _Assembly.__init__(self, pkg, baseEnv, prefix) + + assert isinstance(filename, str), "Passed a filename that is not a string. %s"%filename + self.fileNode = File(filename) + self.sources = [] + self.includes = [] + self.libs = [] + self.libpaths = [] + self.headers = [] + self.targets = [] + + def getTargets(self): + return self.targets + + def addSources(self, sources): + """ + Adds the given list of source files into this assembly. The list must come + in as strings as they are processed through File(). + """ + # Use File() to figure out the absolute path to the file + srcs = map(File, sources) + # Add these sources into the mix + self.sources.extend(srcs) + + def addHeaders(self, headers, prefix = None): + """ + Adds the given list of distribution header files into this assembly. These + headers will be installed to self.package.prefix/include/prefix/file_prefix. The list must come + in as strings as they are processed through File(). + """ + for fn in headers: # For all filenames in headers + hdr = Header( File(fn), prefix) # Create new header rep + self.headers.append(hdr) # Append it on + + def addIncludes(self, includes): + """ + Adds in the given list of include directories that this assembly will use + while compiling. + """ + self.includes.extend(includes) + + def addLibs(self, libs): + """ + Adds in the given list of libraries directories that this assembly will + link with. + """ + self.libs.extend(libs) + + def addLibPaths(self, libpaths): + """ + Adds in the given list of library directories that this assembly will use + to find libraries while linking. + """ + self.libpaths.extend(libpaths) + + def getHeaders(self): + return self.headers + + def getSources(self): + return self.sources + + def isBuilt(self): + return self.built; + + def getFilename(self): + return str(self.fileNode) + + def getAbsFilePath(self): + return self.fileNode.get_abspath() + + def build(self): + """ + Sets up the build and install targets for this assembly. + May only be called once. + NOTE: Whatever the current directly is when this is called is the directory + used for the builder command associated with this assembly. + """ + # Setup the environment for the build + self.env.Append(CPPPATH = self.includes, + LIBPATH = self.libpaths, + LIBS = self.libs) + + # Now actually do the build + self._buildImpl() + self.built = True; + + +class Library(_CodeAssembly): + """ + This "abstract" class provides common functionality for StaticLibrary and + SharedLibrary. You don't want to instantiate this class directly. It is + meant to be private. + """ + + def __init__(self, libname, pkg, baseEnv, builderNames, installPrefix): + """ + Creates a new library builder for a library of the given name. + pkg - The package we are a part of + baseEnv - The base environemnt to use + builderNames - The names of the builders to use for building the libary: ex. 'SharedLibrary' + installPrefix - Prefix (relative to the standard install path) to install this library + """ + _CodeAssembly.__init__(self, libname, pkg, baseEnv, installPrefix) + + if type(builderNames) is types.StringType: + self.builder_names = [ builderNames ] + else: + self.builder_names = builderNames + + def _buildImpl(self): + """ + Sets up the build dependencies and the install. + """ + + fb = self.package.createFileBundle() + + # Setup build and install for each built library + # Use get_abspath() with fileNode so we get the path into the build_dir and not src dir + # Only build libraries if we have sources + if len(self.sources) > 0: + for lib_builder in self.builder_names: + lib_filepath = self.fileNode.get_abspath() + lib = self.env.__dict__[lib_builder](lib_filepath, self.sources) + self.targets = lib + + # Lib to file bundle + fb.addFiles(lib, self.installPrefix, False) + + # Install the headers in the source list + for h in self.headers: + headerNode = h.getFileNode() + fb.addFiles(headerNode, pj('include', h.getPrefix()) ) + + +class LoadableModule(Library): + """ Sets up Library assembly with 'LoadableModule' builder.""" + def __init__(self, libname, pkg, baseEnv = None, installPrefix='lib'): + Library.__init__(self, libname, pkg, baseEnv, 'LoadableModule', installPrefix) + +class SharedLibrary(Library): + """ Sets up Library assembly with 'SharedLibrary' builder.""" + def __init__(self, libname, pkg, baseEnv = None, installPrefix='lib'): + Library.__init__(self, libname, pkg, baseEnv, 'SharedLibrary', installPrefix) + +class StaticLibrary(Library): + """ Sets up Library assembly with 'StaticLibrary' builder """ + def __init__(self, libname, pkg, baseEnv = None, installPrefix='lib'): + Library.__init__(self, libname, pkg, baseEnv, 'StaticLibrary', installPrefix) + +class StaticAndSharedLibrary(Library): + """ Sets up Library assembly with both 'StaticLibrary' and 'SharedLibrary' builders. """ + def __init__(self, libname, pkg, baseEnv = None, installPrefix='lib'): + Library.__init__(self, libname, pkg, baseEnv, ['StaticLibrary', 'SharedLibrary'], installPrefix) + + +class Program(_CodeAssembly): + """ + This object knows how to build (and install) an executable program from a + given set of sources. + """ + def __init__(self, progname, pkg, baseEnv = None, installPrefix='bin', + isAppBundle=False, resources=[], infoPlist='', pkgInfo=''): + """ + Creates a new program builder for a program of the given name. + """ + _CodeAssembly.__init__(self, progname, pkg, baseEnv, installPrefix) + #Variables for Darwin only build + if not SCons.Util.is_List(resources): + self.resources = [resources] + else: + self.resources = resources + + self.infoPlist = infoPlist + self.isAppBundle = isAppBundle + self.pkgInfo = pkgInfo + + def _buildImpl(self): + """ + Sets up the build dependencies and the install. + """ + # Build rule + prog = self.env.Program(self.fileNode, source = self.sources) + + self.targets = prog + + # Add executable to file bundle + fb = self.package.createFileBundle() + + if sca_util.GetPlatform() == 'darwin' and self.isAppBundle: + # create prefix beyond <prefix>/bin + appBundlePre = pj(self.installPrefix, self.fileNode.rstr() + '.app', 'Contents') + # install Info.plist + fb.addFiles(self.infoPlist, appBundlePre, False) + # install PkgInfo + fb.addFiles(self.pkgInfo, appBundlePre, False) + # install actual exectuable file + fb.addFiles(prog, pj(appBundlePre,'MacOS') , False) + # install resource files + for res in self.resources: + fb.addFiles(res, pj(appBundlePre,'Resources'), False) + else: + fb.addFiles(prog, self.installPrefix, False) + + # Install the binary + #inst_prefix = self.package.prefix + #if self.installPrefix: + # inst_prefix = pj(inst_prefix, self.installPrefix) + #self.env.Install(inst_prefix, prog) + + +class Package: + """ + A package defines a collection of distributables including programs and + libraries. The Package class provides the ability to build, install, and + package up distributions of your project. + + A package object provides an interface to add libraries, programs, headers, + and support files to a single unit that can be installed. It also shares + an environment across all these different units to build. + + The package contains assemblies (objects that encapsulate things to build) + and a FileBundle (which holds all the files that could be installed or handled). + + When assemblies are built, they should add any installable files to the package file bundle. + """ + + def __init__(self, name, version, prefix='/usr/local', baseEnv = None, description= None): + """ + Creates a new package with the given name and version, where version is in + the form of <major>.<minor>.<patch> (e.g 1.12.0) + """ + self.name = name + self.prefix = prefix + self.assemblies = [] + self.fileBundles = [FileBundle(),] # File bundle for all files + self.extra_dist = [] + self.description = description + self.packagers = [] + self.distDir = "dist" # Path to the dist directory to use + + if not self.description: + self.description = self.name + " Package" + + if baseEnv: + self.env = baseEnv.Clone() + else: + self.env = Environment() + + if type(version) is types.TupleType: + (self.version_major, self.version_minor, self.version_patch) = version; + else: + re_matches = re.match(r'^(\d+)\.(\d+)\.(\d+)$', version) + self.version_major = int(re_matches.group(1)) + self.version_minor = int(re_matches.group(2)) + self.version_patch = int(re_matches.group(3)) + + def getName(self): + return self.name + + def getVersionMajor(self): + return self.version_major + + def getVersionMinor(self): + return self.version_minor + + def getVersionPatch(self): + return self.version_patch + + def getFullVersion(self): + return ".".join( (str(self.version_major), str(self.version_minor), str(self.version_patch)) ) + + def getAssemblies(self): + return self.assemblies + + def getExtraDist(self): + return self.extra_dist + + def getFileBundles(self): + return self.fileBundles + + def getEnv(self): + " Get the common pakcage environment. " + return self.env + + def setDistDir(self, path): + " Set the prefix for distribution/packaged files. " + self.distDir = path + + def getDistDir(self): + return self.distDir + + def addPackager(self, packager): + " Add a new packager. Sets the packager to point to this package. " + packager.setPackage(self) + self.packagers.append(packager) + + # ###### Assembly factory methods ####### # + def createLoadableModule(self, name, baseEnv = None, installPrefix='lib'): + """ + Creates a new shared library of the given name as a part of this package. + The library will be built within the given environment. + """ + if not baseEnv: + baseEnv = self.env + lib = LoadableModule(name, self, baseEnv, installPrefix) + self.assemblies.append(lib) + return lib + + def createSharedLibrary(self, name, baseEnv = None, installPrefix='lib'): + """ + Creates a new shared library of the given name as a part of this package. + The library will be built within the given environment. + """ + if not baseEnv: + baseEnv = self.env + lib = SharedLibrary(name, self, baseEnv, installPrefix) + self.assemblies.append(lib) + return lib + + def createStaticLibrary(self, name, baseEnv = None, installPrefix='lib'): + """ + Creates a new static library of the given name as a part of this package. + The library will be built within the given environment. + """ + if not baseEnv: + baseEnv = self.env + lib = StaticLibrary(name, self, baseEnv, installPrefix) + self.assemblies.append(lib) + return lib + + def createStaticAndSharedLibrary(self, name, baseEnv = None, installPrefix='lib'): + """ + Creates new static and shared library of the given name as a part of this package. + The library will be built within the given environment. + """ + if not baseEnv: + baseEnv = self.env + lib = StaticAndSharedLibrary(name, self, baseEnv, installPrefix) + self.assemblies.append(lib) + return lib + + def createProgram(self, name, baseEnv = None, installPrefix='bin', + isAppBundle=False, resources=[], infoPlist='', pkgInfo=''): + """ + Creates a new executable program of the given name as a part of this + package. The program will be built within the given environment. + """ + if not baseEnv: + baseEnv = self.env + prog = Program(name, self, baseEnv, installPrefix, isAppBundle, + resources, infoPlist, pkgInfo) + self.assemblies.append(prog) + return prog + + def createFileBundleAssembly(self, prefix, baseEnv = None): + """ Creates a new FileBundle object as part of this package. """ + bundle = FileBundleAssembly(pkg = self, baseEnv = baseEnv, prefix=prefix) + self.assemblies.append(bundle) + return bundle + + def createFileBundle(self, bundlePrefix=""): + """ Creates a new file bundle to use with this package. """ + fb = FileBundle(bundlePrefix) + self.fileBundles.append(fb) + return fb + + def createConfigAction(self, target, source, env): + """ Called as action of config script builder """ + global config_script_contents + + new_contents = config_script_contents + value_dict = source[0].value # Get dictionary from the value node + + all_lib_names = [os.path.basename(l.getAbsFilePath()) for l in self.assemblies if isinstance(l,Library)] + lib_names = [] + for l in all_lib_names: + if not lib_names.count(l): + lib_names.append(l) + inc_paths = [pj(self.prefix,'include'),] + cflags = " ".join(["-I"+p for p in inc_paths]) + if value_dict["extraCflags"] != None: + cflags = cflags + " " + value_dict["extraCflags"] + lib_paths = [pj(self.prefix,'lib'),] + if value_dict["extraIncPaths"] != None: + cflags = cflags + " ".join([" -I"+l for l in value_dict["extraIncPaths"]]) + + # Extend varDict with local settings + varDict = {} + if value_dict["varDict"] != None: + varDict = value_dict["varDict"] + + varDict["Libs"] = " ".join(["-L"+l for l in lib_paths]) + if value_dict["extraLibPath"] != None: + varDict["Libs"] += " " + " ".join(["-L"+l for l in value_dict["extraLibPath"]]) + if len(lib_names): + varDict["Libs"] += " " + " ".join(["-l"+l for l in lib_names]) + if value_dict["extraLibs"]!=None: + varDict["Libs"] = varDict["Libs"] + " " + " ".join(["-l"+l for l in value_dict["extraLibs"]]) + varDict["Cflags"] = cflags + varDict["Version"] = self.getFullVersion() + varDict["Name"] = self.name + varDict["Description"] = self.description + varDict["Prefix"] = self.prefix + + # Create the new content + txt = "# config script generated for %s at %s\n" % (self.name, time.asctime()) + txt = txt + '# values: %s\n'%(source[0].get_contents(),) + + for k,v in value_dict["varDict"].items(): + if SCons.Util.is_String(v): + txt = txt + 'vars["%s"] = "%s"\n' % (k,v) + else: + txt = txt + 'vars["%s"] = %s\n' % (k,v) + + # Find and replace the replacable content + cut_re = re.compile(r'(?<=# -- BEGIN CUT --\n).*?(?=# -- END CUT --)', re.DOTALL) + new_contents = cut_re.sub(txt,config_script_contents) + + # Create and write out the new file (setting it executable) + fname = str(target[0]) + f = open(str(target[0]), 'w') + f.write(new_contents) + f.close() + os.chmod(fname, stat.S_IREAD|stat.S_IEXEC|stat.S_IWUSR) # Set the file options + + return 0 # Successful build + + def createConfigScript(self, name, installDir='bin', varDict = None, + extraIncPaths=None, extraLibs=None, extraLibPaths=None, extraCflags=None): + """ Adds a config script to the given package installation. + varDict - Dictionary of extra variables to define. + """ + + if not self.env['BUILDERS'].has_key("PackageConfigScript"): + cfg_builder = Builder(action = Action(self.createConfigAction, + lambda t,s,e: "Create config script for %s package: %s"%(self.name, t[0])) ) + self.env.Append(BUILDERS = {"PackageConfigScript" : cfg_builder}) + + value_dict = {} + value_dict["prefix"] = self.prefix + value_dict["extraIncPaths"] = extraIncPaths + value_dict["extraLibs"] = extraLibs + value_dict["extraLibPath"] = extraLibPaths + value_dict["extraCflags"] = extraCflags + + value_dict["varDict"] = varDict + self.env.PackageConfigScript(target = pj(installDir, name), source = Value(value_dict)) + + # May need to delay doing this until a later build stage so that all libs, headers, etc are + # setup and ready to go in this package. + + + def addExtraDist(self, files,... [truncated message content] |
From: <pat...@us...> - 2010-03-06 16:28:34
|
Revision: 641 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=641&view=rev Author: patrickh Date: 2010-03-06 16:28:28 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Fixed a compile error with GCC 4.4. Submitted by: Casrten Neumann Modified Paths: -------------- trunk/test/suite/runner.cpp Modified: trunk/test/suite/runner.cpp =================================================================== --- trunk/test/suite/runner.cpp 2010-03-06 16:19:42 UTC (rev 640) +++ trunk/test/suite/runner.cpp 2010-03-06 16:28:28 UTC (rev 641) @@ -51,6 +51,8 @@ #include <Suites.h> +#include <cstring> + std::string getHostname(void); int main(int argc, char** argv) @@ -150,7 +152,7 @@ if ( uname(&buffer) == 0 ) { char* temp; - temp = strchr(buffer.nodename, '.'); + temp = std::strchr(buffer.nodename, '.'); // If the node name contains the full host, dots and all, truncate it // at the first dot. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 16:19:48
|
Revision: 640 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=640&view=rev Author: patrickh Date: 2010-03-06 16:19:42 +0000 (Sat, 06 Mar 2010) Log Message: ----------- It is unwise to have a polymorphic type entirely inlined in a header. The base type needs to be compiled into the defining translation unit. Modified Paths: -------------- trunk/cppdom/cppdom.cpp trunk/cppdom/cppdom.h Modified: trunk/cppdom/cppdom.cpp =================================================================== --- trunk/cppdom/cppdom.cpp 2010-03-06 16:15:59 UTC (rev 639) +++ trunk/cppdom/cppdom.cpp 2010-03-06 16:19:42 UTC (rev 640) @@ -1087,4 +1087,49 @@ out.close(); } + EventHandler::EventHandler() + { + /* Do nothing. */ ; + } + + EventHandler::~EventHandler() + { + /* Do nothing. */ ; + } + + void EventHandler::startDocument() + { + /* Do nothing. */ ; + } + + void EventHandler::endDocument() + { + /* Do nothing. */ ; + } + + void EventHandler::processingInstruction(Node&) + { + /* Do nothing. */ ; + } + + void EventHandler::startNode(const std::string&) + { + /* Do nothing. */ ; + } + + void EventHandler::parsedAttributes(Attributes&) + { + /* Do nothing. */ ; + } + + void EventHandler::endNode(Node&) + { + /* Do nothing. */ ; + } + + void EventHandler::gotCdata(const std::string&) + { + /* Do nothing. */ ; + } + } Modified: trunk/cppdom/cppdom.h =================================================================== --- trunk/cppdom/cppdom.h 2010-03-06 16:15:59 UTC (rev 639) +++ trunk/cppdom/cppdom.h 2010-03-06 16:19:42 UTC (rev 640) @@ -822,36 +822,31 @@ { public: /** Constructor. */ - EventHandler() {} + EventHandler(); /** Destructor. */ - virtual ~EventHandler() {} + virtual ~EventHandler(); /** Called when parsing of an xml document starts. */ - virtual void startDocument() {} + virtual void startDocument(); /** Called when ended parsing a document. */ - virtual void endDocument() {} + virtual void endDocument(); /** Called when parsing a processing instruction. */ - virtual void processingInstruction(Node& pinode) - { cppdom::ignore_unused_variable_warning(pinode);} + virtual void processingInstruction(Node& pinode); /** Called when start parsing a node. */ - virtual void startNode(const std::string& nodename) - { cppdom::ignore_unused_variable_warning(nodename); } + virtual void startNode(const std::string& nodename); /** Called when an attribute list was parsed. */ - virtual void parsedAttributes(Attributes& attr) - { cppdom::ignore_unused_variable_warning(attr); } + virtual void parsedAttributes(Attributes& attr); /** Called when parsing of a node was finished. */ - virtual void endNode(Node& node) - { cppdom::ignore_unused_variable_warning(node);} + virtual void endNode(Node& node); /** Called when a cdata section ended. */ - virtual void gotCdata(const std::string& cdata) - { cppdom::ignore_unused_variable_warning(cdata); } + virtual void gotCdata(const std::string& cdata); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 16:16:06
|
Revision: 639 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=639&view=rev Author: patrickh Date: 2010-03-06 16:15:59 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Improve Doxygen usage. No functional changes. Modified Paths: -------------- trunk/cppdom/SpiritParser.h trunk/cppdom/cppdom.h Modified: trunk/cppdom/SpiritParser.h =================================================================== --- trunk/cppdom/SpiritParser.h 2010-03-06 16:03:29 UTC (rev 638) +++ trunk/cppdom/SpiritParser.h 2010-03-06 16:15:59 UTC (rev 639) @@ -187,11 +187,12 @@ }; /** -* XML grammar. -* Based on: http://www.w3.org/TR/2004/REC-xml-20040204/ -* -* type: BUILDER_T must implement the interface concept similar to XmlBuilder above. -*/ + * XML grammar. + * Based on: http://www.w3.org/TR/2004/REC-xml-20040204/ + * + * @tparam BUILDER_T must implement the interface concept similar to + * XmlBuilder above. + */ template<typename BUILDER_T> struct XmlGrammar : public grammar<XmlGrammar<BUILDER_T> > { @@ -301,7 +302,8 @@ }; -/** The actual parser class that we will use. +/** + * The actual parser class that we will use. * * Provides a simple interface for using the builder and grammar. */ Modified: trunk/cppdom/cppdom.h =================================================================== --- trunk/cppdom/cppdom.h 2010-03-06 16:03:29 UTC (rev 638) +++ trunk/cppdom/cppdom.h 2010-03-06 16:15:59 UTC (rev 639) @@ -115,27 +115,29 @@ //! namespace of the cppdom project namespace cppdom { - // Declare a version string constant that can be used at run time. + /** Declare a version string constant that can be used at run time. */ CPPDOM_EXPORT(const char*) getVersion(); - // Helper methods + /** Helper methods. */ template <class T> inline void ignore_unused_variable_warning(const T&) { } - // True if there are characters references: ex: & + /** True if there are characters references: ex: & */ CPPDOM_EXPORT(bool) textContainsXmlEscaping(const std::string& data); - // True if there are chars needing escaping + /** True if there are chars needing escaping. */ CPPDOM_EXPORT(bool) textNeedsXmlEscaping(const std::string& data, bool isCdata); - // Remove escaping from xml text + /** Removes escaping from XML text. */ CPPDOM_EXPORT(std::string) removeXmlEscaping(const std::string& data, bool isCdata); - // Add escaping to xml text + /** Adds escaping to XML text. */ CPPDOM_EXPORT(std::string) addXmlEscaping(const std::string& data, bool isCdata); - /** Method to split string base on seperator. + /** + * Method to split string base on seperator. * - * If separator does not exist in string, then just return that string in the output. + * If separator does not exist in string, then just return that string in + * the output. * * @example: * std::string s = "apple, orange, cherry, peach, grapefruit, cantalope,watermelon"; @@ -159,7 +161,7 @@ } } - //! xml parsing error codes enumeration + /** XML parsing error codes enumeration */ enum ErrorCode { xml_unknown = 0, /**< unspecified or unknown error */ @@ -175,7 +177,7 @@ xml_attr_value_expected, /**< expected value after an '=' in attribute */ xml_save_invalid_nodetype, /**< invalid nodetype encountered while saving */ - xml_invalid_operation, /**< Attempted to execute an xml operation that would cause invalid structure */ + xml_invalid_operation, /**< Attempted to execute an XML operation that would cause invalid structure */ xml_invalid_argument, /**< Attempted to pass an invalid argument */ // added by kevin for 0.7 compatibility... xml_filename_invalid, @@ -185,7 +187,8 @@ xml_dummy /**< dummy error code */ }; - // typedefs + /** @name Typedefs */ + //@{ /** smart pointer to node */ class Node; typedef cppdom_boost::shared_ptr<cppdom::Node> NodePtr; @@ -197,34 +200,34 @@ /** list of node smart pointer */ typedef std::vector<NodePtr> NodeList; typedef NodeList::iterator NodeListIterator; + //@} - // classes /** - * xml error class - * contains an ErrorCode and is thrown while parsing xml input + * XML error class. + * Contains an ErrorCode and is thrown while parsing XML input. */ class CPPDOM_CLASS Error : public std::exception { public: - /** constructor */ + /** Constructor. */ Error(ErrorCode code, std::string localDesc, std::string location); - /** constructor that can take line num */ + /** Constructor that can take line number. */ Error(ErrorCode code, std::string localDesc, std::string file, unsigned line_num); - /** returns the error code */ + /** Returns the error code. */ ErrorCode getError() const; virtual ~Error() throw(); - /** returns the string representation of the error code */ + /** Returns the string representation of the error code. */ std::string getStrError() const; std::string getString() const; - /** return additional error info */ + /** Returns additional error info. */ std::string getInfo() const; virtual const char* what() const throw(); @@ -237,29 +240,29 @@ /** - * xml stream position - * represents the position in the xml input stream; usable if load() - * throws an error on parsing xml content + * XML stream position. + * Represents the position in the XML input stream; usable if load() + * throws an error on parsing XML content. */ class CPPDOM_CLASS Location { public: - /** Constructor */ + /** Constructor. */ Location(); - /** returns current line */ + /** Returns current line. */ int getLine() const; - /** returns current position in a line */ + /** Returns current position in a line. */ int getPos() const; - /** advances a char */ + /** Advances a char. */ void step(int chars = 1); - /** indicates entering a new line */ + /** Indicates entering a new line. */ void newline(); - /** reset location */ + /** Resets location. */ void reset(); protected: @@ -268,44 +271,47 @@ }; - // typedefs - /** smart pointer for Context */ + /** @name Typedefs */ + //@{ + /** Smart pointer for Context */ typedef cppdom_boost::shared_ptr<class Context> ContextPtr; - /** smart pointer to the event handler */ + /** Smart pointer to the event handler */ typedef cppdom_boost::shared_ptr<class EventHandler> EventHandlerPtr; + //@} /** - * xml parsing context class. - * the class is the parsing context for the parsed xml document. - * the class has a tagname lookup table and an entity map + * XML parsing context class. + * The class is the parsing context for the parsed XML document. + * The class has a tagname lookup table and an entity map. */ class CPPDOM_CLASS Context { public: - /** ctor */ + /** Constructor. */ Context(); - /** dtor */ + + /** Destructor. */ virtual ~Context(); - /** returns the tagname by the tagname handle */ + /** Returns the tagname by the tagname handle. */ std::string getTagname(TagNameHandle handle); - /** inserts a tag name and returns a tag name handle to the string */ + /** Inserts a tag name and returns a tag name handle to the string. */ TagNameHandle insertTagname(const std::string& tagname); - /** returns the current location in the xml stream */ + /** Returns the current location in the XML stream. */ Location& getLocation(); - /** @name event handling methods */ + /** @name Event Handling Methods */ //@{ - /** sets the event handler; enables handling events */ + /** Sets the event handler; enables handling events. */ void setEventHandler(EventHandlerPtr ehptr); - /** returns the currently used eventhandler (per reference) */ + /** Returns the currently used eventhandler (per reference). */ EventHandler& getEventHandler(); - /** returns if a valid event handler is set */ + /** Returns if a valid event handler is set. */ bool hasEventHandler() const; //@} @@ -322,7 +328,7 @@ /** * XML attribute class. - * Just wraps a string (this is really just and attribute VALUE) + * Just wraps a string (this is really just and attribute VALUE). * This is just meant to be a "magic" class to provide some syntactic * sugar related to autoconversions and get<value>() usefullness. */ @@ -345,8 +351,9 @@ #ifndef CPPDOM_NO_MEMBER_TEMPLATES /** - * Set mData to the string value of val - * @note Requires a stream operation of type T + * Set mData to the string value of val. + * + * @note Requires a stream operation of type T. */ template<class T> void setValue(const T& val) @@ -370,8 +377,8 @@ // specializations, found below. #ifdef _MSC_VER /** - * Specialization of getValue<T> for std::string so that more than just the - * first word of the attribute string is returned. + * Specialization of getValue<T> for std::string so that more than just + * the first word of the attribute string is returned. */ template<> std::string getValue<std::string>() const @@ -381,7 +388,7 @@ #endif // ! _MSC_VER #endif // ! CPPDOM_NO_MEMBER_TEMPLATES - /** Autoconversion to string (so old code should work) */ + /** Autoconversion to string (so old code should work). */ operator std::string() const; bool operator==(const Attribute& rhs) @@ -446,18 +453,19 @@ }; - /** xml node. - * A node has the following properties - * name - The element name of the node - * type - The type of the node. see NodeType - * children - Child elements of the node - * cdata - the cdata content if of type cdata - * - */ + /** + * XML node. + * + * A node has the following properties: + * * name - The element name of the node. + * * type - The type of the node. see NodeType. + * * children - Child elements of the node. + * * cdata - the cdata content if of type cdata. + */ class CPPDOM_CLASS Node { public: - /** node type enumeration */ + /** Node type enumeration */ enum Type { xml_nt_node, /**< normal node, can contain subnodes */ @@ -467,15 +475,16 @@ }; friend class Parser; + protected: /** Default Constructor */ Node(); public: - /** constructor, takes xml context pointer */ + /** Constructor, takes XML context pointer. */ explicit Node(ContextPtr pctx); - /** Construct a node with a given name */ + /** Construct a node with a given name. */ explicit Node(std::string nodeName, ContextPtr ctx); Node(const Node& node); @@ -492,11 +501,14 @@ /** assign operator */ Node& operator=(const Node& node); - /** Returns true if the nodes are equal - * @param ignoreAttribs - Attributes to ignore in the comparison - * @param ignoreElements - Elements to ignore in the comparison - */ - bool isEqual(NodePtr otherNode, const std::vector<std::string>& ignoreAttribs, + /** + * Returns true if the nodes are equal. + * + * @param ignoreAttribs Attributes to ignore in the comparison. + * @param ignoreElements Elements to ignore in the comparison. + */ + bool isEqual(NodePtr otherNode, + const std::vector<std::string>& ignoreAttribs, const std::vector<std::string>& ignoreElements, bool dbgit=false, const unsigned debugIndent=0); @@ -506,14 +518,15 @@ return isEqual(otherNode, empty_strings, empty_strings ); } - /** Returns the local name of the node (the element name) */ + /** Returns the local name of the node (the element name). */ std::string getName(); - /** set the node name */ + + /** Sets the node name. */ void setName(const std::string& name); /** @name Type information */ //@{ - /** returns type of node */ + /** Returns type of node. */ Node::Type getType() const; bool isNode() @@ -525,26 +538,32 @@ bool isCData() { return getType() == xml_nt_cdata;} - /** sets new nodetype */ + /** Sets new nodetype. */ void setType(Node::Type type); //@} /** @name Attribute information */ //@{ - /** Check if the node has a given attribute */ + /** Checks if the node has a given attribute. */ bool hasAttribute(const std::string& name) const; /** - * Get the named attribute - * @returns empty string ("") if not found, else the value + * Gets the named attribute. + * * @post Object does not change. + * + * @return Empty string ("") if not found, else the value. */ Attribute getAttribute(const std::string& name) const; /** - * sets new attribute value - * @param attr - Attribute name to set. There must not be ANY spaces in this name - * @post Element.attr is set to value. If it didn't exist before, now it does. + * Sets new attribute value. + * + * @post Element.attr is set to value. If it did not exist before, now + * it does. + * + * @param attr Attribute name to set. There must not be ANY spaces in + * this name. */ void setAttribute(const std::string& attr, const Attribute& value); @@ -572,12 +591,14 @@ /** Direct access to attribute map. */ const Attributes& attrib() const; - /** returns attribute map of the node + /** + * Returns attribute map of the node. * @deprecated */ Attributes& getAttrMap(); - /** returns attribute map of the node + /** + * Returns attribute map of the node. * @deprecated */ const Attributes& getAttrMap() const; @@ -586,17 +607,24 @@ /** @name Children and parents */ //@{ - /** Returns true if the node has a child of the given name. - * @param name Name can be a single element name or a chain of the form "tag/tag/tag" + /** + * Returns true if the node has a child of the given name. + * + * @param name Name can be a single element name or a chain of the form + * "tag/tag/tag". */ bool hasChild(const std::string& name); - /** Returns the first child of the given local name. + /** + * Returns the first child of the given local name. */ NodePtr getChild(const std::string& name); - /** Return first child of the given name. - * @param name Name can be a single element name or a chain of the form "tag/tag/tag" + /** + * Return first child of the given name. + * + * @param name Name can be a single element name or a chain of the form + * "tag/tag/tag". */ NodePtr getChildPath(const std::string& path); @@ -604,27 +632,32 @@ NodeList& getChildren(); /** - * Returns a list of all children (one level deep) with local name of childName - * \note currently no path-like childname can be passed, like in e.g. msxml - * If has standard compose() functions, could impl this by calling getChildren(pred) + * Returns a list of all children (one level deep) with local name of + * childName. + * + * @note Currently no path-like childname can be passed, such as in + * MSXML. If has standard compose() functions, could impl this by + * calling getChildren(pred). */ NodeList getChildren(const std::string& name); /** * Returns list of all children. + * * @see getChildren - * @note Needed because of predicate template matching char* + * @note Needed because of predicate template matching char*. */ NodeList getChildren(const char* name); - /** Return a list of children that pass the given STL predicate */ + /** Return a list of children that pass the given STL predicate. */ template<class Predicate> NodeList getChildrenPred(Predicate pred) { NodeList result(0); NodeList::const_iterator iter; - // search for all occurances of nodename and insert them into the new list + // search for all occurances of nodename and insert them into the new + // list. for(iter = mNodeList.begin(); iter != mNodeList.end(); ++iter) { if (pred(*iter)) @@ -657,40 +690,47 @@ /** @name CData methods */ //@{ /** - * returns cdata string - * @note: For node type "cdata", this returns the local cdata. - * For other nodes, this attempts to find the first child cdata - * node and returns its data. + * Returns CDATA string. + * + * @note For node type "cdata", this returns the local cdata. + * For other nodes, this attempts to find the first child cdata + * node and returns its data. */ std::string getCdata(); /** - * Returns the full cdata of the node or immediate children. - * @note: For node type "cdata", this returns the local cdata. - * For other nodes, combines the cdata of all cdata children. - */ + * Returns the full CDATA of the node or immediate children. + * + * @note For node type "cdata", this returns the local cdata. + * For other nodes, combines the cdata of all cdata children. + */ std::string getFullCdata(); - /** Sets the node cdata. - * @post For cdata type nodes, this sets the contained cdata - * For other types, this sets the cdata of the first cdata node. - * If none exists, then one is created called "cdata". - */ + /** + * Sets the node CDATA. + * + * @post For CDATA type nodes, this sets the contained cdata + * For other types, this sets the cdata of the first cdata node. + * If none exists, then one is created called "cdata". + */ void setCdata(const std::string& cdata); //@} - /** @name load/save functions */ + /** @name Load/Save Functions */ //@{ - /** loads xml node from input stream */ + /** Loads XML node from input stream. */ void load(std::istream& in, ContextPtr& context); - /** saves node to xml output stream - * @param indent - The amount to indent - * @doIndent - If true, then indent the output - * @doNewline - If true then use newlines in output - */ - void save(std::ostream& out, int indent=0, bool doIndent=true, bool doNewline=true); + /** + * Saves node to xml output stream. + * + * @param indent The amount to indent. + * @param doIndent If true, then indent the output. + * @param doNewline If true then use newlines in output. + */ + void save(std::ostream& out, int indent = 0, bool doIndent = true, + bool doNewline = true); //@} /** Returns the context used for this node. */ @@ -711,15 +751,15 @@ }; - /** XML document root node. + /** + * XML document root node. * - * Structure of a cppdom document + * Structure of a cppdom document: * * Nested tree of nodes. Each node has a type (Node::Type). * Root node is of type document. Standard nodes are type node. * Under standard nodes there can be cdata nodes. These nodes are nodes * for containing the raw text inside an element. - * */ class CPPDOM_CLASS Document: public Node { @@ -729,36 +769,43 @@ ~Document(); - /** constructor taking xml context pointer */ + /** Constructor taking XML context pointer. */ explicit Document(ContextPtr context); - /** constructor taking xml context pointer */ + /** Constructor taking XML context pointer. */ explicit Document(std::string docName, ContextPtr context); - /** returns a list of processing instruction nodes */ + /** Returns a list of processing instruction nodes. */ NodeList& getPiList(); - /** returns a list of document type definition rules to check the xml file */ + /** + * Returns a list of document type definition rules to check the XML + * file. + */ NodeList& getDtdList(); - /** loads xml Document (node) from input stream */ + /** Loads XML Document (node) from input stream. */ void load(std::istream& in, ContextPtr& context); - /** saves node to xml output stream - * @param doIndent - If true, then indent the output. - * @param doNewline - If true, then use newlines in the output. - */ + /** + * Saves node to xml output stream. + * + * @param doIndent If true, then indent the output. + * @param doNewline If true, then use newlines in the output. + */ void save(std::ostream& out, bool doIndent=true, bool doNewline=true); /** - * \exception throws cppdom::Error when the file name is invalid. + * @throw cppdom::Error Thrown when the file name is invalid. */ void loadFile(const std::string& filename) throw(Error); void loadFileChecked(const std::string& filename); - /** Save the document to the given filename. - * @todo Fix this method. It doesn't work - */ + /** + * Saves the document to the given filename. + * + * @todo Fix this method. It doesn't work + */ void saveFile(std::string filename); @@ -770,37 +817,39 @@ NodeList mDtdRules; }; - /** Interface for xml parsing event handler */ + /** Interface for XML parsing event handler. */ class CPPDOM_CLASS EventHandler { public: - /** ctor */ + /** Constructor. */ EventHandler() {} - /** virtual dtor */ + /** Destructor. */ virtual ~EventHandler() {} - /** called when parsing of an xml document starts */ + /** Called when parsing of an xml document starts. */ virtual void startDocument() {} - /** called when ended parsing a document */ + /** Called when ended parsing a document. */ virtual void endDocument() {} - /** called when parsing a processing instruction */ + /** Called when parsing a processing instruction. */ virtual void processingInstruction(Node& pinode) { cppdom::ignore_unused_variable_warning(pinode);} - /** called when start parsing a node */ + /** Called when start parsing a node. */ virtual void startNode(const std::string& nodename) { cppdom::ignore_unused_variable_warning(nodename); } - /** called when an attribute list was parsed */ + + /** Called when an attribute list was parsed. */ virtual void parsedAttributes(Attributes& attr) { cppdom::ignore_unused_variable_warning(attr); } - /** called when parsing of a node was finished */ + + /** Called when parsing of a node was finished. */ virtual void endNode(Node& node) { cppdom::ignore_unused_variable_warning(node);} - /** called when a cdata section ended */ + /** Called when a cdata section ended. */ virtual void gotCdata(const std::string& cdata) { cppdom::ignore_unused_variable_warning(cdata); } }; @@ -809,10 +858,13 @@ // ----------------------------------- // /** @name Helper methods */ //@{ - /** Merges data from one node to another. + /** + * Merges data from one node to another. + * + * @post All elements and attributes in fromNode will exist in toNode. + * * @param fromNode Node to read data from. * @param toNode Node to merge data onto. - * @post All elements and attributes in fromNode will exist in toNode. */ CPPDOM_EXPORT(void) merge(NodePtr fromNode, NodePtr toNode); //@} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 16:03:36
|
Revision: 638 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=638&view=rev Author: patrickh Date: 2010-03-06 16:03:29 +0000 (Sat, 06 Mar 2010) Log Message: ----------- >From the patch submission: cppdom::Attribute has (among others) the following c'tor: template <class T> Attribute(const T& val); and an output operator: std::ostream& operator<<(std::ostream& os, const Attribute& att); together these two constructs will grab any type that does not have a operator<< overload of its own and turn it into an infinite recursion at runtime (because the above c'tor uses setValue<T>(val) which uses a std::ostringstream to convert val into a string representation. Bumped the version to 1.1.0. Submited by: Carsten Neumann Modified Paths: -------------- trunk/ChangeLog trunk/cppdom/cppdom.h trunk/cppdom/version.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-03-06 16:00:44 UTC (rev 637) +++ trunk/ChangeLog 2010-03-06 16:03:29 UTC (rev 638) @@ -1,5 +1,11 @@ DATE AUTHOR CHANGE ---------- ----------- ------------------------------------------------------- +2010-03-06 patrickh Fixed conflicts with the operator<< overload for + std::ostream and implicit constructio of + cppdom::Attribute objects. + Submitted by: Carsten Neumann + VERSION: 1.1.1 + [Version 1.0.0 released - 3.2.2009]============================================ 2007-08-01 patrickh Updated for SConsAddons changes. On Windows, the Modified: trunk/cppdom/cppdom.h =================================================================== --- trunk/cppdom/cppdom.h 2010-03-06 16:00:44 UTC (rev 637) +++ trunk/cppdom/cppdom.h 2010-03-06 16:03:29 UTC (rev 638) @@ -335,7 +335,7 @@ #ifndef CPPDOM_NO_MEMBER_TEMPLATES template<class T> - Attribute(const T& val) + explicit Attribute(const T& val) { setValue<T>(val); } @@ -548,6 +548,24 @@ */ void setAttribute(const std::string& attr, const Attribute& value); + /** + * Sets new attribute value. + * + * @post Element.attr is set to value. If it did not exist before, now + * it does. + * + * @param attr Attribute name to set. There must not be ANY spaces in + * this name. + * @param value Attribute value to set. + * + * @since 1.1.1 + */ + template<class T> + void setAttribute(const std::string& attr, const T& value) + { + setAttribute(attr, Attribute(value)); + } + /** Direct access to attribute map. */ Attributes& attrib(); Modified: trunk/cppdom/version.h =================================================================== --- trunk/cppdom/version.h 2010-03-06 16:00:44 UTC (rev 637) +++ trunk/cppdom/version.h 2010-03-06 16:03:29 UTC (rev 638) @@ -55,7 +55,7 @@ // The major/minor/patch version (up to 3 digits each). #define CPPDOM_VERSION_MAJOR 1 #define CPPDOM_VERSION_MINOR 1 -#define CPPDOM_VERSION_PATCH 0 +#define CPPDOM_VERSION_PATCH 1 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-06 16:00:51
|
Revision: 637 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=637&view=rev Author: patrickh Date: 2010-03-06 16:00:44 +0000 (Sat, 06 Mar 2010) Log Message: ----------- Reorder things a bit to get better behavior. This change is nearly two years old. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2009-11-21 15:58:55 UTC (rev 636) +++ trunk/SConstruct 2010-03-06 16:00:44 UTC (rev 637) @@ -94,9 +94,7 @@ """%(opts.GenerateHelpText(common_env),) #help_text = opts.GenerateHelpText(common_env) + help_text -Help(help_text) - # --- MAIN BUILD STEPS ---- # # If we are running the build if not SConsAddons.Util.hasHelpFlag(): @@ -271,3 +269,5 @@ # Close up with aliases and defaults Default('.') + +Help(help_text) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2009-11-21 15:59:05
|
Revision: 636 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=636&view=rev Author: patrickh Date: 2009-11-21 15:58:55 +0000 (Sat, 21 Nov 2009) Log Message: ----------- Merged r635 from the trunk: Added a missing #include in order for EOF to be defined. Modified Paths: -------------- branches/1.0/cppdom/xmltokenizer.cpp Property Changed: ---------------- branches/1.0/cppdom/ Property changes on: branches/1.0/cppdom ___________________________________________________________________ Added: svn:mergeinfo + /trunk/cppdom:635 Modified: branches/1.0/cppdom/xmltokenizer.cpp =================================================================== --- branches/1.0/cppdom/xmltokenizer.cpp 2009-11-21 15:56:09 UTC (rev 635) +++ branches/1.0/cppdom/xmltokenizer.cpp 2009-11-21 15:58:55 UTC (rev 636) @@ -43,6 +43,7 @@ */ // needed includes +#include <cstdio> #include "cppdom.h" #include "xmltokenizer.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |