cmVTKWrapTclCommand.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #ifndef cmVTKWrapTclCommand_h
  2. #define cmVTKWrapTclCommand_h
  3. #include "cmStandardIncludes.h"
  4. #include "cmCommand.h"
  5. /** \class cmVTKWrapTclCommand
  6. * \brief Create Tcl Wrappers for VTK classes.
  7. *
  8. * cmVTKWrapTclCommand is used to define a CMake variable include
  9. * path location by specifying a file and list of directories.
  10. */
  11. class cmVTKWrapTclCommand : public cmCommand
  12. {
  13. public:
  14. /**
  15. * This is a virtual constructor for the command.
  16. */
  17. virtual cmCommand* Clone()
  18. {
  19. return new cmVTKWrapTclCommand;
  20. }
  21. /**
  22. * This is called when the command is first encountered in
  23. * the CMakeLists.txt file.
  24. */
  25. virtual bool InitialPass(std::vector<std::string> const& args);
  26. /**
  27. * This is called at the end after all the information
  28. * specified by the command is accumulated. Most commands do
  29. * not implement this method. At this point, reading and
  30. * writing to the cache can be done.
  31. */
  32. virtual void FinalPass();
  33. /**
  34. * The name of the command as specified in CMakeList.txt.
  35. */
  36. virtual const char* GetName() { return "VTK_WRAP_TCL";}
  37. /**
  38. * Succinct documentation.
  39. */
  40. virtual const char* GetTerseDocumentation()
  41. {
  42. return "Create Tcl Wrappers for VTK classes.";
  43. }
  44. /**
  45. * More documentation.
  46. */
  47. virtual const char* GetFullDocumentation()
  48. {
  49. return
  50. "VTK_WRAP_TCL(resultingLibraryName [SOURCES] SourceListName SourceLists ... [COMMANDS CommandName1 CommandName2 ...])";
  51. }
  52. /**
  53. * Helper methods
  54. */
  55. virtual bool CreateInitFile(std::string &name);
  56. virtual bool WriteInit(const char *kitName, std::string& outFileName,
  57. std::vector<std::string>& classes);
  58. private:
  59. std::vector<cmSourceFile> m_WrapClasses;
  60. std::vector<std::string> m_WrapHeaders;
  61. std::string m_LibraryName;
  62. std::string m_SourceList;
  63. std::vector<std::string> m_Commands;
  64. };
  65. #endif