cmVTKWrapPythonCommand.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 InitialPass(std::vector<std::string> const& 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. * The name of the command as specified in CMakeList.txt.
  34. */
  35. virtual const char* GetName() { return "VTK_WRAP_PYTHON";}
  36. /**
  37. * Succinct documentation.
  38. */
  39. virtual const char* GetTerseDocumentation()
  40. {
  41. return "Create Python Wrappers.";
  42. }
  43. /**
  44. * More documentation.
  45. */
  46. virtual const char* GetFullDocumentation()
  47. {
  48. return
  49. "VTK_WRAP_PYTHON(resultingLibraryName SourceListName SourceLists ...)";
  50. }
  51. /**
  52. * Helper methods
  53. */
  54. virtual bool CreateInitFile(std::string &name);
  55. virtual bool WriteInit(const char *kitName, std::string& outFileName,
  56. std::vector<std::string>& classes);
  57. private:
  58. std::vector<cmSourceFile> m_WrapClasses;
  59. std::vector<std::string> m_WrapHeaders;
  60. std::string m_LibraryName;
  61. std::string m_SourceList;
  62. };
  63. #endif