2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2012-03-01 02:02:56 +04:00
|
|
|
#include "cmExportSetMap.h"
|
2016-04-29 16:40:20 +03:00
|
|
|
|
2015-02-10 23:50:16 +03:00
|
|
|
#include "cmAlgorithms.h"
|
2016-04-29 17:53:13 +03:00
|
|
|
#include "cmExportSet.h"
|
2012-03-01 02:02:56 +04:00
|
|
|
|
2016-09-01 21:59:28 +03:00
|
|
|
#include <utility>
|
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
cmExportSet* cmExportSetMap::operator[](const std::string& name)
|
2012-03-01 02:02:56 +04:00
|
|
|
{
|
|
|
|
std::map<std::string, cmExportSet*>::iterator it = this->find(name);
|
|
|
|
if (it == this->end()) // Export set not found
|
2016-05-16 17:34:04 +03:00
|
|
|
{
|
2012-03-01 02:02:56 +04:00
|
|
|
it = this->insert(std::make_pair(name, new cmExportSet(name))).first;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2012-03-01 02:02:56 +04:00
|
|
|
return it->second;
|
|
|
|
}
|
|
|
|
|
2013-11-08 18:33:50 +04:00
|
|
|
void cmExportSetMap::clear()
|
2012-03-01 02:02:56 +04:00
|
|
|
{
|
2015-01-04 17:06:37 +03:00
|
|
|
cmDeleteAll(*this);
|
2013-11-08 18:33:50 +04:00
|
|
|
this->derived::clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
cmExportSetMap::~cmExportSetMap()
|
|
|
|
{
|
|
|
|
this->clear();
|
2012-03-01 02:02:56 +04:00
|
|
|
}
|