Source: moneyholder.h


Annotated List
Files
Globals
Hierarchy
Index
/***************************************************************************
                          moneyholder.h  -  description
                             -------------------
    begin                : Tue Feb 22 2000
    copyright            : (C) 2000 by Daniel Roberge
    email                : droberge@uvic.ca
 ***************************************************************************/

#ifndef MONEYHOLDER_H
#define MONEYHOLDER_H


/**The MoneyHolder class stores money for a character or party.
Not an inventory item.
  *@author Daniel Roberge
  */

class MoneyHolder {
public: 
	MoneyHolder();
	~MoneyHolder();
  /** Returns the number of gp-equivalents in the MoneyHolder */
  int noGP();
  /** Inserts gold gp's, silver sp's, and copper cp's. */
  void insertCoin(unsigned gold, unsigned silver, unsigned copper);
  /** Returns the number of cp-equivalents in the MoneyHolder. */
  int rawAmount();
  /** Returns true if no coins are stored */
  bool isEmpty();
  /** Removes amount gp from the MoneyHolder */
  void removeCoin(unsigned amount);
  /** Transfers amount gp into into. */
  void transferMoney(MoneyHolder *into, int amount);
  /** Inserts numberOf coins into the MoneyHolder */
  void insertCoin(unsigned numberOf);
  /** Removes gold gp, silver sp, and copper cp from the MoneyHolder. */
  void removeCoin(unsigned gold,unsigned silver, unsigned copper);
protected: // Protected attributes
#ifdef OLD_COIN
  /** Number of silver pieces in the MoneyHolder
The engine will call these meseta. */
  unsigned sp;
/** Number of gp in the MoneyHolder.
To be called gil by the engine. */
  unsigned gp;
  /** The number of copper pieces in the MoneyHolder
The engine will call these something. */
  unsigned cp;
#endif
	unsigned long coins;
};

#endif                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                protected: // Protected attributes



Generated by: droberge@magebook.localdomain on Mon Jul 3 13:20:08 200.