cmExportSetMap.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmExportSetMap_h
  11. #define cmExportSetMap_h
  12. #include <cmConfigure.h> // IWYU pragma: keep
  13. #include <map>
  14. #include <string>
  15. class cmExportSet;
  16. /// A name -> cmExportSet map with overloaded operator[].
  17. class cmExportSetMap : public std::map<std::string, cmExportSet*>
  18. {
  19. typedef std::map<std::string, cmExportSet*> derived;
  20. public:
  21. /** \brief Overloaded operator[].
  22. *
  23. * The operator is overloaded because cmExportSet has no default constructor:
  24. * we do not want unnamed export sets.
  25. */
  26. cmExportSet* operator[](const std::string& name);
  27. void clear();
  28. /// Overloaded destructor deletes all member export sets.
  29. ~cmExportSetMap();
  30. };
  31. #endif