~ubuntu-branches/ubuntu/saucy/lordsawar/saucy

« back to all changes in this revision

Viewing changes to src/rewardlist.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese
  • Date: 2008-12-20 13:52:12 UTC
  • mfrom: (1.1.6 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20081220135212-noeb2w3y98ebo7o9
Tags: 0.1.4-1
[ Barry deFreese ]
* New upstream release.
* Move 0.0.8-2.1 changelog entry to correct point in changelog.
* Make lordsawar-data suggest lordsawar.
* Update my e-mail address.
* Add build-depends on intltool, uuid-dev, and libboost-dev.
* Don't install locales since there are no translations currently.
* Add simple man page for new lordsawar-pbm binary.
* Drop gcc4.3 patches as they have been fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "reward.h"
23
23
#include "xmlhelper.h"
24
24
 
 
25
std::string Rewardlist::d_tag = "rewardlist";
 
26
 
25
27
using namespace std;
26
28
 
27
29
//#define debug(x) {cerr<<__FILE__<<": "<<__LINE__<<": "<<x<<endl<<flush;}
78
80
 
79
81
Rewardlist::Rewardlist(XML_Helper* helper)
80
82
{
81
 
  helper->registerTag("reward", sigc::mem_fun((*this), &Rewardlist::load));
82
 
  load("rewardlist", helper);
 
83
  helper->registerTag(Reward::d_tag, sigc::mem_fun((*this), &Rewardlist::load));
 
84
  load(Rewardlist::d_tag, helper);
83
85
}
84
86
 
85
87
Rewardlist::~Rewardlist()
119
121
{
120
122
  bool retval = true;
121
123
 
122
 
  retval &= helper->openTag("rewardlist");
 
124
  retval &= helper->openTag(Rewardlist::d_tag);
123
125
 
124
126
  //save rewards
125
127
  for (const_iterator it = begin(); it != end(); it++)
143
145
 
144
146
bool Rewardlist::load(string tag, XML_Helper* helper)
145
147
{
146
 
  if (tag == "reward")
 
148
  if (tag == Reward::d_tag)
147
149
    {
148
150
      Reward *s = Reward::handle_load(helper);
149
151
      push_back(s);