Documentation
¶
Overview ¶
This eventhandler implementation is optional for the parser package, in order to avoid a mutual dependency with ogdl.
This eventhandler implementation is optional for the parser package, in order to avoid a mutual dependency with ogdl.
Index ¶
- type EventHandler
- func (e *EventHandler) Add(s string)
- func (e *EventHandler) AddAt(s string, lv int)
- func (e *EventHandler) Dec()
- func (e *EventHandler) Delete()
- func (e *EventHandler) Graph() *ogdl.Graph
- func (e *EventHandler) Inc()
- func (e *EventHandler) Item(i int) (string, int)
- func (e *EventHandler) Len() int
- func (e *EventHandler) Level() int
- func (e *EventHandler) SetLevel(l int)
- type EventHandler2
- func (e *EventHandler2) Add(s interface{})
- func (e *EventHandler2) AddAt(s interface{}, lv int)
- func (e *EventHandler2) Dec()
- func (e *EventHandler2) Delete()
- func (e *EventHandler2) Graph() *ogdl.Graph
- func (e *EventHandler2) Inc()
- func (e *EventHandler2) Item(i int) (interface{}, int)
- func (e *EventHandler2) Len() int
- func (e *EventHandler2) Level() int
- func (e *EventHandler2) SetLevel(l int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
EventHandler receives events and produces a tree.
func New ¶
func New() *EventHandler
func (*EventHandler) Add ¶
func (e *EventHandler) Add(s string)
Add creates a string node at the current level.
func (*EventHandler) AddAt ¶
func (e *EventHandler) AddAt(s string, lv int)
AddAt creates a string node at the specified level.
func (*EventHandler) Graph ¶
func (e *EventHandler) Graph() *ogdl.Graph
Tree returns the Graph object built from the events sent to this event handler.
func (*EventHandler) Len ¶
func (e *EventHandler) Len() int
func (*EventHandler) SetLevel ¶
func (e *EventHandler) SetLevel(l int)
SetLevel sets the current level
type EventHandler2 ¶
type EventHandler2 struct {
// contains filtered or unexported fields
}
EventHandler2 receives events and produces a tree. TODO benchmark agains the pure string version. Keep this one if difference is small
func New2 ¶
func New2() *EventHandler2
func (*EventHandler2) Add ¶
func (e *EventHandler2) Add(s interface{})
Add creates a string node at the current level.
func (*EventHandler2) AddAt ¶
func (e *EventHandler2) AddAt(s interface{}, lv int)
AddAt creates a string node at the specified level.
func (*EventHandler2) Graph ¶
func (e *EventHandler2) Graph() *ogdl.Graph
Tree returns the Graph object built from the events sent to this event handler.
func (*EventHandler2) Item ¶
func (e *EventHandler2) Item(i int) (interface{}, int)
func (*EventHandler2) Len ¶
func (e *EventHandler2) Len() int
func (*EventHandler2) SetLevel ¶
func (e *EventHandler2) SetLevel(l int)
SetLevel sets the current level