cmVTKWrapPythonCommand.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef cmVTKWrapPythonCommand_h
  2. #define cmVTKWrapPythonCommand_h
  3. #include "cmStandardIncludes.h"
  4. #include "cmCommand.h"
  5. /** \class cmVTKWrapPythonCommand
  6. * \brief Create Python Language bindings for classes
  7. *
  8. * cmVTKWrapPythonCommand is used to create wrappers for classes into Python
  9. */
  10. class cmVTKWrapPythonCommand : public cmCommand
  11. {
  12. public:
  13. /**
  14. * This is a virtual constructor for the command.
  15. */
  16. virtual cmCommand* Clone()
  17. {
  18. return new cmVTKWrapPythonCommand;
  19. }
  20. /**
  21. * This is called when the command is first encountered in
  22. * the CMakeLists.txt file.
  23. */
  24. virtual bool Invoke(std::vector<std::string>& args);
  25. /**
  26. * This is called at the end after all the information
  27. * specified by the command is accumulated. Most commands do
  28. * not implement this method. At this point, reading and
  29. * writing to the cache can be done.
  30. */
  31. virtual void FinalPass();
  32. /**
  33. * This determines if the command gets propagated down
  34. * to makefiles located in subdirectories.
  35. */
  36. virtual bool IsInherited()
  37. {return true;}
  38. /**
  39. * The name of the command as specified in CMakeList.txt.
  40. */
  41. virtual const char* GetName() { return "VTK_WRAP_PYTHON";}
  42. /**
  43. * Succinct documentation.
  44. */
  45. virtual const char* GetTerseDocumentation()
  46. {
  47. return "Create Python Wrappers.";
  48. }
  49. /**
  50. * More documentation.
  51. */
  52. virtual const char* GetFullDocumentation()
  53. {
  54. return
  55. "VTK_WRAP_PYTHON(resultingLibraryName SourceListName SourceLists ...)";
  56. }
  57. /**
  58. * Helper methods
  59. */
  60. virtual bool CreateInitFile(std::string &name);
  61. virtual bool WriteInit(const char *kitName, std::string& outFileName,
  62. std::vector<std::string>& classes);
  63. private:
  64. std::vector<cmSourceFile> m_WrapClasses;
  65. std::vector<std::string> m_WrapHeaders;
  66. std::string m_LibraryName;
  67. std::string m_SourceList;
  68. };
  69. #endif