IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Samples.Money.Money Class Reference

A simple Money. More...

+ Inheritance diagram for NUnit.Samples.Money.Money:
+ Collaboration diagram for NUnit.Samples.Money.Money:

Public Member Functions

 Money (int amount, String currency)
 Constructs a money from the given amount and currency. More...
 
IMoney Add (IMoney m)
 Adds a money to this money. Forwards the request to the AddMoney helper. More...
 
IMoney AddMoney (Money m)
 Adds a simple Money to this money. This is a helper method for implementing double dispatch. More...
 
IMoney AddMoneyBag (MoneyBag s)
 Adds a MoneyBag to this money. This is a helper method for implementing double dispatch. More...
 
override bool Equals (Object anObject)
 
override int GetHashCode ()
 
IMoney Multiply (int factor)
 Multiplies a money by the given factor. More...
 
IMoney Negate ()
 Negates this money. More...
 
IMoney Subtract (IMoney m)
 Subtracts a money from this money. More...
 
override String ToString ()
 

Properties

int Amount [get]
 
String Currency [get]
 
bool IsZero [get]
 
- Properties inherited from NUnit.Samples.Money.IMoney
bool IsZero [get]
 True if this money is zero. More...
 

Private Attributes

int fAmount
 
String fCurrency
 

Detailed Description

A simple Money.

Constructor & Destructor Documentation

NUnit.Samples.Money.Money.Money ( int  amount,
String  currency 
)
inline

Constructs a money from the given amount and currency.

Member Function Documentation

IMoney NUnit.Samples.Money.Money.Add ( IMoney  m)
inline
IMoney NUnit.Samples.Money.Money.AddMoney ( Money  m)
inline

Adds a simple Money to this money. This is a helper method for implementing double dispatch.

Implements NUnit.Samples.Money.IMoney.

References NUnit.Samples.Money.Money.Amount, and NUnit.Samples.Money.Money.Currency.

IMoney NUnit.Samples.Money.Money.AddMoneyBag ( MoneyBag  s)
inline

Adds a MoneyBag to this money. This is a helper method for implementing double dispatch.

Implements NUnit.Samples.Money.IMoney.

References NUnit.Samples.Money.MoneyBag.AddMoney().

override int NUnit.Samples.Money.Money.GetHashCode ( )
inline
IMoney NUnit.Samples.Money.Money.Multiply ( int  factor)
inline

Multiplies a money by the given factor.

Implements NUnit.Samples.Money.IMoney.

Referenced by NUnit.Samples.Money.MoneyBag.Multiply(), and NUnit.Samples.Money.MoneyTest.SimpleMultiply().

IMoney NUnit.Samples.Money.Money.Negate ( )
inline
IMoney NUnit.Samples.Money.Money.Subtract ( IMoney  m)
inline
override String NUnit.Samples.Money.Money.ToString ( )
inline

Member Data Documentation

int NUnit.Samples.Money.Money.fAmount
private
String NUnit.Samples.Money.Money.fCurrency
private

Property Documentation

bool NUnit.Samples.Money.Money.IsZero
get

The documentation for this class was generated from the following file: