server/category.h

Go to the documentation of this file.
00001 /* $Id:category.h $ */
00002 /*
00003    Copyright (C) 2007 by Jurjen Stellingwerff <jurjen@stwerff.xs4all.nl>
00004    Part of the Moros Project http://moros.sourceforge.net/
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License version 3.
00008    This program is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY.
00010 
00011    See the COPYING file for more details.
00012 */
00013 
00014 #ifndef __CATEGORY_H
00015 #define __CATEGORY_H
00016 
00017 #include <string>
00018 #include <map>
00019 #include <list>
00020 using namespace std;
00021 
00022 #include "background_level.h"
00023 
00024 #define loopCategoryLevel(r,v) loopSingle((r)->listLevel(),v,class background_level,list)
00025 
00026 class category {
00027     int nr;
00028     string name;
00029     int age;
00030     map<string,class background_level> level;
00031     int experience;
00032     int armor;
00033 public:
00034     category();
00035 
00036     // Field : nr
00037     const int getNr() const;
00038     void setNr(const int v);
00039     int operator<(const class category &ck) const;
00040 
00041     // Field : name
00042     const string getName() const;
00043     void setName(const string v);
00044 
00045     // Field : age
00046     const int getAge() const;
00047     void setAge(const int v);
00048 
00049     // Field : level
00050     class background_level& getLevel(const string v);
00051     list<class background_level>& listLevel();
00052     void setLevel(class background_level &v);
00053     void delLevel(const string v);
00054     const bool isLevel(const string v) const;
00055 
00056     // Field : experience
00057     const int getExperience() const;
00058     void setExperience(const int v);
00059 
00060     // Field : armor
00061     const int getArmor() const;
00062     void setArmor(const int v);
00063 
00064     void save(class channel &ch);
00065     void load(class channel &ch);
00066     void xml(ofstream &f, int l=0, int r=0);
00067 };
00068 
00069 #endif // __CATEGORY_H


Generated on Tue Jan 1 17:30:00 2008 for server/category.h Source File by  doxygen   Visit the project page on SourceForge.net Logo