This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  e6402444f1f837efb452c50c106a738a66b59d48 (commit)
       via  645186c0b7e46cf99882616ef2a00f07a472825c (commit)
      from  bbc1ed0b6f8669912dbf7151d3c46fa806e04a67 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6402444f1f837efb452c50c106a738a66b59d48
commit e6402444f1f837efb452c50c106a738a66b59d48
Merge: bbc1ed0 645186c
Author:     Daniel Pfeifer <dan...@pfeifer-mail.de>
AuthorDate: Sun Oct 23 04:25:57 2016 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sun Oct 23 04:25:57 2016 -0400

    Merge topic 'remove-cmobject' into next
    
    645186c0 Revert "Remove cmObject.h and cmTypeMacro.h"


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=645186c0b7e46cf99882616ef2a00f07a472825c
commit 645186c0b7e46cf99882616ef2a00f07a472825c
Author:     Daniel Pfeifer <dan...@pfeifer-mail.de>
AuthorDate: Sun Oct 23 10:25:23 2016 +0200
Commit:     Daniel Pfeifer <dan...@pfeifer-mail.de>
CommitDate: Sun Oct 23 10:25:23 2016 +0200

    Revert "Remove cmObject.h and cmTypeMacro.h"
    
    This reverts commit dcb8b0fb35e74749d07b8aec837b41564691f0c7.

diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h 
b/Source/CPack/IFW/cmCPackIFWGenerator.h
index d656063..88a3741 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.h
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.h
@@ -10,6 +10,7 @@
 #include "cmCPackIFWInstaller.h"
 #include "cmCPackIFWPackage.h"
 #include "cmCPackIFWRepository.h"
+#include "cmTypeMacro.h"
 
 #include <map>
 #include <set>
diff --git a/Source/CPack/cmCPack7zGenerator.h 
b/Source/CPack/cmCPack7zGenerator.h
index a617d9b..063b032 100644
--- a/Source/CPack/cmCPack7zGenerator.h
+++ b/Source/CPack/cmCPack7zGenerator.h
@@ -7,6 +7,7 @@
 
 #include "cmCPackArchiveGenerator.h"
 #include "cmCPackGenerator.h"
+#include "cmTypeMacro.h"
 
 /** \class cmCPack7zGenerator
  * \brief A generator for 7z files
diff --git a/Source/CPack/cmCPackArchiveGenerator.h 
b/Source/CPack/cmCPackArchiveGenerator.h
index df02ae8..7010664 100644
--- a/Source/CPack/cmCPackArchiveGenerator.h
+++ b/Source/CPack/cmCPackArchiveGenerator.h
@@ -7,6 +7,7 @@
 
 #include "cmArchiveWrite.h"
 #include "cmCPackGenerator.h"
+#include "cmTypeMacro.h"
 
 #include <iosfwd>
 #include <string>
diff --git a/Source/CPack/cmCPackDebGenerator.h 
b/Source/CPack/cmCPackDebGenerator.h
index 7db933e..f46ae5a 100644
--- a/Source/CPack/cmCPackDebGenerator.h
+++ b/Source/CPack/cmCPackDebGenerator.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCPackGenerator.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 #include <vector>
diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h
index f32dd70..a7652b1 100644
--- a/Source/CPack/cmCPackGenerator.h
+++ b/Source/CPack/cmCPackGenerator.h
@@ -6,7 +6,9 @@
 #include <cmConfigure.h>
 
 #include "cmCPackComponentGroup.h"
+#include "cmObject.h"
 #include "cmSystemTools.h"
+#include "cmTypeMacro.h"
 
 #include <map>
 #include <sstream>
diff --git a/Source/CPack/cmCPackGeneratorFactory.h 
b/Source/CPack/cmCPackGeneratorFactory.h
index 0a98f91..5381eb2 100644
--- a/Source/CPack/cmCPackGeneratorFactory.h
+++ b/Source/CPack/cmCPackGeneratorFactory.h
@@ -5,6 +5,9 @@
 
 #include <cmConfigure.h>
 
+#include "cmObject.h"
+#include "cmTypeMacro.h"
+
 #include <map>
 #include <string>
 #include <vector>
diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h
index 9ffe5c4..2ac805d 100644
--- a/Source/CPack/cmCPackLog.h
+++ b/Source/CPack/cmCPackLog.h
@@ -5,6 +5,9 @@
 
 #include <cmConfigure.h>
 
+#include "cmObject.h"
+#include "cmTypeMacro.h"
+
 #include <ostream>
 #include <string.h>
 #include <string>
diff --git a/Source/CPack/cmCPackNSISGenerator.h 
b/Source/CPack/cmCPackNSISGenerator.h
index b4bf2d4..d61341c 100644
--- a/Source/CPack/cmCPackNSISGenerator.h
+++ b/Source/CPack/cmCPackNSISGenerator.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCPackGenerator.h"
+#include "cmTypeMacro.h"
 
 #include <iosfwd>
 #include <set>
diff --git a/Source/CPack/cmCPackPKGGenerator.h 
b/Source/CPack/cmCPackPKGGenerator.h
index bb3c1a7..5569185 100644
--- a/Source/CPack/cmCPackPKGGenerator.h
+++ b/Source/CPack/cmCPackPKGGenerator.h
@@ -3,9 +3,6 @@
 #ifndef cmCPackPKGGenerator_h
 #define cmCPackPKGGenerator_h
 
-#include <cmConfigure.h>
-#include <set>
-
 #include "cmCPackGenerator.h"
 
 class cmCPackComponent;
diff --git a/Source/CPack/cmCPackRPMGenerator.h 
b/Source/CPack/cmCPackRPMGenerator.h
index 4d48bd8..f8bcbfe 100644
--- a/Source/CPack/cmCPackRPMGenerator.h
+++ b/Source/CPack/cmCPackRPMGenerator.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCPackGenerator.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 
diff --git a/Source/CPack/cmCPackSTGZGenerator.h 
b/Source/CPack/cmCPackSTGZGenerator.h
index 4b9c1c6..a1bee5f 100644
--- a/Source/CPack/cmCPackSTGZGenerator.h
+++ b/Source/CPack/cmCPackSTGZGenerator.h
@@ -7,6 +7,7 @@
 
 #include "cmCPackGenerator.h"
 #include "cmCPackTGZGenerator.h"
+#include "cmTypeMacro.h"
 
 #include <iosfwd>
 
diff --git a/Source/CPack/cmCPackTGZGenerator.h 
b/Source/CPack/cmCPackTGZGenerator.h
index ee2e975..e93fb44 100644
--- a/Source/CPack/cmCPackTGZGenerator.h
+++ b/Source/CPack/cmCPackTGZGenerator.h
@@ -7,6 +7,7 @@
 
 #include "cmCPackArchiveGenerator.h"
 #include "cmCPackGenerator.h"
+#include "cmTypeMacro.h"
 
 /** \class cmCPackTGZGenerator
  * \brief A generator for TGZ files
diff --git a/Source/CPack/cmCPackTXZGenerator.h 
b/Source/CPack/cmCPackTXZGenerator.h
index 876ca7d..b8a7597 100644
--- a/Source/CPack/cmCPackTXZGenerator.h
+++ b/Source/CPack/cmCPackTXZGenerator.h
@@ -7,6 +7,7 @@
 
 #include "cmCPackArchiveGenerator.h"
 #include "cmCPackGenerator.h"
+#include "cmTypeMacro.h"
 
 /** \class cmCPackTXZGenerator
  * \brief A generator for TXZ files
diff --git a/Source/CPack/cmCPackTarBZip2Generator.h 
b/Source/CPack/cmCPackTarBZip2Generator.h
index 42214fd..2e8ba9b 100644
--- a/Source/CPack/cmCPackTarBZip2Generator.h
+++ b/Source/CPack/cmCPackTarBZip2Generator.h
@@ -7,6 +7,7 @@
 
 #include "cmCPackArchiveGenerator.h"
 #include "cmCPackGenerator.h"
+#include "cmTypeMacro.h"
 
 /** \class cmCPackTarBZip2Generator
  * \brief A generator for TarBZip2 files
diff --git a/Source/CPack/cmCPackTarCompressGenerator.h 
b/Source/CPack/cmCPackTarCompressGenerator.h
index 1476642..7d253e1 100644
--- a/Source/CPack/cmCPackTarCompressGenerator.h
+++ b/Source/CPack/cmCPackTarCompressGenerator.h
@@ -7,6 +7,7 @@
 
 #include "cmCPackArchiveGenerator.h"
 #include "cmCPackGenerator.h"
+#include "cmTypeMacro.h"
 
 /** \class cmCPackTarCompressGenerator
  * \brief A generator for TarCompress files
diff --git a/Source/CPack/cmCPackZIPGenerator.h 
b/Source/CPack/cmCPackZIPGenerator.h
index 95b6489..e0334fb 100644
--- a/Source/CPack/cmCPackZIPGenerator.h
+++ b/Source/CPack/cmCPackZIPGenerator.h
@@ -7,6 +7,7 @@
 
 #include "cmCPackArchiveGenerator.h"
 #include "cmCPackGenerator.h"
+#include "cmTypeMacro.h"
 
 /** \class cmCPackZIPGenerator
  * \brief A generator for ZIP files
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index b06bd38..c305cbf 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -12,6 +12,7 @@
 #include "cmState.h"
 #include "cmStateTypes.h"
 #include "cmSystemTools.h"
+#include "cmTypeMacro.h"
 #include "cm_auto_ptr.hxx"
 #include "cmake.h"
 
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h 
b/Source/CTest/cmCTestBuildAndTestHandler.h
index 5885738..1d424f3 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.h
+++ b/Source/CTest/cmCTestBuildAndTestHandler.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestGenericHandler.h"
+#include "cmTypeMacro.h"
 
 #include <sstream>
 #include <stddef.h>
diff --git a/Source/CTest/cmCTestBuildCommand.h 
b/Source/CTest/cmCTestBuildCommand.h
index 9cc6f7e..acc0ecf 100644
--- a/Source/CTest/cmCTestBuildCommand.h
+++ b/Source/CTest/cmCTestBuildCommand.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestHandlerCommand.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 #include <vector>
diff --git a/Source/CTest/cmCTestBuildHandler.h 
b/Source/CTest/cmCTestBuildHandler.h
index 5bd1157..69970d5 100644
--- a/Source/CTest/cmCTestBuildHandler.h
+++ b/Source/CTest/cmCTestBuildHandler.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestGenericHandler.h"
+#include "cmTypeMacro.h"
 
 #include <cmsys/RegularExpression.hxx>
 #include <deque>
diff --git a/Source/CTest/cmCTestConfigureCommand.h 
b/Source/CTest/cmCTestConfigureCommand.h
index 22d1217..95a476f 100644
--- a/Source/CTest/cmCTestConfigureCommand.h
+++ b/Source/CTest/cmCTestConfigureCommand.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestHandlerCommand.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 
diff --git a/Source/CTest/cmCTestConfigureHandler.h 
b/Source/CTest/cmCTestConfigureHandler.h
index 7fa95ed..4a7c74b 100644
--- a/Source/CTest/cmCTestConfigureHandler.h
+++ b/Source/CTest/cmCTestConfigureHandler.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestGenericHandler.h"
+#include "cmTypeMacro.h"
 
 /** \class cmCTestConfigureHandler
  * \brief A class that handles ctest -S invocations
diff --git a/Source/CTest/cmCTestCoverageCommand.h 
b/Source/CTest/cmCTestCoverageCommand.h
index bf42aa1..98dd6bf 100644
--- a/Source/CTest/cmCTestCoverageCommand.h
+++ b/Source/CTest/cmCTestCoverageCommand.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestHandlerCommand.h"
+#include "cmTypeMacro.h"
 
 #include <set>
 #include <string>
diff --git a/Source/CTest/cmCTestCoverageHandler.h 
b/Source/CTest/cmCTestCoverageHandler.h
index 339b5d7..0ba4a7a 100644
--- a/Source/CTest/cmCTestCoverageHandler.h
+++ b/Source/CTest/cmCTestCoverageHandler.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestGenericHandler.h"
+#include "cmTypeMacro.h"
 
 #include <cmsys/RegularExpression.hxx>
 #include <iosfwd>
diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h 
b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h
index 4c1438b..a8d00e0 100644
--- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h
+++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestCommand.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 #include <vector>
diff --git a/Source/CTest/cmCTestGenericHandler.h 
b/Source/CTest/cmCTestGenericHandler.h
index 4176eb2..ef9fdc0 100644
--- a/Source/CTest/cmCTestGenericHandler.h
+++ b/Source/CTest/cmCTestGenericHandler.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTest.h"
+#include "cmObject.h"
 #include "cmSystemTools.h"
 
 #include <map>
diff --git a/Source/CTest/cmCTestHandlerCommand.h 
b/Source/CTest/cmCTestHandlerCommand.h
index 92748af..0a1bae4 100644
--- a/Source/CTest/cmCTestHandlerCommand.h
+++ b/Source/CTest/cmCTestHandlerCommand.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestCommand.h"
+#include "cmTypeMacro.h"
 
 #include <stddef.h>
 #include <string>
diff --git a/Source/CTest/cmCTestMemCheckCommand.h 
b/Source/CTest/cmCTestMemCheckCommand.h
index 30d9e2b..efd4ecf 100644
--- a/Source/CTest/cmCTestMemCheckCommand.h
+++ b/Source/CTest/cmCTestMemCheckCommand.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestTestCommand.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 
diff --git a/Source/CTest/cmCTestMemCheckHandler.h 
b/Source/CTest/cmCTestMemCheckHandler.h
index b12da28..2300f68 100644
--- a/Source/CTest/cmCTestMemCheckHandler.h
+++ b/Source/CTest/cmCTestMemCheckHandler.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestTestHandler.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 #include <vector>
diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.h 
b/Source/CTest/cmCTestReadCustomFilesCommand.h
index e155595..53610ba 100644
--- a/Source/CTest/cmCTestReadCustomFilesCommand.h
+++ b/Source/CTest/cmCTestReadCustomFilesCommand.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestCommand.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 #include <vector>
diff --git a/Source/CTest/cmCTestRunScriptCommand.h 
b/Source/CTest/cmCTestRunScriptCommand.h
index 01ed62e..ac79db4 100644
--- a/Source/CTest/cmCTestRunScriptCommand.h
+++ b/Source/CTest/cmCTestRunScriptCommand.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestCommand.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 #include <vector>
diff --git a/Source/CTest/cmCTestScriptHandler.h 
b/Source/CTest/cmCTestScriptHandler.h
index 47644be..5ba8ecf 100644
--- a/Source/CTest/cmCTestScriptHandler.h
+++ b/Source/CTest/cmCTestScriptHandler.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestGenericHandler.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 #include <vector>
diff --git a/Source/CTest/cmCTestSleepCommand.h 
b/Source/CTest/cmCTestSleepCommand.h
index 1052f76..c7e076f 100644
--- a/Source/CTest/cmCTestSleepCommand.h
+++ b/Source/CTest/cmCTestSleepCommand.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestCommand.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 #include <vector>
diff --git a/Source/CTest/cmCTestStartCommand.h 
b/Source/CTest/cmCTestStartCommand.h
index cc72d0c..1686b20 100644
--- a/Source/CTest/cmCTestStartCommand.h
+++ b/Source/CTest/cmCTestStartCommand.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestCommand.h"
+#include "cmTypeMacro.h"
 
 #include <iosfwd>
 #include <string>
diff --git a/Source/CTest/cmCTestSubmitCommand.h 
b/Source/CTest/cmCTestSubmitCommand.h
index f5b52c1..f8b9a45 100644
--- a/Source/CTest/cmCTestSubmitCommand.h
+++ b/Source/CTest/cmCTestSubmitCommand.h
@@ -7,6 +7,7 @@
 
 #include "cmCTest.h"
 #include "cmCTestHandlerCommand.h"
+#include "cmTypeMacro.h"
 
 #include <set>
 #include <string>
diff --git a/Source/CTest/cmCTestSubmitHandler.h 
b/Source/CTest/cmCTestSubmitHandler.h
index baaf8af..6e57de8 100644
--- a/Source/CTest/cmCTestSubmitHandler.h
+++ b/Source/CTest/cmCTestSubmitHandler.h
@@ -7,6 +7,7 @@
 
 #include "cmCTest.h"
 #include "cmCTestGenericHandler.h"
+#include "cmTypeMacro.h"
 
 #include <iosfwd>
 #include <set>
diff --git a/Source/CTest/cmCTestTestCommand.h 
b/Source/CTest/cmCTestTestCommand.h
index 3250d93..b4a01dc 100644
--- a/Source/CTest/cmCTestTestCommand.h
+++ b/Source/CTest/cmCTestTestCommand.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestHandlerCommand.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 
diff --git a/Source/CTest/cmCTestTestHandler.h 
b/Source/CTest/cmCTestTestHandler.h
index 5b07e98..703707f 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestGenericHandler.h"
+#include "cmTypeMacro.h"
 
 #include <cmsys/RegularExpression.hxx>
 #include <iosfwd>
diff --git a/Source/CTest/cmCTestUpdateCommand.h 
b/Source/CTest/cmCTestUpdateCommand.h
index 5761f50..e834a29 100644
--- a/Source/CTest/cmCTestUpdateCommand.h
+++ b/Source/CTest/cmCTestUpdateCommand.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestHandlerCommand.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 
diff --git a/Source/CTest/cmCTestUpdateHandler.h 
b/Source/CTest/cmCTestUpdateHandler.h
index 87781e8..9a3ec1b 100644
--- a/Source/CTest/cmCTestUpdateHandler.h
+++ b/Source/CTest/cmCTestUpdateHandler.h
@@ -6,6 +6,7 @@
 #include <cmConfigure.h>
 
 #include "cmCTestGenericHandler.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 #include <utility>
diff --git a/Source/CTest/cmCTestUploadCommand.h 
b/Source/CTest/cmCTestUploadCommand.h
index 474f699..b231844 100644
--- a/Source/CTest/cmCTestUploadCommand.h
+++ b/Source/CTest/cmCTestUploadCommand.h
@@ -7,6 +7,7 @@
 
 #include "cmCTest.h"
 #include "cmCTestHandlerCommand.h"
+#include "cmTypeMacro.h"
 
 #include <string>
 
diff --git a/Source/CTest/cmCTestUploadHandler.h 
b/Source/CTest/cmCTestUploadHandler.h
index 77c2aec..eb05a86 100644
--- a/Source/CTest/cmCTestUploadHandler.h
+++ b/Source/CTest/cmCTestUploadHandler.h
@@ -7,6 +7,7 @@
 
 #include "cmCTest.h"
 #include "cmCTestGenericHandler.h"
+#include "cmTypeMacro.h"
 
 /** \class cmCTestUploadHandler
  * \brief Helper class for CTest
diff --git a/Source/cmCommand.h b/Source/cmCommand.h
index 01f9e05..dcbd0dc 100644
--- a/Source/cmCommand.h
+++ b/Source/cmCommand.h
@@ -3,6 +3,8 @@
 #ifndef cmCommand_h
 #define cmCommand_h
 
+#include "cmObject.h"
+
 #include "cmCommandArgumentsHelper.h"
 #include "cmListFileCache.h"
 #include "cmMakefile.h"
diff --git a/Source/cmObject.h b/Source/cmObject.h
new file mode 100644
index 0000000..621a06f
--- /dev/null
+++ b/Source/cmObject.h
@@ -0,0 +1,41 @@
+/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+   file Copyright.txt or https://cmake.org/licensing for details.  */
+#ifndef cmObject_h
+#define cmObject_h
+
+#include <cmConfigure.h>
+
+#include "cmStandardIncludes.h"
+
+/** \class cmObject
+ * \brief Superclass for all commands and other classes in CMake.
+ *
+ * cmObject is the base class for all classes in CMake. It defines some
+ * methods such as GetNameOfClass, IsA, SafeDownCast.
+ */
+class cmObject
+{
+public:
+  /**
+   * Need virtual destructor to destroy real command type.
+   */
+  virtual ~cmObject() {}
+
+  /**
+   * The class name of the command.
+   */
+  virtual const char* GetNameOfClass() = 0;
+
+  /**
+   * Returns true if this class is the given class, or a subclass of it.
+   */
+  static bool IsTypeOf(const char* type) { return !strcmp("cmObject", type); }
+
+  /**
+   * Returns true if this object is an instance of the given class or
+   * a subclass of it.
+   */
+  virtual bool IsA(const char* type) { return cmObject::IsTypeOf(type); }
+};
+
+#endif
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index a2047af..0aab6d9 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -49,5 +49,6 @@ extern void operator<<(std::ostream&, const 
std::ostringstream&);
 #include "cmCustomCommandLines.h"
 #include "cmDocumentationEntry.h"
 #include "cmTargetLinkLibraryType.h"
+#include "cmTypeMacro.h"
 
 #endif
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index db1e542..468b191 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -10,6 +10,7 @@
 #include "cmDefinitions.h"
 #include "cmListFileCache.h"
 #include "cmSystemTools.h"
+#include "cmTypeMacro.h"
 #include "cmake.h"
 
 #include <algorithm>
diff --git a/Source/cmTypeMacro.h b/Source/cmTypeMacro.h
new file mode 100644
index 0000000..b302ff1
--- /dev/null
+++ b/Source/cmTypeMacro.h
@@ -0,0 +1,31 @@
+/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+   file Copyright.txt or https://cmake.org/licensing for details.  */
+#ifndef cmTypeMacro_h
+#define cmTypeMacro_h
+
+// All subclasses of cmCommand or cmCTestGenericHandler should
+// invoke this macro.
+#define cmTypeMacro(thisClass, superclass)                                    \
+  const char* GetNameOfClass() CM_OVERRIDE { return #thisClass; }             \
+  typedef superclass Superclass;                                              \
+  static bool IsTypeOf(const char* type)                                      \
+  {                                                                           \
+    if (!strcmp(#thisClass, type)) {                                          \
+      return true;                                                            \
+    }                                                                         \
+    return Superclass::IsTypeOf(type);                                        \
+  }                                                                           \
+  bool IsA(const char* type) CM_OVERRIDE                                      \
+  {                                                                           \
+    return thisClass::IsTypeOf(type);                                         \
+  }                                                                           \
+  static thisClass* SafeDownCast(cmObject* c)                                 \
+  {                                                                           \
+    if (c && c->IsA(#thisClass)) {                                            \
+      return static_cast<thisClass*>(c);                                      \
+    }                                                                         \
+    return 0;                                                                 \
+  }                                                                           \
+  class cmTypeMacro_UseTrailingSemicolon
+
+#endif

-----------------------------------------------------------------------

Summary of changes:
 Source/CPack/IFW/cmCPackIFWGenerator.h            |    1 +
 Source/CPack/cmCPack7zGenerator.h                 |    1 +
 Source/CPack/cmCPackArchiveGenerator.h            |    1 +
 Source/CPack/cmCPackDebGenerator.h                |    1 +
 Source/CPack/cmCPackGenerator.h                   |    2 +
 Source/CPack/cmCPackGeneratorFactory.h            |    3 ++
 Source/CPack/cmCPackLog.h                         |    3 ++
 Source/CPack/cmCPackNSISGenerator.h               |    1 +
 Source/CPack/cmCPackPKGGenerator.h                |    3 --
 Source/CPack/cmCPackRPMGenerator.h                |    1 +
 Source/CPack/cmCPackSTGZGenerator.h               |    1 +
 Source/CPack/cmCPackTGZGenerator.h                |    1 +
 Source/CPack/cmCPackTXZGenerator.h                |    1 +
 Source/CPack/cmCPackTarBZip2Generator.h           |    1 +
 Source/CPack/cmCPackTarCompressGenerator.h        |    1 +
 Source/CPack/cmCPackZIPGenerator.h                |    1 +
 Source/CPack/cpack.cxx                            |    1 +
 Source/CTest/cmCTestBuildAndTestHandler.h         |    1 +
 Source/CTest/cmCTestBuildCommand.h                |    1 +
 Source/CTest/cmCTestBuildHandler.h                |    1 +
 Source/CTest/cmCTestConfigureCommand.h            |    1 +
 Source/CTest/cmCTestConfigureHandler.h            |    1 +
 Source/CTest/cmCTestCoverageCommand.h             |    1 +
 Source/CTest/cmCTestCoverageHandler.h             |    1 +
 Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h |    1 +
 Source/CTest/cmCTestGenericHandler.h              |    1 +
 Source/CTest/cmCTestHandlerCommand.h              |    1 +
 Source/CTest/cmCTestMemCheckCommand.h             |    1 +
 Source/CTest/cmCTestMemCheckHandler.h             |    1 +
 Source/CTest/cmCTestReadCustomFilesCommand.h      |    1 +
 Source/CTest/cmCTestRunScriptCommand.h            |    1 +
 Source/CTest/cmCTestScriptHandler.h               |    1 +
 Source/CTest/cmCTestSleepCommand.h                |    1 +
 Source/CTest/cmCTestStartCommand.h                |    1 +
 Source/CTest/cmCTestSubmitCommand.h               |    1 +
 Source/CTest/cmCTestSubmitHandler.h               |    1 +
 Source/CTest/cmCTestTestCommand.h                 |    1 +
 Source/CTest/cmCTestTestHandler.h                 |    1 +
 Source/CTest/cmCTestUpdateCommand.h               |    1 +
 Source/CTest/cmCTestUpdateHandler.h               |    1 +
 Source/CTest/cmCTestUploadCommand.h               |    1 +
 Source/CTest/cmCTestUploadHandler.h               |    1 +
 Source/cmCommand.h                                |    2 +
 Source/cmObject.h                                 |   41 +++++++++++++++++++++
 Source/cmStandardIncludes.h                       |    1 +
 Source/cmState.cxx                                |    1 +
 Source/cmTypeMacro.h                              |   31 ++++++++++++++++
 47 files changed, 122 insertions(+), 3 deletions(-)
 create mode 100644 Source/cmObject.h
 create mode 100644 Source/cmTypeMacro.h


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to