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: SgmlParser.C /main/1 1996/07/29 17:04:11 cde-hp $ */
24 // Copyright (c) 1994 James Clark
25 // See the file COPYING for copying permission.
28 #pragma implementation
32 #include "SgmlParser.h"
36 namespace SP_NAMESPACE {
39 SgmlParser::SgmlParser()
44 SgmlParser::SgmlParser(const Params ¶ms)
45 : parser_(new Parser(params))
49 void SgmlParser::init(const Params ¶ms)
52 parser_ = new Parser(params);
55 SgmlParser::~SgmlParser()
60 Event *SgmlParser::nextEvent()
62 return parser_->nextEvent();
65 void SgmlParser::parseAll(EventHandler &handler,
66 SP_CONST SP_VOLATILE sig_atomic_t *cancelPtr)
68 parser_->parseAll(handler, cancelPtr);
71 ConstPtr<Sd> SgmlParser::sd() const
73 return parser_->sdPointer();
76 ConstPtr<Syntax> SgmlParser::instanceSyntax() const
78 return parser_->instanceSyntaxPointer();
81 ConstPtr<Syntax> SgmlParser::prologSyntax() const
83 return parser_->prologSyntaxPointer();
86 const EntityManager &SgmlParser::entityManager() const
88 return parser_->entityManager();
91 const EntityCatalog &SgmlParser::entityCatalog() const
93 return parser_->entityCatalog();
96 void SgmlParser::activateLinkType(const StringC &name)
98 parser_->activateLinkType(name);
101 void SgmlParser::allLinkTypesActivated()
103 parser_->allLinkTypesActivated();
106 void SgmlParser::swap(SgmlParser &s)
108 Parser *tem = parser_;
113 Ptr<Dtd> SgmlParser::baseDtd()
115 return parser_->baseDtd();
118 const ParserOptions &SgmlParser::options() const
120 return parser_->options();
123 SgmlParser::Params::Params()
124 : entityType(document),
128 subdocInheritActiveLinkTypes(0),