1 /* $XConsortium: EntityDecl.h /main/1 1996/07/29 16:50:29 cde-hp $ */
2 // Copyright (c) 1995 James Clark
3 // See the file COPYING for copying permission.
5 #ifndef EntityDecl_INCLUDED
6 #define EntityDecl_INCLUDED 1
12 #include "NamedResource.h"
14 #include "StringResource.h"
19 namespace SP_NAMESPACE {
22 class SP_API EntityDecl : public NamedResource {
24 enum DeclType { generalEntity, parameterEntity, doctype, linktype,
26 enum DataType { sgmlText, pi, cdata, sdata, ndata, subdoc };
27 EntityDecl(const StringC &, DeclType declType, DataType dataType,
28 const Location &defLocation);
29 DataType dataType() const;
30 DeclType declType() const;
31 const Location &defLocation() const;
32 Boolean declInDtdIsBase() const;
33 Boolean declInActiveLpd() const;
34 const StringC *declInDtdNamePointer() const;
35 const StringC *declInLpdNamePointer() const;
36 void setDeclIn(const ConstPtr<StringResource<Char> > &dtdName,
38 const ConstPtr<StringResource<Char> > &lpdName,
40 void setDeclIn(const ConstPtr<StringResource<Char> > &dtdName,
42 void setDefLocation(const Location &);
43 virtual const StringC *systemIdPointer() const;
44 virtual const StringC *publicIdPointer() const;
45 virtual const StringC *effectiveSystemIdPointer() const;
49 PackedBoolean dtdIsBase_;
50 PackedBoolean lpdIsActive_;
51 Location defLocation_;
52 ConstPtr<StringResource<Char> > dtdName_;
53 ConstPtr<StringResource<Char> > lpdName_;
57 const Location &EntityDecl::defLocation() const
63 EntityDecl::DeclType EntityDecl::declType() const
69 EntityDecl::DataType EntityDecl::dataType() const
75 const StringC *EntityDecl::declInDtdNamePointer() const
77 return dtdName_.pointer();
81 const StringC *EntityDecl::declInLpdNamePointer() const
83 return lpdName_.pointer();
87 Boolean EntityDecl::declInDtdIsBase() const
93 Boolean EntityDecl::declInActiveLpd() const
99 void EntityDecl::setDefLocation(const Location &loc)
108 #endif /* not EntityDecl_INCLUDED */