1 // Copyright (c) 1995 James Clark 2 // See the file COPYING for copying permission. 3 #pragma ident "%Z%%M% %I% %E% SMI" 4 5 #ifndef EntityManager_INCLUDED 6 #define EntityManager_INCLUDED 1 7 8 #ifdef __GNUG__ 9 #pragma interface 10 #endif 11 12 #include "types.h" 13 #include "StringC.h" 14 #include "Resource.h" 15 #include "EntityCatalog.h" 16 #include "Ptr.h" 17 #include "Boolean.h" 18 19 #ifdef SP_NAMESPACE 20 namespace SP_NAMESPACE { 21 #endif 22 23 class Messenger; 24 class InputSourceOrigin; 25 class CharsetInfo; 26 class InputSource; 27 28 class SP_API EntityManager : public Resource { 29 public: 30 enum { mayRewind = 01, maySetDocCharset = 02 }; 31 virtual ~EntityManager(); 32 virtual Boolean internalCharsetIsDocCharset() const = 0; 33 virtual const CharsetInfo &charset() const = 0; 34 virtual InputSource *open(const StringC &sysid, 35 const CharsetInfo &docCharset, 36 InputSourceOrigin *, 37 unsigned flags, 38 Messenger &) = 0; 39 // Make a catalog for a document or subdocument with specified 40 // system identifier. 41 // The catalog can cause the system identifier to be replaced. 42 virtual ConstPtr<EntityCatalog> 43 makeCatalog(StringC &systemId, const CharsetInfo &, Messenger &) = 0; 44 }; 45 46 #ifdef SP_NAMESPACE 47 } 48 #endif 49 50 #endif /* not EntityManager_INCLUDED */ 51