Planeshift
psglyph.h
Go to the documentation of this file.
1 /*
2  * psglyph.h
3  *
4  * Copyright (C) 2001-2003 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 #ifndef __PSGLYPH_H__
21 #define __psglyph_h__
22 //=============================================================================
23 // Crystal Space Includes
24 //=============================================================================
25 #include <csutil/csstring.h>
26 #include <csutil/refcount.h>
27 #include <csutil/refarr.h>
28 #include <csutil/array.h>
29 
30 //=============================================================================
31 // Project Includes
32 //=============================================================================
33 #include "util/psconst.h"
34 
35 #include <idal.h>
36 
37 //=============================================================================
38 // Local Includes
39 //=============================================================================
40 #include "psitem.h"
41 #include "psstdint.h"
42 
43 class psCharacter;
44 
45 
50 class psGlyph : public psItem
51 {
52 public:
53  psGlyph();
54  virtual ~psGlyph() { };
55 
58  virtual const char* GetItemType()
59  {
60  return "Glyph";
61  }
62 
63  virtual bool Load(iResultRow &row);
64 
65  virtual psItem* CreateNew();
66  virtual void Copy(psGlyph* target);
67 
68  virtual void SetOwningCharacter(psCharacter* owner);
69 
70  csString GlyphToXML();
71  virtual int GetPurifyStatus() const;
72  void PurifyingStarted();
73  void PurifyingFinished();
74  void UnPurify();
75  bool Purified();
76 
77  virtual psItem* Clone();
78 
80  void* operator new(size_t);
81 
83  void operator delete(void*);
84 
85 private:
87  static PoolAllocator<psGlyph> glyphpool;
88 
89 };
90 
91 #endif
virtual ~psGlyph()
Definition: psglyph.h:54
Defines a glyph, one element to create a spell.
Definition: psglyph.h:50
void PurifyingStarted()
virtual int GetPurifyStatus() const
virtual psItem * Clone()
bool Purified()
void PurifyingFinished()
virtual const char * GetItemType()
Return a string identifying this object as a Glyph.
Definition: psglyph.h:58
void UnPurify()
csString GlyphToXML()
virtual void Copy(psGlyph *target)
virtual bool Load(iResultRow &row)
Loads data from a database row into the current psItem.
virtual void SetOwningCharacter(psCharacter *owner)
Alters the owning character of this item. Also see UpdateInventoryStatus.
virtual psItem * CreateNew()
Creates a new blank instance of it&#39;s class (i.e.
This class embodies item instances in the game.
Definition: psitem.h:238