2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: EntityDecl.h /main/1 1996/07/29 16:50:29 cde-hp $ */
24 // Copyright (c) 1995 James Clark
25 // See the file COPYING for copying permission.
27 #ifndef EntityDecl_INCLUDED
28 #define EntityDecl_INCLUDED 1
34 #include "NamedResource.h"
36 #include "StringResource.h"
41 namespace SP_NAMESPACE {
44 class SP_API EntityDecl : public NamedResource {
46 enum DeclType { generalEntity, parameterEntity, doctype, linktype,
48 enum DataType { sgmlText, pi, cdata, sdata, ndata, subdoc };
49 EntityDecl(const StringC &, DeclType declType, DataType dataType,
50 const Location &defLocation);
51 DataType dataType() const;
52 DeclType declType() const;
53 const Location &defLocation() const;
54 Boolean declInDtdIsBase() const;
55 Boolean declInActiveLpd() const;
56 const StringC *declInDtdNamePointer() const;
57 const StringC *declInLpdNamePointer() const;
58 void setDeclIn(const ConstPtr<StringResource<Char> > &dtdName,
60 const ConstPtr<StringResource<Char> > &lpdName,
62 void setDeclIn(const ConstPtr<StringResource<Char> > &dtdName,
64 void setDefLocation(const Location &);
65 virtual const StringC *systemIdPointer() const;
66 virtual const StringC *publicIdPointer() const;
67 virtual const StringC *effectiveSystemIdPointer() const;
71 PackedBoolean dtdIsBase_;
72 PackedBoolean lpdIsActive_;
73 Location defLocation_;
74 ConstPtr<StringResource<Char> > dtdName_;
75 ConstPtr<StringResource<Char> > lpdName_;
79 const Location &EntityDecl::defLocation() const
85 EntityDecl::DeclType EntityDecl::declType() const
91 EntityDecl::DataType EntityDecl::dataType() const
97 const StringC *EntityDecl::declInDtdNamePointer() const
99 return dtdName_.pointer();
103 const StringC *EntityDecl::declInLpdNamePointer() const
105 return lpdName_.pointer();
109 Boolean EntityDecl::declInDtdIsBase() const
115 Boolean EntityDecl::declInActiveLpd() const
121 void EntityDecl::setDefLocation(const Location &loc)
130 #endif /* not EntityDecl_INCLUDED */