cmQTWrapCPPCommand.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef cmQTWrapCPPCommand_h
  2. #define cmQTWrapCPPCommand_h
  3. #include "cmStandardIncludes.h"
  4. #include "cmCommand.h"
  5. /** \class cmQTWrapCPPCommand
  6. * \brief Create moc file rules for QT classes
  7. *
  8. * cmQTWrapCPPCommand is used to create wrappers for QT classes into normal C++
  9. */
  10. class cmQTWrapCPPCommand : public cmCommand
  11. {
  12. public:
  13. /**
  14. * This is a virtual constructor for the command.
  15. */
  16. virtual cmCommand* Clone()
  17. {
  18. return new cmQTWrapCPPCommand;
  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 "QT_WRAP_CPP";}
  36. /**
  37. * Succinct documentation.
  38. */
  39. virtual const char* GetTerseDocumentation()
  40. {
  41. return "Create QT Wrappers.";
  42. }
  43. /**
  44. * More documentation.
  45. */
  46. virtual const char* GetFullDocumentation()
  47. {
  48. return
  49. "QT_WRAP_CPP(resultingLibraryName DestName SourceLists ...)\n"
  50. "Produce moc files for all the .h file listed in the SourceLists.\n"
  51. "The moc files will be added to the library using the DestName\n"
  52. "source list.";
  53. }
  54. private:
  55. /**
  56. * List of produced files.
  57. */
  58. std::vector<cmSourceFile> m_WrapClasses;
  59. /**
  60. * List of header files that pprovide the source for m_WrapClasses.
  61. */
  62. std::vector<std::string> m_WrapHeaders;
  63. std::vector<std::string> m_OriginalNames;
  64. std::string m_LibraryName;
  65. std::string m_SourceList;
  66. };
  67. #endif