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
|
|
|
|
|
|
|
cmExportSet* cmExportSetMap::operator[](const std::string &name)
|
|
|
|
{
|
|
|
|
std::map<std::string, cmExportSet*>::iterator it = this->find(name);
|
|
|
|
if (it == this->end()) // Export set not found
|
|
|
|
{
|
|
|
|
it = this->insert(std::make_pair(name, new cmExportSet(name))).first;
|
|
|
|
}
|
|
|
|
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
|
|
|
}
|