Logo Search packages:      
Sourcecode: inkscape version File versions

Inkscape::XML::Event Class Reference

#include <event.h>

Inheritance diagram for Inkscape::XML::Event:

Inkscape::GC::Managed< Inkscape::GC::SCANNED, Inkscape::GC::MANUAL > Inkscape::GC::Managed< Inkscape::GC::SCANNED, Inkscape::GC::MANUAL > Inkscape::XML::EventAdd Inkscape::XML::EventAdd Inkscape::XML::EventChgAttr Inkscape::XML::EventChgAttr Inkscape::XML::EventChgContent Inkscape::XML::EventChgContent Inkscape::XML::EventChgOrder Inkscape::XML::EventChgOrder Inkscape::XML::EventDel Inkscape::XML::EventDel

List of all members.


Detailed Description

Generic XML modification event.

This is the base class for all other modification events. It is actually a singly-linked list of events, called an event chain or an event log. Logs of events that happened in a transaction can be obtained from Document::commitUndoable(). Events can be replayed to a NodeObserver, or undone (which is equivalent to replaying opposite events in reverse order).

Event logs are built by appending to the front, so by walking the list one iterates over the events in reverse chronological order.

Definition at line 58 of file event.h.


Public Types

typedef
Inkscape::Util::ForwardPointerIterator
< Event const,
IteratorStrategy > 
ConstIterator
typedef
Inkscape::Util::ForwardPointerIterator
< Event const,
IteratorStrategy > 
ConstIterator
typedef
Inkscape::Util::ForwardPointerIterator
< Event, IteratorStrategy > 
Iterator
typedef
Inkscape::Util::ForwardPointerIterator
< Event, IteratorStrategy > 
Iterator

Public Member Functions

void operator delete (void *p)
void operator delete (void *p)
void * operator new (std::size_t size, ScanPolicy scan=default_scan, CollectionPolicy collect=default_collect) throw (std::bad_alloc)
void * operator new (std::size_t size, ScanPolicy scan=default_scan, CollectionPolicy collect=default_collect) throw (std::bad_alloc)
void * operator new[] (std::size_t size, ScanPolicy scan=default_scan, CollectionPolicy collect=default_collect) throw (std::bad_alloc)
void * operator new[] (std::size_t size, ScanPolicy scan=default_scan, CollectionPolicy collect=default_collect) throw (std::bad_alloc)
EventoptimizeOne ()
 If possible, combine this event with the next to reduce memory use.
EventoptimizeOne ()
 If possible, combine this event with the next to reduce memory use.
void replayOne (NodeObserver &observer) const
 Replay this event to an observer.
void replayOne (NodeObserver &observer) const
 Replay this event to an observer.
void undoOne (NodeObserver &observer) const
 Undo this event to an observer.
void undoOne (NodeObserver &observer) const
 Undo this event to an observer.

Public Attributes

Eventnext
 Pointer to the next event in the event chain.
Noderepr
 Pointer to the node that was the object of the event.
int serial
 Serial number of the event, not used at the moment.

Protected Member Functions

virtual Event_optimizeOne ()=0
virtual Event_optimizeOne ()=0
virtual void _replayOne (NodeObserver &) const =0
virtual void _replayOne (NodeObserver &) const =0
virtual void _undoOne (NodeObserver &) const =0
virtual void _undoOne (NodeObserver &) const =0
 Event (Node *r, Event *n)
 Event (Node *r, Event *n)

Static Private Attributes

static int _next_serial = 0

Classes

struct  IteratorStrategy

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index