ENH: Add classname to commands

This commit is contained in:
Andy Cedilnik 2005-06-16 14:05:22 -04:00
parent bb6203f970
commit 4c658a5bc5
9 changed files with 21 additions and 0 deletions

View File

@ -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) \
{ \

View File

@ -22,6 +22,8 @@
class cmConfigureFileCommand : public cmCommand
{
public:
cmTypeMacro(cmConfigureFileCommand, cmCommand);
virtual cmCommand* Clone()
{
return new cmConfigureFileCommand;

View File

@ -27,6 +27,8 @@
class cmFLTKWrapUICommand : public cmCommand
{
public:
cmTypeMacro(cmFLTKWrapUICommand, cmCommand);
/**
* This is a virtual constructor for the command.
*/

View File

@ -29,6 +29,8 @@
class cmQTWrapCPPCommand : public cmCommand
{
public:
cmTypeMacro(cmQTWrapCPPCommand, cmCommand);
/**
* This is a virtual constructor for the command.
*/

View File

@ -29,6 +29,7 @@
class cmQTWrapUICommand : public cmCommand
{
public:
cmTypeMacro(cmQTWrapUICommand, cmCommand);
/**
* This is a virtual constructor for the command.
*/

View File

@ -30,6 +30,8 @@
class cmUseMangledMesaCommand : public cmCommand
{
public:
cmTypeMacro(cmUseMangledMesaCommand, cmCommand);
/**
* This is a virtual constructor for the command.
*/

View File

@ -29,6 +29,8 @@
class cmVTKWrapJavaCommand : public cmCommand
{
public:
cmTypeMacro(cmVTKWrapJavaCommand, cmCommand);
/**
* This is a virtual constructor for the command.
*/

View File

@ -29,6 +29,8 @@
class cmVTKWrapPythonCommand : public cmCommand
{
public:
cmTypeMacro(cmVTKWrapPythonCommand, cmCommand);
/**
* This is a virtual constructor for the command.
*/

View File

@ -30,6 +30,8 @@
class cmVTKWrapTclCommand : public cmCommand
{
public:
cmTypeMacro(cmVTKWrapTclCommand, cmCommand);
/**
* This is a virtual constructor for the command.
*/