ENH:Beginning clean up; adding documentation

This commit is contained in:
Will Schroeder 2001-01-10 17:29:46 -05:00
parent d9a73d8d24
commit be6b895a3a
2 changed files with 105 additions and 22 deletions

View File

@ -1,37 +1,75 @@
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2000 National Library of Medicine
All rights reserved.
See COPYRIGHT.txt for copyright details.
=========================================================================*/
#ifndef cmExecutablesRule_h #ifndef cmExecutablesRule_h
#define cmExecutablesRule_h #define cmExecutablesRule_h
#include "cmStandardIncludes.h" #include "cmStandardIncludes.h"
#include "cmRuleMaker.h" #include "cmRuleMaker.h"
/** \class cmExecutablesRule
* \brief Defines a list of executables to build.
*
* cmExecutablesRule defines a list of executable (i.e., test)
* programs to create.
*/
class cmExecutablesRule : public cmRuleMaker class cmExecutablesRule : public cmRuleMaker
{ {
public: public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone() virtual cmRuleMaker* Clone()
{ {
return new cmExecutablesRule; return new cmExecutablesRule;
} }
// This is called when the rule is firt encountered in
// the input file /**
* This is called when the rule is first encountered in
* the CMakeLists.txt file.
*/
virtual bool Invoke(std::vector<std::string>& args); virtual bool Invoke(std::vector<std::string>& args);
/**
* This is called at the end after all the information
* specified by the rules is accumulated.
*/
virtual void FinalPass() { } virtual void FinalPass() { }
// This is the name used in the input file. /**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "EXECUTABLES";} virtual const char* GetName() { return "EXECUTABLES";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation() virtual const char* TerseDocumentation()
{ {
return "Add a list of executables files."; return "Add a list of executables files.";
} }
// Return full documentation for the rule /**
* More documentation.
*/
virtual const char* FullDocumentation() virtual const char* FullDocumentation()
{ {
return return
"EXECUTABLES(file1 file2 ...)"; "EXECUTABLES(file1 file2 ...)";
} }
}; };
#endif #endif

View File

@ -1,35 +1,80 @@
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2000 National Library of Medicine
All rights reserved.
See COPYRIGHT.txt for copyright details.
=========================================================================*/
#ifndef cmFindIncludeRule_h #ifndef cmFindIncludeRule_h
#define cmFindIncludeRule_h #define cmFindIncludeRule_h
#include "cmStandardIncludes.h" #include "cmStandardIncludes.h"
#include "cmRuleMaker.h" #include "cmRuleMaker.h"
/** \class cmFindIncludeRule
* \brief Define a rule that searches for an include file.
*
* cmFindIncludeRule is used to define a variable include
* path location by specifying a file and list of directories.
*/
class cmFindIncludeRule : public cmRuleMaker class cmFindIncludeRule : public cmRuleMaker
{ {
public: public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone() virtual cmRuleMaker* Clone()
{ {
return new cmFindIncludeRule; return new cmFindIncludeRule;
} }
// This is called when the rule is firt encountered in
// the input file
virtual bool Invoke(std::vector<std::string>& args);
virtual void FinalPass() { }
virtual bool IsInherited() { return true; }
// This is the name used in the input file. /**
* This is called when the rule is first encountered in
* the CMakeLists.txt file.
*/
virtual bool Invoke(std::vector<std::string>& args);
/**
* This is called at the end after all the information
* specified by the rules is accumulated.
*/
virtual void FinalPass() { }
/**
* This determines if the rule gets propagated down
* to makefiles located in subdirectories.
*/
virtual bool IsInherited()
{return true;}
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "FIND_INCLUDE";} virtual const char* GetName() { return "FIND_INCLUDE";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation() virtual const char* TerseDocumentation()
{ {
return "Find an include path."; return "Find an include path.";
} }
// Return full documentation for the rule /**
* More documentation.
*/
virtual const char* FullDocumentation() virtual const char* FullDocumentation()
{ {
return return
"FIND_INCLUDE(DEFINE try1 try2 ...);"; "FIND_INCLUDE(DEFINE try1 try2 ...);";
} }
}; };