/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Benjamin Grauer co-programmer: ... */ //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ #include "gui_saveable.h" namespace OrxGui { /** * standard constructor */ Saveable::Saveable (const std::string& optionName) : BaseObject(optionName) { this->bSaveable = false; } /** * standard deconstructor */ Saveable::~Saveable () { // delete what has to be deleted here } void Saveable::makeSaveable() { this->bSaveable = true; } SaveableGroup::SaveableGroup(const std::string& groupName) : Saveable(groupName) { } SaveableGroup::~SaveableGroup() { std::vector::iterator delGroup = std::find(saveableGroups.begin(), saveableGroups.end(), this); if (delGroup != saveableGroups.end() ) saveableGroups.erase(delGroup); } std::vector SaveableGroup::saveableGroups; void SaveableGroup::makingElementSaveable() { SaveableGroup::saveableGroups.push_back(this); } }