ENH: Add classname to commands
This commit is contained in:
parent
bb6203f970
commit
4c658a5bc5
|
@ -103,6 +103,11 @@ public:
|
|||
*/
|
||||
virtual const char* GetName() = 0;
|
||||
|
||||
/**
|
||||
* The class name of the command.
|
||||
*/
|
||||
virtual const char* GetClassName() = 0;
|
||||
|
||||
/**
|
||||
* Succinct documentation.
|
||||
*/
|
||||
|
@ -183,6 +188,7 @@ private:
|
|||
|
||||
// All subclasses of cmCommand should invoke this macro.
|
||||
#define cmTypeMacro(thisClass,superclass) \
|
||||
virtual const char* GetClassName() { return #thisClass; } \
|
||||
typedef superclass Superclass; \
|
||||
static bool IsTypeOf(const char *type) \
|
||||
{ \
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
class cmConfigureFileCommand : public cmCommand
|
||||
{
|
||||
public:
|
||||
cmTypeMacro(cmConfigureFileCommand, cmCommand);
|
||||
|
||||
virtual cmCommand* Clone()
|
||||
{
|
||||
return new cmConfigureFileCommand;
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
class cmFLTKWrapUICommand : public cmCommand
|
||||
{
|
||||
public:
|
||||
cmTypeMacro(cmFLTKWrapUICommand, cmCommand);
|
||||
|
||||
/**
|
||||
* This is a virtual constructor for the command.
|
||||
*/
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
class cmQTWrapCPPCommand : public cmCommand
|
||||
{
|
||||
public:
|
||||
cmTypeMacro(cmQTWrapCPPCommand, cmCommand);
|
||||
|
||||
/**
|
||||
* This is a virtual constructor for the command.
|
||||
*/
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
class cmQTWrapUICommand : public cmCommand
|
||||
{
|
||||
public:
|
||||
cmTypeMacro(cmQTWrapUICommand, cmCommand);
|
||||
/**
|
||||
* This is a virtual constructor for the command.
|
||||
*/
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
class cmUseMangledMesaCommand : public cmCommand
|
||||
{
|
||||
public:
|
||||
cmTypeMacro(cmUseMangledMesaCommand, cmCommand);
|
||||
|
||||
/**
|
||||
* This is a virtual constructor for the command.
|
||||
*/
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
class cmVTKWrapJavaCommand : public cmCommand
|
||||
{
|
||||
public:
|
||||
cmTypeMacro(cmVTKWrapJavaCommand, cmCommand);
|
||||
|
||||
/**
|
||||
* This is a virtual constructor for the command.
|
||||
*/
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
class cmVTKWrapPythonCommand : public cmCommand
|
||||
{
|
||||
public:
|
||||
cmTypeMacro(cmVTKWrapPythonCommand, cmCommand);
|
||||
|
||||
/**
|
||||
* This is a virtual constructor for the command.
|
||||
*/
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
class cmVTKWrapTclCommand : public cmCommand
|
||||
{
|
||||
public:
|
||||
cmTypeMacro(cmVTKWrapTclCommand, cmCommand);
|
||||
|
||||
/**
|
||||
* This is a virtual constructor for the command.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue