home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / kwclass.zip / KDATA.HPP < prev    next >
C/C++ Source or Header  |  1994-04-18  |  2KB  |  71 lines

  1. #ifndef _KDATA_
  2.   #define _KDATA_
  3. /*-----------------------------------------------------------------------
  4.                       Copyright (C) 1993, 1994
  5.                                by
  6.                            KASEWORKS, Inc.
  7.  
  8.  All rights reserved.  No part of this material may be reproduced, 
  9.  stored in a retrieval system, or transmitted, in any form or by 
  10.  any means, electronic, mechanical, photocopying, recording, or
  11.  otherwise, without the prior written permission of KASEWORKS, Inc.
  12. -----------------------------------------------------------------------*/
  13.  
  14. #ifndef _IVBASE_
  15.   #include <ivbase.hpp>
  16. #endif
  17.  
  18. #ifndef _ISTRING_
  19.   #include <istring.hpp>
  20. #endif
  21.  
  22. /*-----------------------------------------------------------------------
  23.   Name: KData
  24.  
  25.   Implementation File: N/A
  26.  
  27.   Purpose: This class serves as an abstract base class for data objects
  28.            generated by KASE:VIP.
  29.  
  30.   Base Class: IVBase
  31.  
  32.   Notes:
  33.  
  34. -----------------------------------------------------------------------*/
  35. class _Export KData : virtual public IVBase
  36. {
  37.    public:
  38.       virtual ~KData() {}
  39.    protected:
  40.       KData() {}
  41. };
  42.  
  43. /*-----------------------------------------------------------------------
  44.   Name: KDataFactory
  45.  
  46.   Implementation File: N/A
  47.  
  48.   Purpose: Exists as a "factory" class; its purpose is to create and 
  49.            identify data objects for the KDobManager class. 
  50.  
  51.   Base Class: IVBase
  52.  
  53.   Notes:   KDataFactory is an abstract class.  
  54.  
  55. -----------------------------------------------------------------------*/
  56. class _Export KDataFactory : public IVBase
  57. {
  58.    public:
  59.       virtual ~KDataFactory() {}
  60.       virtual KData *makeDataObject() const = 0;
  61.       virtual KData *cloneDataObject(KData *) const = 0;
  62.       IString const &name() const { return className; }
  63.  
  64.    protected: 
  65.       KDataFactory(IString const &name) : className(name) {}
  66.  
  67.    private:
  68.       const IString className;
  69. };
  70. #endif
  71.