2 // This file is part of the LWES .NET Binding (LWES.net)
4 // COPYRIGHT© 2009, Phillip Clark (phillip[at*flitbit[dot*org)
5 // original .NET implementation
7 // LWES.net is free software: you can redistribute it and/or modify
8 // it under the terms of the Lesser GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
12 // LWES.net is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // Lesser GNU General Public License for more details.
17 // You should have received a copy of the Lesser GNU General Public License
18 // along with LWES.net. If not, see <http://www.gnu.org/licenses/>.
20 namespace Org
.Lwes
.Emitter
29 /// Interface for classes that emit Events into the light-weight event system.
32 /// This interface makes the use of the IDisposable pattern explicit; implementations
33 /// must guarantee that cleanup occured before returning from Dispose.
35 public interface IEventEmitter
: IDisposable
38 /// The character encoding used when performing event IO.
46 /// Indicates whether the emitter has been initialized.
54 /// The event template database used by the emitter.
56 IEventTemplateDB TemplateDB
62 /// Indicates whether events issued from the emitter will validate
63 /// when they are written to.
71 /// Creates an event type identified by the event name.
73 /// <param name="eventName">the event type's name</param>
74 /// <returns>a new LWES event instance</returns>
75 Event
CreateEvent(string eventName
);
78 /// Creates an event type identified by the event name.
80 /// <param name="eventName">the event type's name</param>
81 /// <param name="enc">encoding used when performing IO on the event</param>
82 /// <returns>a new LWES event instance</returns>
83 Event
CreateEvent(string eventName
, SupportedEncoding enc
);
86 /// Creates an event type identified by the event name.
88 /// <param name="eventName">the event type's name</param>
89 /// <param name="validate">whether the event is validated</param>
90 /// <returns>a new LWES event instance</returns>
91 Event
CreateEvent(string eventName
, bool validate
);
94 /// Creates an event type identified by the event name.
96 /// <param name="eventName">the event type's name</param>
97 /// <param name="validate">whether the event is validated</param>
98 /// <param name="enc">encoding used when performing IO on the event</param>
99 /// <returns>a new LWES event instance</returns>
100 Event
CreateEvent(string eventName
, bool validate
, SupportedEncoding enc
);
103 /// Emits an event to the event system.
105 /// <param name="evt">the event being emitted</param>
106 void Emit(Event evt
);