cmCustomCommand.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2000 National Library of Medicine
  8. All rights reserved.
  9. See COPYRIGHT.txt for copyright details.
  10. =========================================================================*/
  11. #ifndef cmCustomCommand_h
  12. #define cmCustomCommand_h
  13. #include "cmStandardIncludes.h"
  14. class cmMakefile;
  15. /** \class cmCustomCommand
  16. * \brief A class to encapsulate a custom command
  17. *
  18. * cmCustomCommand encapsulates the properties of a custom command
  19. */
  20. class cmCustomCommand
  21. {
  22. public:
  23. cmCustomCommand(const char *src, const char *command,
  24. std::vector<std::string> dep,
  25. std::vector<std::string> out);
  26. cmCustomCommand(const cmCustomCommand& r);
  27. /**
  28. * Use the cmMakefile's Expand commands to expand any variables in
  29. * this objects members.
  30. */
  31. void ExpandVariables(const cmMakefile &);
  32. /**
  33. * Return the name of the source file. I'm not sure if this is a full path or not.
  34. */
  35. std::string GetSourceName() const {return m_Source;}
  36. void SetSourceName(const char *name) {m_Source = name;}
  37. /**
  38. * Return the command to execute
  39. */
  40. std::string GetCommand() const {return m_Command;}
  41. void SetCommand(const char *cmd) {m_Command = cmd;}
  42. /**
  43. * Return the vector that holds the list of dependencies
  44. */
  45. const std::vector<std::string> &GetDepends() const {return m_Depends;}
  46. std::vector<std::string> &GetDepends() {return m_Depends;}
  47. /**
  48. * Return the vector that holds the list of outputs of this command
  49. */
  50. const std::vector<std::string> &GetOutputs() const {return m_Outputs;}
  51. std::vector<std::string> &GetOutputs() {return m_Outputs;}
  52. private:
  53. std::string m_Source;
  54. std::string m_Command;
  55. std::vector<std::string> m_Depends;
  56. std::vector<std::string> m_Outputs;
  57. };
  58. #endif