Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/qt_gui/src/lib/gui/gui_saveable.cc @ 7549

Last change on this file since 7549 was 7549, checked in by bensch, 18 years ago

Saveable integration. Step 1

File size: 1.4 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Benjamin Grauer
13   co-programmer: ...
14*/
15
16//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
17
18#include "gui_saveable.h"
19
20namespace OrxGui
21{
22
23  /**
24   * standard constructor
25  */
26  Saveable::Saveable (const std::string& optionName)
27  : BaseObject(optionName)
28  {
29    this->bSaveable = false;
30
31  }
32
33
34  /**
35   * standard deconstructor
36  */
37  Saveable::~Saveable ()
38  {
39    // delete what has to be deleted here
40  }
41
42
43  void Saveable::makeSaveable()
44  {
45    this->bSaveable = true;
46
47  }
48
49
50  SaveableGroup::SaveableGroup(const std::string& groupName, OrxGui::Gui* gui)
51      : Saveable(groupName)
52  {
53
54  }
55
56
57
58
59  SaveableGroup::~SaveableGroup()
60  {
61    std::vector<SaveableGroup*>::iterator delGroup = std::find(saveableGroups.begin(), saveableGroups.end(), this);
62
63    if (delGroup != saveableGroups.end() )
64      saveableGroups.erase(delGroup);
65  }
66
67  void SaveableGroup::load(const MultiType& value)
68  {}
69
70  const MultiType& SaveableGroup::save()
71  {}
72
73
74
75  std::vector<SaveableGroup*>  SaveableGroup::saveableGroups;
76
77  void SaveableGroup::makingElementSaveable()
78  {
79    SaveableGroup::saveableGroups.push_back(this);
80  }
81
82
83
84}
Note: See TracBrowser for help on using the repository browser.