home *** CD-ROM | disk | FTP | other *** search
- #ifndef __RWFACTORY_H__
- #define __RWFACTORY_H__
- pragma push_align_members(64);
-
- /*
- * RWFactory --- can create an instance of a registered class
- *
- * $Header: E:/vcs/rw/factory.h_v 1.4 18 Mar 1992 11:28:32 KEFFER $
- *
- ****************************************************************************
- *
- * Rogue Wave Software, Inc.
- * P.O. Box 2328
- * Corvallis, OR 97339
- * Voice: (503) 754-3010 FAX: (503) 757-6650
- *
- * Copyright (C) 1989, 1990, 1991. This software is subject to copyright
- * protection under the laws of the United States and other countries.
- *
- ***************************************************************************
- *
- * $Log: E:/vcs/rw/factory.h_v $
- *
- * Rev 1.4 18 Mar 1992 11:28:32 KEFFER
- * Initializes instance manager.
- *
- * Rev 1.3 18 Feb 1992 09:54:20 KEFFER
- *
- * Rev 1.2 12 Nov 1991 13:15:00 keffer
- * Factory can now live in the DLL.
- *
- * Rev 1.1 28 Oct 1991 09:08:14 keffer
- * Changed inclusions to <rw/xxx.h>
- *
- */
-
- #include "rw/rwset.h"
- #include "rw/procinit.h" /* Uses instance manager */
-
- class RWExport RWCollectable;
-
- class RWExport RWFactory : public RWSet {
- public:
- RWFactory();
- ~RWFactory();
-
- void addFunction(userCreator, ClassID);
- RWCollectable* create(ClassID) const; // Create an instance of type ClassID
- userCreator getFunction(ClassID) const;
- void removeFunction(ClassID);
- };
-
- RWFactory* rwexport getRWFactory();
-
- #ifdef RW_MULTI_THREAD
- /* MT situation; get the proper factory from the instance manager. */
- # define theFactory (getRWFactory())
- #else
- extern RWFactory* theFactory; // The one-of-a-kind global factory.
- #endif
-
- pragma pop_align_members();
- #endif /* __RWFACTORY_H__ */
-