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 librararies 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: Event.h /main/1 1996/07/29 16:51:20 cde-hp $ */
24 // Copyright (c) 1994 James Clark
25 // See the file COPYING for copying permission.
27 #ifndef Event_INCLUDED
28 #define Event_INCLUDED 1
34 #include "Allocator.h"
46 #include "ElementType.h"
51 #include "ShortReferenceMap.h"
54 namespace SP_NAMESPACE {
59 class SP_API Event : public Link {
92 attlistDecl, // not #NOTATION and not in LPD
103 virtual void handle(EventHandler &) = 0;
104 virtual void copyData();
105 void *operator new(size_t sz, Allocator &alloc) { return alloc.alloc(sz); }
106 void *operator new(size_t sz) { return Allocator::allocSimple(sz); }
107 void operator delete(void *p) { Allocator::free(p); }
110 Event(const Event &); // undefined
111 void operator=(const Event &); // undefined
115 class LocatedEvent : public Event {
117 LocatedEvent(Type type, const Location &);
118 const Location &location() const;
120 LocatedEvent(const LocatedEvent &); // undefined
121 void operator=(const LocatedEvent &); // undefined
125 class MarkupEvent : public LocatedEvent {
127 MarkupEvent(Type type);
128 MarkupEvent(Type type, const Location &, Markup *);
129 const Markup &markup() const;
131 MarkupEvent(const MarkupEvent &); // undefined
132 void operator=(const MarkupEvent &); // undefined
136 class SP_API MessageEvent : public Event {
138 MessageEvent(Message &);
139 MessageEvent(const Message &);
140 const Message &message() const;
141 void handle(EventHandler &);
143 MessageEvent(const MessageEvent &); // undefined
144 void operator=(const MessageEvent &); // undefined
150 class StartElementEvent : public LocatedEvent {
152 StartElementEvent(const ElementType *,
153 const ConstPtr<Dtd> &,
157 ~StartElementEvent();
158 void handle(EventHandler &);
159 Boolean mustOmitEnd() const;
161 Boolean included() const;
162 const StringC &name() const;
163 const ElementType *elementType() const;
164 const Markup *markupPtr() const;
165 const AttributeList &attributes() const;
168 StartElementEvent(const StartElementEvent &); // undefined
169 void operator=(const StartElementEvent &); // undefined
170 const ElementType *elementType_;
172 PackedBoolean included_;
173 PackedBoolean copied_; // has copyData() been called
175 AttributeList *attributes_;
178 class EndElementEvent : public LocatedEvent {
180 EndElementEvent(const ElementType *,
181 const ConstPtr<Dtd> &,
185 void handle(EventHandler &);
187 Boolean included() const;
188 const StringC &name() const;
189 const ElementType *elementType() const;
190 const Markup *markupPtr() const;
193 EndElementEvent(const EndElementEvent &); // undefined
194 void operator=(const EndElementEvent &); // undefined
195 const ElementType *elementType_;
197 PackedBoolean included_;
198 PackedBoolean copied_; // has copyData() been called
202 class DataEvent : public LocatedEvent {
204 DataEvent(Type, const Char *, size_t, const Location &);
205 void handle(EventHandler &);
206 const Char *data() const;
207 size_t dataLength() const;
208 virtual Boolean isRe(unsigned long &serial) const;
209 virtual const Entity *entity() const;
214 DataEvent(const DataEvent &); // undefined
215 void operator=(const DataEvent &); // undefined
218 class ImmediateDataEvent : public DataEvent {
220 ImmediateDataEvent(Type type, const Char *, size_t, const Location &,
222 ~ImmediateDataEvent();
225 ImmediateDataEvent(const ImmediateDataEvent &); // undefined
226 void operator=(const ImmediateDataEvent &); // undefined
230 class InternalDataEntity;
232 class DataEntityEvent : public DataEvent {
234 DataEntityEvent(Type type, const InternalEntity *,
235 const ConstPtr<Origin> &);
236 const Entity *entity() const;
238 DataEntityEvent(const DataEntityEvent &); // undefined
239 void operator=(const DataEntityEvent &); // undefined
242 class InternalCdataEntity;
244 class CdataEntityEvent : public DataEntityEvent {
246 CdataEntityEvent(const InternalEntity *,
247 const ConstPtr<Origin> &);
249 CdataEntityEvent(const CdataEntityEvent &); // undefined
250 void operator=(const CdataEntityEvent &); // undefined
253 class InternalSdataEntity;
255 class SdataEntityEvent : public DataEntityEvent {
257 SdataEntityEvent(const InternalEntity *,
258 const ConstPtr<Origin> &);
259 void handle(EventHandler &);
261 SdataEntityEvent(const SdataEntityEvent &); // undefined
262 void operator=(const SdataEntityEvent &); // undefined
267 class PiEvent : public LocatedEvent {
269 PiEvent(const Char *, size_t, const Location &);
270 const Char *data() const;
271 size_t dataLength() const;
272 virtual const Entity *entity() const;
273 void handle(EventHandler &);
275 PiEvent(const PiEvent &); // undefined
276 void operator=(const PiEvent &); // undefined
281 class ImmediatePiEvent : public PiEvent {
283 ImmediatePiEvent(StringC &, const Location &);
285 ImmediatePiEvent(const ImmediatePiEvent &); // undefined
286 void operator=(const ImmediatePiEvent &); // undefined
290 class PiEntityEvent : public PiEvent {
292 PiEntityEvent(const PiEntity *entity,
293 const ConstPtr<Origin> &origin);
294 const Entity *entity() const;
296 PiEntityEvent(const PiEntityEvent &); // undefined
297 void operator=(const PiEntityEvent &); // undefined
300 class ExternalNonTextEntity;
301 class ExternalDataEntity;
304 class ExternalEntityEvent : public Event {
306 ExternalEntityEvent(Type type,
307 const ConstPtr<EntityOrigin> &);
308 const ConstPtr<EntityOrigin> &entityOrigin() const;
309 const Location &location() const;
311 ExternalEntityEvent(const ExternalEntityEvent &); // undefined
312 void operator=(const ExternalEntityEvent &); // undefined
313 ConstPtr<EntityOrigin> origin_;
316 class ExternalDataEntityEvent : public ExternalEntityEvent {
318 ExternalDataEntityEvent(const ExternalDataEntity *,
319 const ConstPtr<EntityOrigin> &);
320 void handle(EventHandler &);
321 const ExternalDataEntity *entity() const;
323 ExternalDataEntityEvent(const ExternalDataEntityEvent &); // undefined
324 void operator=(const ExternalDataEntityEvent &); // undefined
325 const ExternalDataEntity *dataEntity_;
328 class SubdocEntityEvent : public ExternalEntityEvent {
330 SubdocEntityEvent(const SubdocEntity *,
331 const ConstPtr<EntityOrigin> &);
332 void handle(EventHandler &);
333 const SubdocEntity *entity() const;
335 SubdocEntityEvent(const SubdocEntityEvent &); // undefined
336 void operator=(const SubdocEntityEvent &); // undefined
337 const SubdocEntity *subdocEntity_;
340 class AppinfoEvent : public LocatedEvent {
342 AppinfoEvent(const Location &);
343 AppinfoEvent(const Text &, const Location &);
344 void handle(EventHandler &);
345 Boolean literal(const StringC *&) const;
347 AppinfoEvent(const AppinfoEvent &); // undefined
348 void operator=(const AppinfoEvent &); // undefined
349 Boolean appinfoNone_;
353 class UselinkEvent : public MarkupEvent {
355 UselinkEvent(const ConstPtr<Lpd> &,
360 void handle(EventHandler &);
361 const ConstPtr<Lpd> &lpd() const;
362 const LinkSet *linkSet() const;
363 Boolean restore() const;
365 UselinkEvent(const UselinkEvent &); // undefined
366 void operator=(const UselinkEvent &); // undefined
368 const LinkSet *linkSet_;
372 class UsemapEvent : public MarkupEvent {
374 UsemapEvent(const ShortReferenceMap *,
375 Vector<const ElementType *> &,
376 const ConstPtr<Dtd> &,
379 void handle(EventHandler &);
380 const ShortReferenceMap *map() const;
381 const Vector<const ElementType *> &elements() const;
383 UsemapEvent(const UsemapEvent &); // undefined
384 void operator=(const UsemapEvent &); // undefined
386 Vector<const ElementType *> elements_;
387 const ShortReferenceMap *map_;
390 class StartSubsetEvent : public MarkupEvent {
392 StartSubsetEvent(Type,
394 const ConstPtr<Entity> &entity,
395 Boolean hasInternalSubset,
398 const StringC &name() const;
399 const ConstPtr<Entity> &entity() const;
400 Boolean hasInternalSubset() const;
402 StartSubsetEvent(const StartSubsetEvent &); // undefined
403 void operator=(const StartSubsetEvent &); // undefined
405 ConstPtr<Entity> entity_;
406 Boolean hasInternalSubset_;
409 class StartDtdEvent : public StartSubsetEvent {
411 StartDtdEvent(const StringC &,
412 const ConstPtr<Entity> &entity,
413 Boolean hasInternalSubset,
416 void handle(EventHandler &);
418 StartDtdEvent(const StartDtdEvent &); // undefined
419 void operator=(const StartDtdEvent &); // undefined
422 class StartLpdEvent : public StartSubsetEvent {
424 StartLpdEvent(Boolean active,
426 const ConstPtr<Entity> &entity,
427 Boolean hasInternalSubset,
430 void handle(EventHandler &);
431 Boolean active() const;
433 StartLpdEvent(const StartLpdEvent &); // undefined
434 void operator=(const StartLpdEvent &); // undefined
438 class EndDtdEvent : public MarkupEvent {
440 EndDtdEvent(const ConstPtr<Dtd> &, const Location &,
442 void handle(EventHandler &);
443 const Dtd &dtd() const;
444 const ConstPtr<Dtd> &dtdPointer() const;
446 EndDtdEvent(const EndDtdEvent &); // undefined
447 void operator=(const EndDtdEvent &); // undefined
451 class EndLpdEvent : public MarkupEvent {
453 EndLpdEvent(const ConstPtr<Lpd> &, const Location &,
455 void handle(EventHandler &);
456 const Lpd &lpd() const;
457 const ConstPtr<Lpd> &lpdPointer() const;
459 EndLpdEvent(const EndLpdEvent &); // undefined
460 void operator=(const EndLpdEvent &); // undefined
464 class EndPrologEvent : public LocatedEvent {
466 EndPrologEvent(const ConstPtr<Dtd> &dtd,
467 const ConstPtr<ComplexLpd> &lpd,
468 Vector<StringC> &simpleLinkNames,
469 Vector<AttributeList> &simpleLinkAttributes,
471 EndPrologEvent(const ConstPtr<Dtd> &dtd,
473 void handle(EventHandler &);
474 const Dtd &dtd() const;
475 const ConstPtr<Dtd> &dtdPointer() const;
476 const ConstPtr<ComplexLpd> &lpdPointer() const;
477 const Vector<StringC> &simpleLinkNames() const;
478 const Vector<AttributeList> &simpleLinkAttributes() const;
480 EndPrologEvent(const EndPrologEvent &); // undefined
481 void operator=(const EndPrologEvent &); // undefined
483 ConstPtr<ComplexLpd> lpd_;
484 Vector<StringC> simpleLinkNames_;
485 Vector<AttributeList> simpleLinkAttributes_;
488 class SgmlDeclEvent : public MarkupEvent {
490 // for an implied SGML declaration
491 SgmlDeclEvent(const ConstPtr<Sd> &,
492 const ConstPtr<Syntax> &syntax);
493 // for an explicit SGML declaration
494 SgmlDeclEvent(const ConstPtr<Sd> &,
495 const ConstPtr<Syntax> &syntax,
496 const ConstPtr<Syntax> &instanceSyntax,
497 const ConstPtr<Sd> &refSd,
498 const ConstPtr<Syntax> &refSyntax,
500 const StringC &implySystemId,
503 void handle(EventHandler &);
504 const Sd &sd() const;
505 const ConstPtr<Sd> &sdPointer() const;
506 const Syntax &prologSyntax() const;
507 const ConstPtr<Syntax> &prologSyntaxPointer() const;
508 const Syntax &instanceSyntax() const;
509 const ConstPtr<Syntax> &instanceSyntaxPointer() const;
510 const ConstPtr<Sd> &refSdPointer() const;
511 const ConstPtr<Syntax> &refSyntaxPointer() const;
512 const StringC &implySystemId() const;
514 SgmlDeclEvent(const SgmlDeclEvent &); // undefined
515 void operator=(const SgmlDeclEvent &); // undefined
517 ConstPtr<Syntax> prologSyntax_;
518 ConstPtr<Syntax> instanceSyntax_;
520 ConstPtr<Syntax> refSyntax_;
522 StringC implySystemId_;
525 class CommentDeclEvent : public MarkupEvent {
527 CommentDeclEvent(const Location &, Markup *);
528 void handle(EventHandler &);
530 CommentDeclEvent(const CommentDeclEvent &); // undefined
531 void operator=(const CommentDeclEvent &); // undefined
534 class SSepEvent : public ImmediateDataEvent {
536 SSepEvent(const Char *, size_t, const Location &, Boolean copy);
537 void handle(EventHandler &);
539 SSepEvent(const SSepEvent &); // undefined
540 void operator=(const SSepEvent &); // undefined
543 class IgnoredRsEvent : public LocatedEvent {
545 IgnoredRsEvent(Char c, const Location &);
546 void handle(EventHandler &);
549 IgnoredRsEvent(const IgnoredRsEvent &); // undefined
550 void operator=(const IgnoredRsEvent &); // undefined
554 class IgnoredReEvent : public LocatedEvent {
556 IgnoredReEvent(Char c, const Location &, unsigned long serial);
557 void handle(EventHandler &);
559 unsigned long serial() const;
561 IgnoredReEvent(const IgnoredReEvent &); // undefined
562 void operator=(const IgnoredReEvent &); // undefined
563 unsigned long serial_;
567 class ReEvent : public ImmediateDataEvent {
569 ReEvent(const Char *, const Location &, unsigned long serial);
570 Boolean isRe(unsigned long &serial) const;
572 ReEvent(const ReEvent &); // undefined
573 void operator=(const ReEvent &); // undefined
574 unsigned long serial_;
577 class ReOriginEvent : public LocatedEvent {
579 ReOriginEvent(Char c, const Location &, unsigned long serial);
580 void handle(EventHandler &);
582 unsigned long serial() const;
584 ReOriginEvent(const ReOriginEvent &); // undefined
585 void operator=(const ReOriginEvent &); // undefined
586 unsigned long serial_;
590 class IgnoredCharsEvent : public ImmediateDataEvent {
592 IgnoredCharsEvent(const Char *, size_t, const Location &, Boolean copy);
593 void handle(EventHandler &);
595 IgnoredCharsEvent(const IgnoredCharsEvent &); // undefined
596 void operator=(const IgnoredCharsEvent &); // undefined
599 class MarkedSectionEvent : public MarkupEvent {
601 enum Status { include, rcdata, cdata, ignore }; // in priority order
602 MarkedSectionEvent(Type, Status, const Location &, Markup *);
603 Status status() const;
605 MarkedSectionEvent(const MarkedSectionEvent &); // undefined
606 void operator=(const MarkedSectionEvent &); // undefined
610 class MarkedSectionStartEvent : public MarkedSectionEvent {
612 MarkedSectionStartEvent(Status, const Location &, Markup *);
613 void handle(EventHandler &);
615 MarkedSectionStartEvent(const MarkedSectionStartEvent &); // undefined
616 void operator=(const MarkedSectionStartEvent &); // undefined
619 class MarkedSectionEndEvent : public MarkedSectionEvent {
621 MarkedSectionEndEvent(Status, const Location &, Markup *);
622 void handle(EventHandler &);
624 MarkedSectionEndEvent(const MarkedSectionEndEvent &); // undefined
625 void operator=(const MarkedSectionEndEvent &); // undefined
628 class EntityStartEvent : public Event {
630 EntityStartEvent(const ConstPtr<EntityOrigin> &origin);
631 void handle(EventHandler &);
632 const Entity *entity() const;
633 const ConstPtr<EntityOrigin> &entityOrigin() const;
635 EntityStartEvent(const EntityStartEvent &); // undefined
636 void operator=(const EntityStartEvent &); // undefined
638 ConstPtr<EntityOrigin> origin_;
641 class EntityEndEvent : public LocatedEvent {
643 EntityEndEvent(const Location &);
644 void handle(EventHandler &);
646 EntityEndEvent(const EntityEndEvent &); // undefined
647 void operator=(const EntityEndEvent &); // undefined
650 class EntityDeclEvent : public MarkupEvent {
652 EntityDeclEvent(const ConstPtr<Entity> &,
656 void handle(EventHandler &);
657 const Entity &entity() const;
658 const ConstPtr<Entity> &entityPointer() const;
659 Boolean ignored() const;
660 // The name of the entity will be empty if this is the default entity.
663 // This will actually point to an external entity.
664 ConstPtr<Entity> entity_;
667 class NotationDeclEvent : public MarkupEvent {
669 NotationDeclEvent(const ConstPtr<Notation> &,
672 void handle(EventHandler &);
673 const Notation ¬ation() const;
674 const ConstPtr<Notation> ¬ationPointer() const;
676 NotationDeclEvent(const NotationDeclEvent &); // undefined
677 void operator=(const NotationDeclEvent &); // undefined
678 ConstPtr<Notation> notation_;
681 class ElementDeclEvent : public MarkupEvent {
683 ElementDeclEvent(Vector<const ElementType *> &elements,
684 const ConstPtr<Dtd> &,
687 void handle(EventHandler &);
688 const Vector<const ElementType *> &elements() const;
690 ElementDeclEvent(const ElementDeclEvent &); // undefined
691 void operator=(const ElementDeclEvent &); // undefined
692 Vector<const ElementType *> elements_;
696 class AttlistDeclEvent : public MarkupEvent {
698 AttlistDeclEvent(Vector<const ElementType *> &elements,
699 const ConstPtr<Dtd> &,
702 void handle(EventHandler &);
703 const Vector<const ElementType *> &elements() const;
705 AttlistDeclEvent(const AttlistDeclEvent &); // undefined
706 void operator=(const AttlistDeclEvent &); // undefined
707 Vector<const ElementType *> elements_;
711 class AttlistNotationDeclEvent : public MarkupEvent {
713 AttlistNotationDeclEvent(Vector<ConstPtr<Notation> > ¬ations,
716 void handle(EventHandler &);
717 const Vector<ConstPtr<Notation> > ¬ations() const;
719 AttlistNotationDeclEvent(const AttlistNotationDeclEvent &); // undefined
720 void operator=(const AttlistDeclEvent &); // undefined
721 Vector<ConstPtr<Notation> > notations_;
724 class LinkAttlistDeclEvent : public MarkupEvent {
726 LinkAttlistDeclEvent(Vector<const ElementType *> &elements,
727 const ConstPtr<Lpd> &,
730 void handle(EventHandler &);
731 const Vector<const ElementType *> &elements() const;
732 const Lpd &lpd() const;
734 LinkAttlistDeclEvent(const LinkAttlistDeclEvent &); // undefined
735 void operator=(const LinkAttlistDeclEvent &); // undefined
736 Vector<const ElementType *> elements_;
740 class LinkDeclEvent : public MarkupEvent {
742 LinkDeclEvent(const LinkSet *linkSet,
743 const ConstPtr<ComplexLpd> &,
746 void handle(EventHandler &);
747 const LinkSet *linkSet() const;
748 const ComplexLpd &lpd() const;
750 LinkDeclEvent(const LinkDeclEvent &); // undefined
751 void operator=(const LinkDeclEvent &); // undefined
752 const LinkSet *linkSet_;
753 ConstPtr<ComplexLpd> lpd_;
756 class IdLinkDeclEvent : public MarkupEvent {
758 IdLinkDeclEvent(const ConstPtr<ComplexLpd> &,
761 void handle(EventHandler &);
762 const ComplexLpd &lpd() const;
764 IdLinkDeclEvent(const IdLinkDeclEvent &); // undefined
765 void operator=(const IdLinkDeclEvent &); // undefined
766 ConstPtr<ComplexLpd> lpd_;
769 class ShortrefDeclEvent : public MarkupEvent {
771 ShortrefDeclEvent(const ShortReferenceMap *,
772 const ConstPtr<Dtd> &,
775 void handle(EventHandler &);
776 const ShortReferenceMap *map() const;
778 ShortrefDeclEvent(const ShortrefDeclEvent &); // undefined
779 void operator=(const ShortrefDeclEvent &); // undefined
780 const ShortReferenceMap *map_;
784 class IgnoredMarkupEvent : public MarkupEvent {
786 IgnoredMarkupEvent(const Location &, Markup *);
787 void handle(EventHandler &);
789 IgnoredMarkupEvent(const IgnoredMarkupEvent &); // undefined
790 void operator=(const IgnoredMarkupEvent &); // undefined
793 // This is for an undeclared entity whose first occurrence
794 // is in the instance, when there is a default entity:
795 // ie it extends the namespace of general entities after
796 // the end of the prolog.
798 class EntityDefaultedEvent : public LocatedEvent {
800 EntityDefaultedEvent(const ConstPtr<Entity> &,
802 void handle(EventHandler &);
803 const Entity &entity() const;
804 const ConstPtr<Entity> &entityPointer() const;
806 EntityDefaultedEvent(const EntityDefaultedEvent &); // undefined
807 void operator=(const EntityDefaultedEvent &); // undefined
808 ConstPtr<Entity> entity_;
811 class SgmlDeclEntityEvent : public LocatedEvent {
813 SgmlDeclEntityEvent(const PublicId &publicId,
814 PublicId::TextClass entityType,
815 const StringC &effectiveSystemId,
817 void handle(EventHandler &);
818 const PublicId &publicId() const;
819 PublicId::TextClass entityType() const;
820 const StringC &effectiveSystemId() const;
822 SgmlDeclEntityEvent(const SgmlDeclEntityEvent &); // undefined
823 void operator=(const SgmlDeclEntityEvent &); // undefined
825 PublicId::TextClass entityType_;
826 StringC effectiveSystemId_;
829 class SP_API EventHandler {
831 virtual ~EventHandler();
832 virtual void message(MessageEvent *) = 0;
833 virtual void data(DataEvent *);
834 virtual void startElement(StartElementEvent *);
835 virtual void endElement(EndElementEvent *);
836 virtual void pi(PiEvent *);
837 virtual void sdataEntity(SdataEntityEvent *);
838 virtual void externalDataEntity(ExternalDataEntityEvent *);
839 virtual void subdocEntity(SubdocEntityEvent *);
840 virtual void appinfo(AppinfoEvent *);
841 virtual void uselink(UselinkEvent *);
842 virtual void usemap(UsemapEvent *);
843 virtual void startDtd(StartDtdEvent *);
844 virtual void endDtd(EndDtdEvent *);
845 virtual void startLpd(StartLpdEvent *);
846 virtual void endLpd(EndLpdEvent *);
847 virtual void endProlog(EndPrologEvent *);
848 virtual void sgmlDecl(SgmlDeclEvent *);
849 virtual void commentDecl(CommentDeclEvent *);
850 virtual void sSep(SSepEvent *);
851 virtual void ignoredRs(IgnoredRsEvent *);
852 virtual void ignoredRe(IgnoredReEvent *);
853 virtual void reOrigin(ReOriginEvent *);
854 virtual void ignoredChars(IgnoredCharsEvent *);
855 virtual void markedSectionStart(MarkedSectionStartEvent *);
856 virtual void markedSectionEnd(MarkedSectionEndEvent *);
857 virtual void entityStart(EntityStartEvent *);
858 virtual void entityEnd(EntityEndEvent *);
859 virtual void notationDecl(NotationDeclEvent *);
860 virtual void entityDecl(EntityDeclEvent *);
861 virtual void elementDecl(ElementDeclEvent *);
862 virtual void attlistDecl(AttlistDeclEvent *);
863 virtual void linkAttlistDecl(LinkAttlistDeclEvent *);
864 virtual void attlistNotationDecl(AttlistNotationDeclEvent *);
865 virtual void linkDecl(LinkDeclEvent *);
866 virtual void idLinkDecl(IdLinkDeclEvent *);
867 virtual void shortrefDecl(ShortrefDeclEvent *);
868 virtual void ignoredMarkup(IgnoredMarkupEvent *);
869 virtual void entityDefaulted(EntityDefaultedEvent *);
870 virtual void sgmlDeclEntity(SgmlDeclEntityEvent *);
874 Event::Event(Type type)
880 Event::Type Event::type() const
886 const Location &LocatedEvent::location() const
892 const Markup &MarkupEvent::markup() const
898 const Message &MessageEvent::message() const
904 const ElementType *StartElementEvent::elementType() const
910 const StringC &StartElementEvent::name() const
912 return elementType_->name();
916 void StartElementEvent::setIncluded()
922 Boolean StartElementEvent::included() const
928 const Markup *StartElementEvent::markupPtr() const
934 const AttributeList &StartElementEvent::attributes() const
940 Boolean StartElementEvent::mustOmitEnd() const
942 return ((elementType()->definition()->declaredContent()
943 == ElementDefinition::empty)
944 || attributes_->conref());
948 const ElementType *EndElementEvent::elementType() const
954 const StringC &EndElementEvent::name() const
956 return elementType_->name();
960 void EndElementEvent::setIncluded()
966 Boolean EndElementEvent::included() const
972 const Markup *EndElementEvent::markupPtr() const
978 const Char *DataEvent::data() const
984 size_t DataEvent::dataLength() const
990 const Char *PiEvent::data() const
996 size_t PiEvent::dataLength() const
1002 const ConstPtr<EntityOrigin> &
1003 ExternalEntityEvent::entityOrigin() const
1009 const Location &ExternalEntityEvent::location() const
1011 return origin_->parent();
1015 const ExternalDataEntity *ExternalDataEntityEvent::entity() const
1021 const SubdocEntity *SubdocEntityEvent::entity() const
1023 return subdocEntity_;
1027 Boolean AppinfoEvent::literal(const StringC *&p) const
1034 p = &appinfo_.string();
1041 const ConstPtr<Lpd> &UselinkEvent::lpd() const
1047 const LinkSet *UselinkEvent::linkSet() const
1053 Boolean UselinkEvent::restore() const
1059 const ShortReferenceMap *UsemapEvent::map() const
1065 const StringC &StartSubsetEvent::name() const
1071 const ConstPtr<Entity> &StartSubsetEvent::entity() const
1077 Boolean StartSubsetEvent::hasInternalSubset() const
1079 return hasInternalSubset_;
1083 Boolean StartLpdEvent::active() const
1089 const Dtd &EndDtdEvent::dtd() const
1095 const ConstPtr<Dtd> &EndDtdEvent::dtdPointer() const
1101 const Lpd &EndLpdEvent::lpd() const
1107 const ConstPtr<Lpd> &EndLpdEvent::lpdPointer() const
1113 const Dtd &EndPrologEvent::dtd() const
1119 const ConstPtr<Dtd> &EndPrologEvent::dtdPointer() const
1125 const ConstPtr<ComplexLpd> &EndPrologEvent::lpdPointer() const
1131 const Vector<StringC> &EndPrologEvent::simpleLinkNames() const
1133 return simpleLinkNames_;
1137 const Vector<AttributeList> &EndPrologEvent::simpleLinkAttributes() const
1139 return simpleLinkAttributes_;
1143 const Sd &SgmlDeclEvent::sd() const
1149 const ConstPtr<Sd> &SgmlDeclEvent::sdPointer() const
1155 const ConstPtr<Sd> &SgmlDeclEvent::refSdPointer() const
1161 const Syntax &SgmlDeclEvent::prologSyntax() const
1163 return *prologSyntax_;
1167 const ConstPtr<Syntax> &SgmlDeclEvent::prologSyntaxPointer() const
1169 return prologSyntax_;
1173 const Syntax &SgmlDeclEvent::instanceSyntax() const
1175 return *instanceSyntax_;
1179 const ConstPtr<Syntax> &SgmlDeclEvent::instanceSyntaxPointer() const
1181 return instanceSyntax_;
1185 const ConstPtr<Syntax> &SgmlDeclEvent::refSyntaxPointer() const
1191 const StringC &SgmlDeclEvent::implySystemId() const
1193 return implySystemId_;
1197 Char IgnoredRsEvent::rs() const
1203 Char IgnoredReEvent::re() const
1209 unsigned long IgnoredReEvent::serial() const
1215 Char ReOriginEvent::re() const
1221 unsigned long ReOriginEvent::serial() const
1227 MarkedSectionEvent::Status MarkedSectionEvent::status() const
1233 const Entity *EntityStartEvent::entity() const
1235 return origin_->entity().pointer();
1239 const ConstPtr<EntityOrigin> &
1240 EntityStartEvent::entityOrigin() const
1246 const ConstPtr<Entity> &EntityDeclEvent::entityPointer() const
1252 const Entity &EntityDeclEvent::entity() const
1258 Boolean EntityDeclEvent::ignored() const
1264 const Notation &NotationDeclEvent::notation() const
1270 const ConstPtr<Notation> &NotationDeclEvent::notationPointer() const
1276 const Vector<const ElementType *> &ElementDeclEvent::elements() const
1282 const Vector<const ElementType *> &AttlistDeclEvent::elements() const
1288 const Vector<const ElementType *> &LinkAttlistDeclEvent::elements() const
1294 const Lpd &LinkAttlistDeclEvent::lpd() const
1300 const LinkSet *LinkDeclEvent::linkSet() const
1306 const ComplexLpd &LinkDeclEvent::lpd() const
1312 const ComplexLpd &IdLinkDeclEvent::lpd() const
1318 const Vector<ConstPtr<Notation> > &
1319 AttlistNotationDeclEvent::notations() const
1325 const ShortReferenceMap *ShortrefDeclEvent::map() const
1331 const Entity &EntityDefaultedEvent::entity() const
1337 const ConstPtr<Entity> &EntityDefaultedEvent::entityPointer()
1344 const PublicId &SgmlDeclEntityEvent::publicId() const
1350 PublicId::TextClass SgmlDeclEntityEvent::entityType() const
1356 const StringC &SgmlDeclEntityEvent::effectiveSystemId() const
1358 return effectiveSystemId_;
1365 #endif /* not Event_INCLUDED */