CreatorMap.hh 983 Bytes
Newer Older
1 2 3 4 5 6 7
/******************************************************************************
 *
 * AMDiS - Adaptive multidimensional simulations
 *
 * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved.
 * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis
 *
8
 * Authors:
9 10 11 12 13 14 15 16 17
 * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al.
 *
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 *
 * This file is part of AMDiS
 *
 * See also license.opensource.txt in the distribution.
18
 *
19
 ******************************************************************************/
20 21


22 23 24 25 26
#include <map>

namespace AMDiS {

  template<typename BaseClass>
27
  void CreatorMap<BaseClass>::clear()
28 29 30
  {
    typename std::map< std::string, CreatorInterface<BaseClass>* >::iterator it;

Thomas Witkowski's avatar
Thomas Witkowski committed
31
    for (it = creatorMap.begin(); it != creatorMap.end(); ++it)
Thomas Witkowski's avatar
Thomas Witkowski committed
32
      delete it->second;
33 34
  }
}