cmVTKWrapTclCommand.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmVTKWrapTclCommand_h
  14. #define cmVTKWrapTclCommand_h
  15. #include "cmCommand.h"
  16. #include "cmSourceFile.h"
  17. /** \class cmVTKWrapTclCommand
  18. * \brief Create Tcl Wrappers for VTK classes.
  19. *
  20. * cmVTKWrapTclCommand is used to define a CMake variable include
  21. * path location by specifying a file and list of directories.
  22. */
  23. class cmVTKWrapTclCommand : public cmCommand
  24. {
  25. public:
  26. cmTypeMacro(cmVTKWrapTclCommand, cmCommand);
  27. /**
  28. * This is a virtual constructor for the command.
  29. */
  30. virtual cmCommand* Clone()
  31. {
  32. return new cmVTKWrapTclCommand;
  33. }
  34. /**
  35. * This is called when the command is first encountered in
  36. * the CMakeLists.txt file.
  37. */
  38. virtual bool InitialPass(std::vector<std::string> const& args);
  39. /**
  40. * This is called at the end after all the information
  41. * specified by the command is accumulated. Most commands do
  42. * not implement this method. At this point, reading and
  43. * writing to the cache can be done.
  44. */
  45. virtual void FinalPass();
  46. /**
  47. * The name of the command as specified in CMakeList.txt.
  48. */
  49. virtual const char* GetName() { return "VTK_WRAP_TCL";}
  50. /**
  51. * Succinct documentation.
  52. */
  53. virtual const char* GetTerseDocumentation()
  54. {
  55. return "Deprecated. For use only in VTK 4.0.";
  56. }
  57. /**
  58. * More documentation.
  59. */
  60. virtual const char* GetFullDocumentation()
  61. {
  62. return
  63. " VTK_WRAP_TCL(resultingLibraryName [SOURCES]\n"
  64. " SourceListName class1 class2 ...\n"
  65. " [COMMANDS CommandName1 CommandName2 ...])\n"
  66. "Create Tcl wrappers for VTK classes.";
  67. }
  68. /**
  69. * Helper methods
  70. */
  71. virtual bool CreateInitFile(std::string &name);
  72. virtual bool WriteInit(const char *kitName, std::string& outFileName,
  73. std::vector<std::string>& classes);
  74. private:
  75. std::vector<cmSourceFile> WrapClasses;
  76. std::vector<std::string> WrapHeaders;
  77. std::string LibraryName;
  78. std::string SourceList;
  79. std::vector<std::string> Commands;
  80. };
  81. #endif