1
0

cmData.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmData_h
  14. #define cmData_h
  15. #include "cmStandardIncludes.h"
  16. /** \class cmData
  17. * \brief Hold extra data on a cmMakefile instance for a command.
  18. *
  19. * When CMake commands need to store extra information in a cmMakefile
  20. * instance, but the information is not needed by the makefile generators,
  21. * it can be held in a subclass of cmData. The cmMakefile class has a map
  22. * from std::string to cmData*. On its destruction, it destroys all the
  23. * extra data through the virtual destructor of cmData.
  24. */
  25. class cmData
  26. {
  27. public:
  28. cmData(const char* name): m_Name(name) {}
  29. virtual ~cmData() {}
  30. const std::string& GetName() const
  31. { return m_Name; }
  32. protected:
  33. std::string m_Name;
  34. };
  35. #endif