1 /***************************************************************************
2              storable.h  -  Class for quickspell-storable objects
3                              -------------------
4     begin                : Sat Oct 22 2005
5     copyright            : (C) 2005 by Gabor Torok
6     email                : cctorok@yahoo.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17 
18 #ifndef STORABLE_H
19 #define STORABLE_H
20 #pragma once
21 
22 
23 /**
24  * @author Gabor Torok
25  *
26  * Describes an object that can be referenced by the quick-spell buttons.
27  * A spell or special capability.
28  *
29  */
30 class Storable {
31 
32 public:
Storable()33 	Storable() {
34 	}
35 
~Storable()36 	virtual ~Storable() {
37 	}
38 
39 	enum {
40 		SPELL_STORABLE = 0,
41 		SPECIAL_STORABLE,
42 		ITEM_STORABLE
43 	};
44 
45 	virtual const char *getName() = 0;
46 	virtual int getIconTileX() = 0;
47 	virtual int getIconTileY() = 0;
48 
49 	/**
50 	 * Returns the xyz_STORABLE subtype from the enum in this class.
51 	 * I know this is lame, but rpg classes should be stateless and have
52 	 * no logic.
53 	 */
54 	virtual int getStorableType() = 0;
55 
56 	/**
57 	 * Returns null if storable or an error message.
58 	 */
59 	virtual const char *isStorable() = 0;
60 };
61 
62 #endif
63 
64