cmWrapTclCommand.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef cmWrapTclCommand_h
  2. #define cmWrapTclCommand_h
  3. #include "cmStandardIncludes.h"
  4. #include "cmCommand.h"
  5. /** \class cmWrapTclCommand
  6. * \brief Define a command that searches for an include file.
  7. *
  8. * cmWrapTclCommand is used to define a CMake variable include
  9. * path location by specifying a file and list of directories.
  10. */
  11. class cmWrapTclCommand : public cmCommand
  12. {
  13. public:
  14. /**
  15. * This is a virtual constructor for the command.
  16. */
  17. virtual cmCommand* Clone()
  18. {
  19. return new cmWrapTclCommand;
  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 "WRAP_TCL";}
  43. /**
  44. * Succinct documentation.
  45. */
  46. virtual const char* GetTerseDocumentation()
  47. {
  48. return "Create Tcl Wrappers.";
  49. }
  50. /**
  51. * More documentation.
  52. */
  53. virtual const char* GetFullDocumentation()
  54. {
  55. return
  56. "WRAP_TCL()";
  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<cmClassFile> m_WrapClasses;
  66. std::vector<std::string> m_WrapHeaders;
  67. };
  68. #endif