1*0Sstevel@tonic-gate // Copyright (c) 1996 James Clark 2*0Sstevel@tonic-gate // See the file COPYING for copying permission. 3*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 4*0Sstevel@tonic-gate 5*0Sstevel@tonic-gate #ifndef ArcEngine_INCLUDED 6*0Sstevel@tonic-gate #define ArcEngine_INCLUDED 1 7*0Sstevel@tonic-gate 8*0Sstevel@tonic-gate #ifdef __GNUG__ 9*0Sstevel@tonic-gate #pragma interface 10*0Sstevel@tonic-gate #endif 11*0Sstevel@tonic-gate 12*0Sstevel@tonic-gate #include "Event.h" 13*0Sstevel@tonic-gate #include "Vector.h" 14*0Sstevel@tonic-gate #include "SgmlParser.h" 15*0Sstevel@tonic-gate #include <stddef.h> 16*0Sstevel@tonic-gate 17*0Sstevel@tonic-gate #ifdef SP_NAMESPACE 18*0Sstevel@tonic-gate namespace SP_NAMESPACE { 19*0Sstevel@tonic-gate #endif 20*0Sstevel@tonic-gate 21*0Sstevel@tonic-gate class SP_API ArcDirector { 22*0Sstevel@tonic-gate public: 23*0Sstevel@tonic-gate virtual EventHandler *arcEventHandler(const Notation *, 24*0Sstevel@tonic-gate const Vector<StringC> &, 25*0Sstevel@tonic-gate const SubstTable<Char> *) = 0; 26*0Sstevel@tonic-gate }; 27*0Sstevel@tonic-gate 28*0Sstevel@tonic-gate class SP_API SelectOneArcDirector : public ArcDirector, public Messenger { 29*0Sstevel@tonic-gate public: SelectOneArcDirector(const Vector<StringC> & select,EventHandler & eh)30*0Sstevel@tonic-gate SelectOneArcDirector(const Vector<StringC> &select, EventHandler &eh) 31*0Sstevel@tonic-gate : select_(select), eh_(&eh) { } 32*0Sstevel@tonic-gate EventHandler *arcEventHandler(const Notation *, 33*0Sstevel@tonic-gate const Vector<StringC> &, 34*0Sstevel@tonic-gate const SubstTable<Char> *); 35*0Sstevel@tonic-gate void dispatchMessage(const Message &); 36*0Sstevel@tonic-gate void dispatchMessage(Message &); 37*0Sstevel@tonic-gate private: 38*0Sstevel@tonic-gate Vector<StringC> select_; 39*0Sstevel@tonic-gate EventHandler *eh_; 40*0Sstevel@tonic-gate }; 41*0Sstevel@tonic-gate 42*0Sstevel@tonic-gate class SP_API ArcEngine { 43*0Sstevel@tonic-gate public: 44*0Sstevel@tonic-gate static void parseAll(SgmlParser &, 45*0Sstevel@tonic-gate Messenger &, 46*0Sstevel@tonic-gate ArcDirector &, 47*0Sstevel@tonic-gate const volatile sig_atomic_t *cancelPtr = 0); 48*0Sstevel@tonic-gate private: 49*0Sstevel@tonic-gate ArcEngine(); 50*0Sstevel@tonic-gate }; 51*0Sstevel@tonic-gate 52*0Sstevel@tonic-gate #ifdef SP_NAMESPACE 53*0Sstevel@tonic-gate } 54*0Sstevel@tonic-gate #endif 55*0Sstevel@tonic-gate 56*0Sstevel@tonic-gate #endif /* not ArcEngine_INCLUDED */ 57