[Uml-devel] KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser

Andi Fischer andi.fischer at hispeed.ch
Mon Oct 18 13:09:25 UTC 2010


SVN commit 1187153 by fischer:

Fixing boost::spirit includes and namespaces according to compile warnings.

 M  +6 -4      lexer.cpp  
 M  +7 -7      lexer.h  
 M  +2 -16     position.h  
 M  +4 -4      preprocesslexer.cpp  
 M  +7 -7      preprocesslexer.h  
 M  +3 -1      skip_rule.hpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp #1187152:1187153
@@ -30,13 +30,14 @@
 
 #include <boost/bind.hpp>
 #include <boost/function.hpp>
-#include <boost/spirit/dynamic/if.hpp>
-#include <boost/spirit/phoenix/functions.hpp>
+#include <boost/spirit/include/classic_if.hpp>
+#include <boost/spirit/include/phoenix1_functions.hpp>
 
 #include "assignFunctor.hpp"
 
 namespace boost {
     namespace spirit {
+        namespace classic {
         namespace impl {
             bool isalnum_(QChar const& c) { return isalnum_(c.toAscii()); }
             bool isalpha_(QChar const& c) { return isalpha_(c.toAscii()); }
@@ -45,6 +46,7 @@
         }
     }
 }
+}
 
 template <class _Tp>
 struct tilde : public std::unary_function<_Tp, _Tp> {
@@ -53,7 +55,7 @@
     }
 };
 
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
 using phoenix::arg1;
 using phoenix::arg2;
 using phoenix::arg3;
@@ -201,7 +203,7 @@
 typedef std::pair<QString, int> Dependency;
 
 struct DependencyClosure
-            : boost::spirit::closure<DependencyClosure, QString, int> {
+            : boost::spirit::classic::closure<DependencyClosure, QString, int> {
     member1 m_word;
     member2 m_scope;
 };
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/lexer.h #1187152:1187153
@@ -25,12 +25,12 @@
 #include <QChar>
 
 
-namespace boost { namespace spirit { namespace impl {
+namespace boost { namespace spirit { namespace classic { namespace impl {
   bool isalnum_( QChar const& c);
   bool isalpha_( QChar const& c);
   bool isblank_( QChar const& c);
   bool isdigit_( QChar const& c);
-}}}
+}}}}
 */
 
 #include "driver.h"
@@ -44,12 +44,12 @@
 
 #include "skip_rule.hpp"
 
-using boost::spirit::parse_info;
-using boost::spirit::rule;
-using boost::spirit::scanner;
-using boost::spirit::ext::skip_rule_parser;
+using boost::spirit::classic::parse_info;
+using boost::spirit::classic::rule;
+using boost::spirit::classic::scanner;
+using boost::spirit::classic::ext::skip_rule_parser;
 
-typedef boost::spirit::position_iterator<QChar const*> CharIterator;
+typedef boost::spirit::classic::position_iterator<QChar const*> CharIterator;
 typedef rule<scanner<CharIterator> > SkipRule;
 typedef skip_rule_parser<SkipRule, CharIterator> CharParser;
 typedef scanner<CharIterator> CharScanner;
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/position.h #1187152:1187153
@@ -38,23 +38,11 @@
 
 #include <limits.h>
 #include <boost/version.hpp>
-#include <boost/spirit.hpp>
+#include <boost/spirit/include/classic.hpp>
 #include <QString>
-
-#if BOOST_VERSION < 103400
-
-typedef boost::spirit::file_position Position;
-typedef std::string PositionFilename;
-
-inline PositionFilename QString2PositionFilename( QString const& p)
-{
-    return (char const*)p.toAscii();
-}
-
-#else
 # include <QChar>
 
-typedef boost::spirit::file_position_base<std::basic_string<QChar> > Position;
+typedef boost::spirit::classic::file_position_base<std::basic_string<QChar> > Position;
 typedef std::basic_string<QChar> PositionFilename;
 
 inline PositionFilename QString2PositionFilename( QString const& p)
@@ -62,8 +50,6 @@
     return p.data();
 }
 
-#endif
-
 inline bool operator<( Position const& p1, Position const& p2)
 {
     assert( p1.file == p2.file);
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/preprocesslexer.cpp #1187152:1187153
@@ -30,8 +30,8 @@
 
 #include <boost/bind.hpp>
 #include <boost/function.hpp>
-#include <boost/spirit/dynamic/if.hpp>
-#include <boost/spirit/phoenix/functions.hpp>
+#include <boost/spirit/include/classic_if.hpp>
+#include <boost/spirit/include/phoenix1_functions.hpp>
 
 #include "assignFunctor.hpp"
 
@@ -50,7 +50,7 @@
     }
 };
 
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
 using phoenix::arg1;
 using phoenix::arg2;
 using phoenix::arg3;
@@ -197,7 +197,7 @@
 typedef std::pair<QString, int> Dependency;
 
 struct DependencyClosure
-            : boost::spirit::closure<DependencyClosure, QString, int> {
+            : boost::spirit::classic::closure<DependencyClosure, QString, int> {
     member1 m_word;
     member2 m_scope;
 };
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/preprocesslexer.h #1187152:1187153
@@ -22,12 +22,12 @@
 
 #include <QtCore/QChar>
 
-namespace boost { namespace spirit { namespace impl {
+namespace boost { namespace spirit { namespace classic { namespace impl {
   bool isalnum_( QChar const& c);
   bool isalpha_( QChar const& c);
   bool isblank_( QChar const& c);
   bool isdigit_( QChar const& c);
-}}}
+}}}}
 
 // must be first for msvc (see position.h for more information)
 #include "position.h"
@@ -38,12 +38,12 @@
 #include <QtCore/QMap>
 #include <QtCore/QPair>
 
-using boost::spirit::parse_info;
-using boost::spirit::rule;
-using boost::spirit::scanner;
-using boost::spirit::ext::skip_rule_parser;
+using boost::spirit::classic::parse_info;
+using boost::spirit::classic::rule;
+using boost::spirit::classic::scanner;
+using boost::spirit::classic::ext::skip_rule_parser;
 
-typedef boost::spirit::position_iterator<QChar const*> CharIterator;
+typedef boost::spirit::classic::position_iterator<QChar const*> CharIterator;
 typedef rule<scanner<CharIterator> > SkipRule;
 typedef skip_rule_parser<SkipRule, CharIterator> CharParser;
 typedef scanner<CharIterator> CharScanner;
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/skip_rule.hpp #1187152:1187153
@@ -1,13 +1,14 @@
 #ifndef SKIP_RULE_H
 #define SKIP_RULE_H
 
-#include <boost/spirit.hpp>
+#include <boost/spirit/include/classic.hpp>
 
 /** This header should (hopefully) be part of a future release of
     boost::spirit */
 
 namespace boost {
 namespace spirit {
+namespace classic {
 namespace ext {
 
 template < typename RuleT, typename BaseT = iteration_policy >
@@ -91,6 +92,7 @@
 };
 
 }  // end namespace ext
+}  // end namespace classic
 }  // end namespace spirit
 }  // end namespace boost
 




More information about the umbrello-devel mailing list