[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/soprano
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2008-09-26 11:10:32
Message-ID: 1222427432.579639.19411.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 864985 by trueg:

New option to set the export module

 M  +1 -1      CMakeLists.txt  
 M  +14 -4     tools/onto2vocabularyclass.cpp  


--- trunk/kdesupport/soprano/CMakeLists.txt #864984:864985
@@ -2,7 +2,7 @@
 
 set(CMAKE_SOPRANO_VERSION_MAJOR 2 CACHE INT "Major Soprano version number" FORCE)
 set(CMAKE_SOPRANO_VERSION_MINOR 1 CACHE INT "Minor Soprano version number" FORCE)
-set(CMAKE_SOPRANO_VERSION_RELEASE 62 CACHE INT "Release Soprano version number" \
FORCE) +set(CMAKE_SOPRANO_VERSION_RELEASE 63 CACHE INT "Release Soprano version \
number" FORCE)  set(CMAKE_SOPRANO_VERSION_STRING \
"${CMAKE_SOPRANO_VERSION_MAJOR}.${CMAKE_SOPRANO_VERSION_MINOR}.${CMAKE_SOPRANO_VERSION_RELEASE}" \
CACHE STRING "Soprano version string" FORCE)  
 enable_testing()
--- trunk/kdesupport/soprano/tools/onto2vocabularyclass.cpp #864984:864985
@@ -80,7 +80,7 @@
     QTextStream s( stderr );
     s << endl;
     s << "Usage:" << endl
-      << "   onto2vocabularyclass --name <name> --encoding <encoding> [--namespace \
<ns>] [--no-visibility-export] <ontologyfile>" << endl; +      << "   \
onto2vocabularyclass --name <name> --encoding <encoding> [--namespace <ns>] \
[--export-module <module>] [--no-visibility-export] <ontologyfile>" << endl;  
     if ( !error.isEmpty() ) {
         s << endl << error << endl;
@@ -154,6 +154,7 @@
     QString className;
     QString namespaceName;
     QString encoding;
+    QString exportModule = "soprano";
     bool visibilityExport = true;
     int i = 1;
     while ( i < args.count() ) {
@@ -184,6 +185,15 @@
                 return usage();
             }
         }
+        else if ( args[i] == "--export-module" ) {
+            ++i;
+            if ( i < args.count() ) {
+                exportModule = args[i];
+            }
+            else {
+                return usage();
+            }
+        }
         else if ( args[i] == "--no-visibility-export" ) {
             visibilityExport = false;
         }
@@ -331,7 +341,7 @@
     headerStream << "#include <QtCore/QUrl>" << endl;
 
     if ( visibilityExport )
-        headerStream << "#include \"soprano_export.h\"" << endl;
+        headerStream << QString( "#include \
\"%1_export.h\"").arg(exportModule.toLower()) << endl;  headerStream << endl;
 
     int indent = 0;
@@ -352,7 +362,7 @@
 
     headerStream << createIndent( indent );
     if ( visibilityExport )
-        headerStream << "SOPRANO_EXPORT ";
+        headerStream << QString( "%1_EXPORT " ).arg(exportModule.toUpper());
     headerStream << "QUrl " << className.toLower() << "Namespace();" << endl << \
endl;  
     for( QMap<QString, QPair<QString, QString> >::const_iterator it = \
normalizedResources.begin(); @@ -369,7 +379,7 @@
         }
         headerStream << createIndent( indent );
         if ( visibilityExport )
-            headerStream << "SOPRANO_EXPORT ";
+            headerStream << QString( "%1_EXPORT " ).arg(exportModule.toUpper());
         headerStream << "QUrl " << name << "();" << endl;
 
         ++it;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic