home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / classsrc.pak / EXBASE.CPP < prev    next >
C/C++ Source or Header  |  1997-07-23  |  776b  |  45 lines

  1. //----------------------------------------------------------------------------
  2. // (C) Copyright 1994 by Borland International, All rights 
  3. //
  4. //   TXBase class implementation.
  5. //
  6. //----------------------------------------------------------------------------
  7.  
  8. #if !defined(_Windows)
  9. # define _Windows      // pretend we are in windows to get the headers we need
  10. #endif
  11.  
  12. #include <osl/defs.h>
  13. #include <osl/except.h>
  14.  
  15. int TXBase::InstanceCount = 0;
  16.  
  17. TXBase::TXBase(const string& msg)
  18.  : xmsg(msg)
  19. {
  20.   InstanceCount++;
  21. }
  22.  
  23. TXBase::TXBase(const TXBase& src)
  24.  : xmsg(src)
  25. {
  26.   InstanceCount++;
  27. }
  28.  
  29. TXBase::~TXBase()
  30. {
  31.   InstanceCount--;
  32. }
  33.  
  34. TXBase*
  35. TXBase::Clone()
  36. {
  37.   return new TXBase(*this);
  38. }
  39.  
  40. void
  41. TXBase::Throw()
  42. {
  43.   THROW( *this );
  44. }
  45.