/***********************************************************************
**
**   mapelementlist.cpp
**
**   This file is part of Cumulus
**
************************************************************************
**
**   Copyright (c):  2002 by Eggert Ehmke
**
**   This file is distributed under the terms of the General Public
**   Licence. See the file COPYING for more information.
**
**   $Id: mapelementlist.cpp,v 1.3 2003/03/25 21:54:39 eggert Exp $
**
***********************************************************************/

#include "mapelementlist.h"

MapElementList::MapElementList()
{
}

MapElementList::~MapElementList()
{
}

void MapElementList::append (const BaseMapElement* elem)
{
  if (find (elem) < 0)
    QList<BaseMapElement>::append (elem);
  else
    delete elem;
}

int MapElementList::compareItems (QCollection::Item i1, QCollection::Item i2)
{
  return ((BaseMapElement*)i1)->getName().compare(((BaseMapElement*)i2)->getName());
}
