cmElseCommand.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2000 National Library of Medicine
  8. All rights reserved.
  9. See COPYRIGHT.txt for copyright details.
  10. =========================================================================*/
  11. #ifndef cmElseCommand_h
  12. #define cmElseCommand_h
  13. #include "cmIfCommand.h"
  14. /** \class cmElseCommand
  15. * \brief ends an if block
  16. *
  17. * cmElseCommand ends an if block
  18. */
  19. class cmElseCommand : public cmCommand
  20. {
  21. public:
  22. /**
  23. * This is a virtual constructor for the command.
  24. */
  25. virtual cmCommand* Clone()
  26. {
  27. return new cmElseCommand;
  28. }
  29. /**
  30. * This is called when the command is first encountered in
  31. * the CMakeLists.txt file.
  32. */
  33. virtual bool Invoke(std::vector<std::string>& args);
  34. /**
  35. * The name of the command as specified in CMakeList.txt.
  36. */
  37. virtual const char* GetName() { return "ELSE";}
  38. /**
  39. * Succinct documentation.
  40. */
  41. virtual const char* GetTerseDocumentation()
  42. {
  43. return "starts the else portion of an if block";
  44. }
  45. /**
  46. * More documentation.
  47. */
  48. virtual const char* GetFullDocumentation()
  49. {
  50. return
  51. "ELSE(define)";
  52. }
  53. cmTypeMacro(cmElseCommand, cmCommand);
  54. };
  55. #endif