2012-03-01 02:02:56 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2012 Kitware, Inc., Insight Software Consortium
|
|
|
|
|
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
|
|
|
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
|
|
|
|
|
|
|
#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
|
|
|
}
|