#ifdef _WINDOWS
#include <iostream>
#include <fstream>
#else
#include <iostream.h>
#include <fstream.h>
#endif
#include <unistd.h>
#include "Bank.h"

class Account_impl : virtual public Account_skel {
 // friend class Bank_impl;
 /*
  CORBA::Long _current_balance;
  CORBA::Long _calls;
  */
  int _current_balance;
  int _calls;
  char* account_name;
public:
  Account_impl();
  Account_impl (CORBA::Object_ptr obj);
  CORBA::Boolean _save_object ();
  void deposit (CORBA::ULong amount);
  void withdraw (CORBA::ULong amount);
  void set (CORBA::ULong amount);
  CORBA::Long balance();
  char* name ();
  void name (const char*);
  void destroy();
};

class Bank_impl : virtual public Bank_skel {
    AccountSeq accounts;
    char* bank_name;
public:
  Bank_impl ();
  Account_ptr create ();
  void deposit_all_accounts (CORBA::ULong amount);
  void destroy ();
  char* name ();
  void name (const char* value);
};

class AccountLoader : public CORBA::BOAObjectRestorer {
public:
    CORBA::Boolean restore (CORBA::Object_ptr obj);
};

