Commit 15aa814b authored by Daniel Pfeifer's avatar Daniel Pfeifer

Remove cmObject.h and cmTypeMacro.h

parent f6608329
Pipeline #32368 passed with stage
......@@ -10,7 +10,6 @@
#include "cmCPackIFWInstaller.h"
#include "cmCPackIFWPackage.h"
#include "cmCPackIFWRepository.h"
#include "cmTypeMacro.h"
#include <map>
#include <set>
......
......@@ -7,7 +7,6 @@
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
/** \class cmCPack7zGenerator
* \brief A generator for 7z files
......
......@@ -7,7 +7,6 @@
#include "cmArchiveWrite.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
#include <iosfwd>
#include <string>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
#include <string>
#include <vector>
......
......@@ -6,9 +6,7 @@
#include <cmConfigure.h>
#include "cmCPackComponentGroup.h"
#include "cmObject.h"
#include "cmSystemTools.h"
#include "cmTypeMacro.h"
#include <map>
#include <sstream>
......
......@@ -5,9 +5,6 @@
#include <cmConfigure.h>
#include "cmObject.h"
#include "cmTypeMacro.h"
#include <map>
#include <string>
#include <vector>
......
......@@ -5,9 +5,6 @@
#include <cmConfigure.h>
#include "cmObject.h"
#include "cmTypeMacro.h"
#include <ostream>
#include <string.h>
#include <string>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
#include <iosfwd>
#include <set>
......
......@@ -3,6 +3,9 @@
#ifndef cmCPackPKGGenerator_h
#define cmCPackPKGGenerator_h
#include <cmConfigure.h>
#include <set>
#include "cmCPackGenerator.h"
class cmCPackComponent;
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
#include <string>
......
......@@ -7,7 +7,6 @@
#include "cmCPackGenerator.h"
#include "cmCPackTGZGenerator.h"
#include "cmTypeMacro.h"
#include <iosfwd>
......
......@@ -7,7 +7,6 @@
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
/** \class cmCPackTGZGenerator
* \brief A generator for TGZ files
......
......@@ -7,7 +7,6 @@
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
/** \class cmCPackTXZGenerator
* \brief A generator for TXZ files
......
......@@ -7,7 +7,6 @@
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
/** \class cmCPackTarBZip2Generator
* \brief A generator for TarBZip2 files
......
......@@ -7,7 +7,6 @@
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
/** \class cmCPackTarCompressGenerator
* \brief A generator for TarCompress files
......
......@@ -7,7 +7,6 @@
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
/** \class cmCPackZIPGenerator
* \brief A generator for ZIP files
......
......@@ -12,7 +12,6 @@
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmTypeMacro.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h"
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestGenericHandler.h"
#include "cmTypeMacro.h"
#include <sstream>
#include <stddef.h>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestHandlerCommand.h"
#include "cmTypeMacro.h"
#include <string>
#include <vector>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestGenericHandler.h"
#include "cmTypeMacro.h"
#include <cmsys/RegularExpression.hxx>
#include <deque>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestHandlerCommand.h"
#include "cmTypeMacro.h"
#include <string>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestGenericHandler.h"
#include "cmTypeMacro.h"
/** \class cmCTestConfigureHandler
* \brief A class that handles ctest -S invocations
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestHandlerCommand.h"
#include "cmTypeMacro.h"
#include <set>
#include <string>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestGenericHandler.h"
#include "cmTypeMacro.h"
#include <cmsys/RegularExpression.hxx>
#include <iosfwd>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestCommand.h"
#include "cmTypeMacro.h"
#include <string>
#include <vector>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTest.h"
#include "cmObject.h"
#include "cmSystemTools.h"
#include <map>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestCommand.h"
#include "cmTypeMacro.h"
#include <stddef.h>
#include <string>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestTestCommand.h"
#include "cmTypeMacro.h"
#include <string>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestTestHandler.h"
#include "cmTypeMacro.h"
#include <string>
#include <vector>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestCommand.h"
#include "cmTypeMacro.h"
#include <string>
#include <vector>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestCommand.h"
#include "cmTypeMacro.h"
#include <string>
#include <vector>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestGenericHandler.h"
#include "cmTypeMacro.h"
#include <string>
#include <vector>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestCommand.h"
#include "cmTypeMacro.h"
#include <string>
#include <vector>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestCommand.h"
#include "cmTypeMacro.h"
#include <iosfwd>
#include <string>
......
......@@ -7,7 +7,6 @@
#include "cmCTest.h"
#include "cmCTestHandlerCommand.h"
#include "cmTypeMacro.h"
#include <set>
#include <string>
......
......@@ -7,7 +7,6 @@
#include "cmCTest.h"
#include "cmCTestGenericHandler.h"
#include "cmTypeMacro.h"
#include <iosfwd>
#include <set>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestHandlerCommand.h"
#include "cmTypeMacro.h"
#include <string>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestGenericHandler.h"
#include "cmTypeMacro.h"
#include <cmsys/RegularExpression.hxx>
#include <iosfwd>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestHandlerCommand.h"
#include "cmTypeMacro.h"
#include <string>
......
......@@ -6,7 +6,6 @@
#include <cmConfigure.h>
#include "cmCTestGenericHandler.h"
#include "cmTypeMacro.h"
#include <string>
#include <utility>
......
......@@ -7,7 +7,6 @@
#include "cmCTest.h"
#include "cmCTestHandlerCommand.h"
#include "cmTypeMacro.h"
#include <string>
......
......@@ -7,7 +7,6 @@
#include "cmCTest.h"
#include "cmCTestGenericHandler.h"
#include "cmTypeMacro.h"
/** \class cmCTestUploadHandler
* \brief Helper class for CTest
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -9,7 +9,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
namespace cmsys {
......
......@@ -3,8 +3,6 @@
#ifndef cmCommand_h
#define cmCommand_h
#include "cmObject.h"
#include "cmCommandArgumentsHelper.h"
#include "cmListFileCache.h"
#include "cmMakefile.h"
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -9,7 +9,6 @@
#include "cmCommand.h"
#include "cmCommandArgumentsHelper.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
class cmExportSet;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
class cmSourceFile;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -9,7 +9,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
/* 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
......@@ -10,7 +10,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmDependInformation;
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -49,6 +49,5 @@ extern void operator<<(std::ostream&, const std::ostringstream&);
#include "cmCustomCommandLines.h"
#include "cmDocumentationEntry.h"
#include "cmTargetLinkLibraryType.h"
#include "cmTypeMacro.h"
#endif
......@@ -10,7 +10,6 @@
#include "cmDefinitions.h"
#include "cmListFileCache.h"
#include "cmSystemTools.h"
#include "cmTypeMacro.h"
#include "cmake.h"
#include <algorithm>
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmTargetPropCommandBase.h"
#include "cmTypeMacro.h"
class cmCommand;
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmTargetPropCommandBase.h"
#include "cmTypeMacro.h"
class cmCommand;
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmTargetPropCommandBase.h"
#include "cmTypeMacro.h"
class cmCommand;
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmTargetPropCommandBase.h"
#include "cmTypeMacro.h"
class cmCommand;
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmTargetPropCommandBase.h"
#include "cmTypeMacro.h"
class cmCommand;
class cmExecutionStatus;
......
/* 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
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -9,7 +9,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "cmCommand.h"
#include "cmTypeMacro.h"
class cmExecutionStatus;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!