1
0

cmVTKWrapTclCommand.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #ifndef cmVTKWrapTclCommand_h
  2. #define cmVTKWrapTclCommand_h
  3. #include "cmStandardIncludes.h"
  4. #include "cmCommand.h"
  5. /** \class cmVTKWrapTclCommand
  6. * \brief Define a command that searches for an include file.
  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 Invoke(std::vector<std::string>& 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. * This determines if the command gets propagated down
  35. * to makefiles located in subdirectories.
  36. */
  37. virtual bool IsInherited()
  38. {return true;}
  39. /**
  40. * The name of the command as specified in CMakeList.txt.
  41. */
  42. virtual const char* GetName() { return "VTK_WRAP_TCL";}
  43. /**
  44. * Succinct documentation.
  45. */
  46. virtual const char* GetTerseDocumentation()
  47. {
  48. return "Create Tcl Wrappers for VTK classes.";
  49. }
  50. /**
  51. * More documentation.
  52. */
  53. virtual const char* GetFullDocumentation()
  54. {
  55. return
  56. "VTK_WRAP_TCL(resultingLibraryName SourceListName SourceLists ...)";
  57. }
  58. /**
  59. * Helper methods
  60. */
  61. virtual bool CreateInitFile(std::string &name);
  62. virtual bool WriteInit(const char *kitName, std::string& outFileName,
  63. std::vector<std::string>& classes);
  64. private:
  65. std::vector<cmSourceFile> m_WrapClasses;
  66. std::vector<std::string> m_WrapHeaders;
  67. std::string m_LibraryName;
  68. std::string m_SourceList;
  69. };
  70. #endif