Documentation ¶
Index ¶
- type Event
- type EventCallBack
- type EventHandler
- type EventProcessor
- func (processor *EventProcessor) EventHandler(ev IEvent)
- func (processor *EventProcessor) Init(eventChannel IEventChannel)
- func (processor *EventProcessor) RegEventReceiverFunc(eventType EventType, receiver IEventHandler, callback EventCallBack)
- func (processor *EventProcessor) UnRegEventReceiverFun(eventType EventType, receiver IEventHandler)
- type EventType
- type IEvent
- type IEventChannel
- type IEventHandler
- type IEventProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Type EventType Data interface{} // contains filtered or unexported fields }
func (*Event) GetEventType ¶
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func (*EventHandler) Destroy ¶
func (handler *EventHandler) Destroy()
func (*EventHandler) GetEventProcessor ¶
func (handler *EventHandler) GetEventProcessor() IEventProcessor
func (*EventHandler) Init ¶
func (handler *EventHandler) Init(processor IEventProcessor)
func (*EventHandler) NotifyEvent ¶
func (handler *EventHandler) NotifyEvent(ev IEvent)
type EventProcessor ¶
type EventProcessor struct { IEventChannel // contains filtered or unexported fields }
func (*EventProcessor) EventHandler ¶
func (processor *EventProcessor) EventHandler(ev IEvent)
func (*EventProcessor) Init ¶
func (processor *EventProcessor) Init(eventChannel IEventChannel)
func (*EventProcessor) RegEventReceiverFunc ¶
func (processor *EventProcessor) RegEventReceiverFunc(eventType EventType, receiver IEventHandler, callback EventCallBack)
func (*EventProcessor) UnRegEventReceiverFun ¶
func (processor *EventProcessor) UnRegEventReceiverFun(eventType EventType, receiver IEventHandler)
type IEventChannel ¶
type IEventHandler ¶
type IEventHandler interface { Init(processor IEventProcessor) GetEventProcessor() IEventProcessor //获得事件 NotifyEvent(IEvent) Destroy() // contains filtered or unexported methods }
func NewEventHandler ¶
func NewEventHandler() IEventHandler
type IEventProcessor ¶
type IEventProcessor interface { IEventChannel Init(eventChannel IEventChannel) EventHandler(ev IEvent) RegEventReceiverFunc(eventType EventType, receiver IEventHandler, callback EventCallBack) UnRegEventReceiverFun(eventType EventType, receiver IEventHandler) // contains filtered or unexported methods }
func NewEventProcessor ¶
func NewEventProcessor() IEventProcessor
Click to show internal directories.
Click to hide internal directories.