Browse Source

Consistently use _p.h for private headers.

Sascha Zelzer 12 years ago
parent
commit
c7c82f0f92

+ 4 - 6
Libs/CommandLineModules/Core/CMakeLists.txt

@@ -16,22 +16,20 @@ set(KIT_export_directive "CTK_CMDLINEMODULECORE_EXPORT")
 set(KIT_SRCS
   ctkCmdLineModuleDefaultPathBuilder.cpp
   ctkCmdLineModuleDescription.cpp
-  ctkCmdLineModuleDescriptionPrivate.h
+  ctkCmdLineModuleDescription_p.h
   ctkCmdLineModuleDirectoryWatcher.cpp
-  ctkCmdLineModuleDirectoryWatcherPrivate.h
+  ctkCmdLineModuleDirectoryWatcher_p.h
   ctkCmdLineModuleInstance.cpp
   ctkCmdLineModuleInstanceFactory.cpp
   ctkCmdLineModuleManager.cpp
   ctkCmdLineModuleParameter.cpp
-  ctkCmdLineModuleParameterPrivate.cpp
   ctkCmdLineModuleParameterGroup.cpp
-  ctkCmdLineModuleParameterGroupPrivate.h
+  ctkCmdLineModuleParameterGroup_p.h
   ctkCmdLineModuleParameterParsers_p.h
   ctkCmdLineModulePathBuilder.cpp
   ctkCmdLineModuleProcessTask.cpp
   ctkCmdLineModuleXmlProgressWatcher.cpp
   ctkCmdLineModuleReference.cpp
-  ctkCmdLineModuleReferencePrivate.cpp
   ctkCmdLineModuleRunException.cpp
   ctkCmdLineModuleXmlException.cpp
   ctkCmdLineModuleXmlMsgHandler_p.h
@@ -45,7 +43,7 @@ set(KIT_SRCS
 # Headers that should run through moc
 set(KIT_MOC_SRCS
   ctkCmdLineModuleDirectoryWatcher.h
-  ctkCmdLineModuleDirectoryWatcherPrivate.h
+  ctkCmdLineModuleDirectoryWatcher_p.h
   ctkCmdLineModuleManager.h
   ctkCmdLineModuleInstance.h
   ctkCmdLineModuleProcessTask.h

+ 1 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleDescription.cpp

@@ -19,7 +19,7 @@ limitations under the License.
 =============================================================================*/
 
 #include "ctkCmdLineModuleDescription.h"
-#include "ctkCmdLineModuleDescriptionPrivate.h"
+#include "ctkCmdLineModuleDescription_p.h"
 
 #include "ctkCmdLineModuleParameter.h"
 #include "ctkCmdLineModuleParameterGroup.h"

Libs/CommandLineModules/Core/ctkCmdLineModuleDescriptionPrivate.h → Libs/CommandLineModules/Core/ctkCmdLineModuleDescription_p.h


+ 1 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleDirectoryWatcher.cpp

@@ -19,7 +19,7 @@
 =============================================================================*/
 
 #include "ctkCmdLineModuleDirectoryWatcher.h"
-#include "ctkCmdLineModuleDirectoryWatcherPrivate.h"
+#include "ctkCmdLineModuleDirectoryWatcher_p.h"
 #include "ctkCmdLineModuleManager.h"
 
 #include <QObject>

Libs/CommandLineModules/Core/ctkCmdLineModuleDirectoryWatcherPrivate.h → Libs/CommandLineModules/Core/ctkCmdLineModuleDirectoryWatcher_p.h


+ 1 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleManager.cpp

@@ -23,7 +23,7 @@
 
 #include "ctkCmdLineModuleXmlValidator.h"
 #include "ctkCmdLineModuleReference.h"
-#include "ctkCmdLineModuleReferencePrivate.h"
+#include "ctkCmdLineModuleReference_p.h"
 #include "ctkCmdLineModuleInstanceFactory.h"
 
 #include <ctkException.h>

+ 27 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleParameter.cpp

@@ -20,11 +20,37 @@ limitations under the License.
 
 #include "ctkCmdLineModuleParameter.h"
 
-#include "ctkCmdLineModuleParameterPrivate.h"
+#include "ctkCmdLineModuleParameter_p.h"
 
 #include <QStringList>
 #include <QTextStream>
 
+//----------------------------------------------------------------------------
+ctkCmdLineModuleParameterPrivate::ctkCmdLineModuleParameterPrivate()
+  : Hidden(false), Constraints(false), Index(-1), Multiple(false), Aggregate("false")
+{}
+
+//----------------------------------------------------------------------------
+QStringList ctkCmdLineModuleParameterPrivate::splitAndTrim(const QString& str, const QString& separator)
+{
+  QStringList l = str.split(separator, QString::SkipEmptyParts);
+  l.removeDuplicates();
+  // trim the strings
+  QMutableStringListIterator i(l);
+  while(i.hasNext())
+  {
+    QString& n = i.next();
+    n = n.trimmed();
+  }
+  return l;
+}
+
+//----------------------------------------------------------------------------
+void ctkCmdLineModuleParameterPrivate::setFileExtensionsAsString(const QString& extensions)
+{
+  FileExtensions = splitAndTrim(extensions, ",");
+  FileExtensionsAsString = FileExtensions.join(",");
+}
 
 //----------------------------------------------------------------------------
 ctkCmdLineModuleParameter::ctkCmdLineModuleParameter()

+ 1 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleParameterGroup.cpp

@@ -21,7 +21,7 @@ limitations under the License.
 #include "ctkCmdLineModuleParameterGroup.h"
 
 #include "ctkCmdLineModuleParameter.h"
-#include "ctkCmdLineModuleParameterGroupPrivate.h"
+#include "ctkCmdLineModuleParameterGroup_p.h"
 
 #include "ctkException.h"
 

Libs/CommandLineModules/Core/ctkCmdLineModuleParameterGroupPrivate.h → Libs/CommandLineModules/Core/ctkCmdLineModuleParameterGroup_p.h


+ 1 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleParameterParsers_p.h

@@ -25,7 +25,7 @@
 #include <QXmlStreamReader>
 
 #include "ctkCmdLineModuleParameter.h"
-#include "ctkCmdLineModuleParameterPrivate.h"
+#include "ctkCmdLineModuleParameter_p.h"
 
 namespace {
 

+ 0 - 46
Libs/CommandLineModules/Core/ctkCmdLineModuleParameterPrivate.cpp

@@ -1,46 +0,0 @@
-/*=============================================================================
-  
-  Library: CTK
-  
-  Copyright (c) German Cancer Research Center,
-    Division of Medical and Biological Informatics
-    
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-  
-    http://www.apache.org/licenses/LICENSE-2.0
-    
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  
-=============================================================================*/
-
-#include "ctkCmdLineModuleParameterPrivate.h"
-
-ctkCmdLineModuleParameterPrivate::ctkCmdLineModuleParameterPrivate()
-  : Hidden(false), Constraints(false), Index(-1), Multiple(false), Aggregate("false")
-{}
-
-QStringList ctkCmdLineModuleParameterPrivate::splitAndTrim(const QString& str, const QString& separator)
-{
-  QStringList l = str.split(separator, QString::SkipEmptyParts);
-  l.removeDuplicates();
-  // trim the strings
-  QMutableStringListIterator i(l);
-  while(i.hasNext())
-  {
-    QString& n = i.next();
-    n = n.trimmed();
-  }
-  return l;
-}
-
-void ctkCmdLineModuleParameterPrivate::setFileExtensionsAsString(const QString& extensions)
-{
-  FileExtensions = splitAndTrim(extensions, ",");
-  FileExtensionsAsString = FileExtensions.join(",");
-}

Libs/CommandLineModules/Core/ctkCmdLineModuleParameterPrivate.h → Libs/CommandLineModules/Core/ctkCmdLineModuleParameter_p.h


+ 17 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleReference.cpp

@@ -20,7 +20,23 @@
 =============================================================================*/
 
 #include "ctkCmdLineModuleReference.h"
-#include "ctkCmdLineModuleReferencePrivate.h"
+#include "ctkCmdLineModuleReference_p.h"
+#include "ctkCmdLineModuleXmlParser_p.h"
+
+#include <QBuffer>
+
+ctkCmdLineModuleDescription ctkCmdLineModuleReferencePrivate::description() const
+{
+  // Lazy creation. The title is a required XML element.
+  if (Description.title().isNull())
+  {
+    QByteArray xml(RawXmlDescription);
+    QBuffer xmlInput(&xml);
+    ctkCmdLineModuleXmlParser parser(&xmlInput, &Description);
+    parser.doParse();
+  }
+  return Description;
+}
 
 ctkCmdLineModuleReference::ctkCmdLineModuleReference()
   : d(new ctkCmdLineModuleReferencePrivate())

+ 0 - 39
Libs/CommandLineModules/Core/ctkCmdLineModuleReferencePrivate.cpp

@@ -1,39 +0,0 @@
-/*=============================================================================
-  
-  Library: CTK
-  
-  Copyright (c) German Cancer Research Center,
-    Division of Medical and Biological Informatics
-    
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-  
-    http://www.apache.org/licenses/LICENSE-2.0
-    
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  
-=============================================================================*/
-
-#include "ctkCmdLineModuleReferencePrivate.h"
-#include "ctkCmdLineModuleXmlParser_p.h"
-
-#include <QBuffer>
-
-ctkCmdLineModuleDescription ctkCmdLineModuleReferencePrivate::description() const
-{
-  // Lazy creation. The title is a requirement XML element.
-  if (Description.title().isNull())
-  {
-    QByteArray xml(RawXmlDescription);
-    QBuffer xmlInput(&xml);
-    ctkCmdLineModuleXmlParser parser(&xmlInput, &Description);
-    parser.doParse();
-  }
-  return Description;
-}
-

Libs/CommandLineModules/Core/ctkCmdLineModuleReferencePrivate.h → Libs/CommandLineModules/Core/ctkCmdLineModuleReference_p.h


+ 2 - 2
Libs/CommandLineModules/Core/ctkCmdLineModuleXmlParser.cpp

@@ -28,9 +28,9 @@ limitations under the License.
 // CTK includes
 #include "ctkCmdLineModuleXmlParser_p.h"
 #include "ctkCmdLineModuleDescription.h"
-#include "ctkCmdLineModuleDescriptionPrivate.h"
+#include "ctkCmdLineModuleDescription_p.h"
 #include "ctkCmdLineModuleParameterGroup.h"
-#include "ctkCmdLineModuleParameterGroupPrivate.h"
+#include "ctkCmdLineModuleParameterGroup_p.h"
 #include "ctkCmdLineModuleParameterParsers_p.h"
 
 #include "ctkCmdLineModuleXmlException.h"