Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / examples / Simple / bank / Account_i.h
blob9e20a47f7b2885b892a2b7cbb069596cca17f481
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Account_i.h
7 * This class implements the Bank IDL interface.
9 * @author Vishal Kachroo <vishal@cs.wustl.edu>
11 //=============================================================================
14 #ifndef ACCOUNT_I_H
15 #define ACCOUNT_I_H
17 #include "BankS.h"
19 /**
20 * @class Account_i
22 * @brief Bank object implementation.
24 * Implementation of a simple object that has two methods, one
25 * that return the current balance on the server and the other
26 * that shuts down the server.
28 class Account_i : public POA_Bank::Account
30 public:
31 /// Constructor.
32 Account_i ();
34 /// Constructor.
35 Account_i (const char *, CORBA::Float);
37 /// Destructor.
38 virtual ~Account_i ();
40 /// Get the current balance in the account.
41 virtual CORBA::Float balance ();
43 /// Get the name of the <Account> holder.
44 virtual char *name ();
46 /// Set the name of the <Account> holder.
47 virtual void name (const char *name);
49 /// Deposit money in the account.
50 virtual void deposit (CORBA::Float);
52 /// Withdraw money in the account.
53 virtual void withdraw (CORBA::Float);
55 /// Set the ORB pointer.
56 void orb (CORBA::ORB_ptr o);
58 private:
59 /// ORB pointer.
60 CORBA::ORB_var orb_;
62 /// balance for this account
63 CORBA::Float balance_;
65 /// Name of the <Account> holder.
66 CORBA::String_var name_;
69 #endif /* ACCOUNT_I_H */