summaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2007-01-20 05:49:10 +0000
committermental <mental@users.sourceforge.net>2007-01-20 05:49:10 +0000
commit25634c65d6e34ae67e6249543d81abef9f151d80 (patch)
tree0d2943021ed291d1464b466e00012ba2ac4cf99e /src/xml
parentUpdate. (diff)
downloadinkscape-25634c65d6e34ae67e6249543d81abef9f151d80.tar.gz
inkscape-25634c65d6e34ae67e6249543d81abef9f151d80.zip
merge XML::Session into XML::Document
(bzr r2248)
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/Makefile_insert4
-rw-r--r--src/xml/document.h25
-rw-r--r--src/xml/event.cpp28
-rw-r--r--src/xml/node.h5
-rw-r--r--src/xml/session.h56
-rw-r--r--src/xml/simple-document.cpp90
-rw-r--r--src/xml/simple-document.h50
-rw-r--r--src/xml/simple-node.cpp37
-rw-r--r--src/xml/simple-node.h9
-rw-r--r--src/xml/simple-session.cpp122
-rw-r--r--src/xml/simple-session.h84
-rw-r--r--src/xml/transaction-logger.h52
12 files changed, 168 insertions, 394 deletions
diff --git a/src/xml/Makefile_insert b/src/xml/Makefile_insert
index 41aa13dcb..69f8952a9 100644
--- a/src/xml/Makefile_insert
+++ b/src/xml/Makefile_insert
@@ -32,13 +32,10 @@ xml_libspxml_a_SOURCES = \
xml/repr-util.cpp \
xml/repr.cpp \
xml/repr.h \
- xml/session.h \
xml/simple-document.h \
xml/simple-document.cpp \
xml/simple-node.h \
xml/simple-node.cpp \
- xml/simple-session.cpp \
- xml/simple-session.h \
xml/node.h \
xml/croco-node-iface.cpp \
xml/croco-node-iface.h \
@@ -50,7 +47,6 @@ xml_libspxml_a_SOURCES = \
xml/node-iterators.h \
xml/sp-css-attr.h \
xml/text-node.h \
- xml/transaction-logger.h \
xml/invalid-operation-exception.h
xml/test-xml-main.cpp: xml/test-xml.cpp $(xml_test_xml_includes)
diff --git a/src/xml/document.h b/src/xml/document.h
index 8dc286a38..eeb16e74f 100644
--- a/src/xml/document.h
+++ b/src/xml/document.h
@@ -16,22 +16,27 @@
#define SEEN_INKSCAPE_XML_SP_REPR_DOC_H
#include "xml/node.h"
-#include "xml/session.h"
namespace Inkscape {
namespace XML {
+class Event;
+class NodeObserver;
+
struct Document : virtual public Node {
public:
- Node *createElementNode(char const *name) {
- return session()->createElementNode(name);
- }
- Node *createTextNode(char const *content) {
- return session()->createTextNode(content);
- }
- Node *createCommentNode(char const *content) {
- return session()->createCommentNode(content);
- }
+ virtual NodeObserver *logger()=0;
+
+ virtual bool inTransaction()=0;
+
+ virtual void beginTransaction()=0;
+ virtual void rollback()=0;
+ virtual void commit()=0;
+ virtual Inkscape::XML::Event *commitUndoable()=0;
+
+ virtual Node *createElementNode(char const *name)=0;
+ virtual Node *createTextNode(char const *content)=0;
+ virtual Node *createCommentNode(char const *content)=0;
};
}
diff --git a/src/xml/event.cpp b/src/xml/event.cpp
index d91dd681f..cc130042e 100644
--- a/src/xml/event.cpp
+++ b/src/xml/event.cpp
@@ -26,8 +26,6 @@ using Inkscape::Util::reverse_list;
int Inkscape::XML::Event::_next_serial=0;
-using Inkscape::XML::Session;
-
void
sp_repr_begin_transaction (Inkscape::XML::Document *doc)
{
@@ -38,9 +36,7 @@ sp_repr_begin_transaction (Inkscape::XML::Document *doc)
EventTracker<SimpleEvent<Event::XML> > tracker("begin-transaction");
g_assert(doc != NULL);
- Session *session=doc->session();
- g_assert(session != NULL);
- session->beginTransaction();
+ doc->beginTransaction();
}
void
@@ -53,9 +49,7 @@ sp_repr_rollback (Inkscape::XML::Document *doc)
EventTracker<SimpleEvent<Event::XML> > tracker("rollback");
g_assert(doc != NULL);
- Session *session=doc->session();
- g_assert(session != NULL);
- session->rollback();
+ doc->rollback();
}
void
@@ -68,9 +62,7 @@ sp_repr_commit (Inkscape::XML::Document *doc)
EventTracker<SimpleEvent<Event::XML> > tracker("commit");
g_assert(doc != NULL);
- Session *session=doc->session();
- g_assert(session != NULL);
- session->commit();
+ doc->commit();
}
Inkscape::XML::Event *
@@ -83,9 +75,7 @@ sp_repr_commit_undoable (Inkscape::XML::Document *doc)
EventTracker<SimpleEvent<Event::XML> > tracker("commit");
g_assert(doc != NULL);
- Session *session=doc->session();
- g_assert(session != NULL);
- return session->commitUndoable();
+ return doc->commitUndoable();
}
namespace {
@@ -149,7 +139,7 @@ sp_repr_undo_log (Inkscape::XML::Event *log)
EventTracker<SimpleEvent<Event::XML> > tracker("undo-log");
if (log) {
- g_assert(!log->repr->session()->inTransaction());
+ g_assert(!log->repr->document()->inTransaction());
}
Inkscape::XML::undo_log_to_observer(log, LogPerformer::instance());
@@ -206,12 +196,8 @@ sp_repr_replay_log (Inkscape::XML::Event *log)
EventTracker<SimpleEvent<Event::XML> > tracker("replay-log");
if (log) {
- // Nodes created by the whiteboard deserializer tend to not
- // have an associated session. This conditional hacks a way around that,
- // but what's the best way to fix the whiteboard code so that new nodes
- // will have an associated session? -- yipdw
- if (log->repr->session()) {
- g_assert(!log->repr->session()->inTransaction());
+ if (log->repr->document()) {
+ g_assert(!log->repr->document()->inTransaction());
}
}
diff --git a/src/xml/node.h b/src/xml/node.h
index 413d81a11..7e27f1ff6 100644
--- a/src/xml/node.h
+++ b/src/xml/node.h
@@ -22,8 +22,6 @@
namespace Inkscape {
namespace XML {
-class Session;
-class TransactionLogger;
class AttributeRecord;
class Document;
class NodeEventVector;
@@ -46,8 +44,6 @@ public:
virtual NodeType type() const=0;
- virtual Session *session()=0;
-
virtual gchar const *name() const=0;
virtual int code() const=0;
virtual void setCodeUnsafe(int code)=0;
@@ -108,7 +104,6 @@ public: // ideally these should be protected too somehow...
virtual void _setParent(Node *parent)=0;
virtual void _setNext(Node *next)=0;
virtual void _bindDocument(Document &document)=0;
- virtual void _bindLogger(TransactionLogger &logger)=0;
virtual unsigned _childPosition(Node const &child) const=0;
virtual unsigned _cachedPosition() const=0;
diff --git a/src/xml/session.h b/src/xml/session.h
deleted file mode 100644
index 967373a23..000000000
--- a/src/xml/session.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Inkscape::XML::Session - context for transactions
- *
- * Copyright 2005 MenTaLguY <mental@rydia.net>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * See the file COPYING for details.
- *
- */
-
-#ifndef SEEN_INKSCAPE_XML_SESSION_H
-#define SEEN_INKSCAPE_XML_SESSION_H
-
-namespace Inkscape {
-
-namespace XML {
-
-class Event;
-class Node;
-
-class Session {
-public:
- Session() {}
- virtual ~Session() {}
-
- virtual bool inTransaction()=0;
-
- virtual void beginTransaction()=0;
- virtual void rollback()=0;
- virtual void commit()=0;
- virtual Inkscape::XML::Event *commitUndoable()=0;
-
- virtual Node *createElementNode(char const *name)=0;
- virtual Node *createTextNode(char const *content)=0;
- virtual Node *createCommentNode(char const *content)=0;
-};
-
-}
-
-}
-
-#endif
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
diff --git a/src/xml/simple-document.cpp b/src/xml/simple-document.cpp
index 3e7a17ff5..e8c652b2d 100644
--- a/src/xml/simple-document.cpp
+++ b/src/xml/simple-document.cpp
@@ -13,7 +13,10 @@
*/
#include "xml/simple-document.h"
-#include "xml/simple-session.h"
+#include "xml/event-fns.h"
+#include "xml/element-node.h"
+#include "xml/text-node.h"
+#include "xml/comment-node.h"
namespace Inkscape {
@@ -21,7 +24,90 @@ namespace XML {
void SimpleDocument::_initBindings() {
_bindDocument(*this);
- _bindLogger(*(new Inkscape::XML::SimpleSession()));
+}
+
+void SimpleDocument::beginTransaction() {
+ g_assert(!_in_transaction);
+ _in_transaction = true;
+}
+
+void SimpleDocument::rollback() {
+ g_assert(_in_transaction);
+ _in_transaction = false;
+ Event *log = _log_builder.detach();
+ sp_repr_undo_log(log);
+ sp_repr_free_log(log);
+}
+
+void SimpleDocument::commit() {
+ g_assert(_in_transaction);
+ _in_transaction = false;
+ _log_builder.discard();
+}
+
+Inkscape::XML::Event *SimpleDocument::commitUndoable() {
+ g_assert(_in_transaction);
+ _in_transaction = false;
+ return _log_builder.detach();
+}
+
+Node *SimpleDocument::createElementNode(char const *name) {
+ return new ElementNode(g_quark_from_string(name));
+}
+
+Node *SimpleDocument::createTextNode(char const *content) {
+ return new TextNode(Util::share_string(content));
+}
+
+Node *SimpleDocument::createCommentNode(char const *content) {
+ return new CommentNode(Util::share_string(content));
+}
+
+void SimpleDocument::notifyChildAdded(Node &parent,
+ Node &child,
+ Node *prev)
+{
+ if (_in_transaction) {
+ _log_builder.addChild(parent, child, prev);
+ }
+}
+
+void SimpleDocument::notifyChildRemoved(Node &parent,
+ Node &child,
+ Node *prev)
+{
+ if (_in_transaction) {
+ _log_builder.removeChild(parent, child, prev);
+ }
+}
+
+void SimpleDocument::notifyChildOrderChanged(Node &parent,
+ Node &child,
+ Node *old_prev,
+ Node *new_prev)
+{
+ if (_in_transaction) {
+ _log_builder.setChildOrder(parent, child, old_prev, new_prev);
+ }
+}
+
+void SimpleDocument::notifyContentChanged(Node &node,
+ Util::ptr_shared<char> old_content,
+ Util::ptr_shared<char> new_content)
+{
+ if (_in_transaction) {
+ _log_builder.setContent(node, old_content, new_content);
+ }
+}
+
+void SimpleDocument::notifyAttributeChanged(Node &node,
+ GQuark name,
+ Util::ptr_shared<char> old_value,
+ Util::ptr_shared<char> new_value)
+{
+ if (_in_transaction) {
+ _log_builder.setAttribute(node, name, old_value, new_value);
+ }
}
}
diff --git a/src/xml/simple-document.h b/src/xml/simple-document.h
index a2e58fe79..ca130e62b 100644
--- a/src/xml/simple-document.h
+++ b/src/xml/simple-document.h
@@ -17,20 +17,59 @@
#include "xml/document.h"
#include "xml/simple-node.h"
+#include "xml/node-observer.h"
+#include "xml/log-builder.h"
namespace Inkscape {
namespace XML {
-struct SimpleDocument : public SimpleNode, public Inkscape::XML::Document {
- explicit SimpleDocument(int code) : SimpleNode(code) {
+class SimpleDocument : public SimpleNode,
+ public Document,
+ public NodeObserver
+{
+public:
+ explicit SimpleDocument(int code)
+ : SimpleNode(code), _in_transaction(false)
+ {
_initBindings();
}
- Inkscape::XML::NodeType type() const { return Inkscape::XML::DOCUMENT_NODE; }
+ NodeType type() const { return Inkscape::XML::DOCUMENT_NODE; }
+
+ NodeObserver *logger() { return this; }
+
+ bool inTransaction() { return _in_transaction; }
+
+ void beginTransaction();
+ void rollback();
+ void commit();
+ Inkscape::XML::Event *commitUndoable();
+
+ Node *createElementNode(char const *name);
+ Node *createTextNode(char const *content);
+ Node *createCommentNode(char const *content);
+
+ void notifyChildAdded(Node &parent, Node &child, Node *prev);
+
+ void notifyChildRemoved(Node &parent, Node &child, Node *prev);
+
+ void notifyChildOrderChanged(Node &parent, Node &child,
+ Node *old_prev, Node *new_prev);
+
+ void notifyContentChanged(Node &node,
+ Util::ptr_shared<char> old_content,
+ Util::ptr_shared<char> new_content);
+
+ void notifyAttributeChanged(Node &node, GQuark name,
+ Util::ptr_shared<char> old_value,
+ Util::ptr_shared<char> new_value);
protected:
- SimpleDocument(SimpleDocument const &doc) : Inkscape::XML::Node(), SimpleNode(doc), Inkscape::XML::Document() {
+ SimpleDocument(SimpleDocument const &doc)
+ : Node(), SimpleNode(doc), Document(), NodeObserver(),
+ _in_transaction(false)
+ {
_initBindings();
}
@@ -38,6 +77,9 @@ protected:
private:
void _initBindings();
+
+ bool _in_transaction;
+ LogBuilder _log_builder;
};
}
diff --git a/src/xml/simple-node.cpp b/src/xml/simple-node.cpp
index 7f8dd29b2..f439243cd 100644
--- a/src/xml/simple-node.cpp
+++ b/src/xml/simple-node.cpp
@@ -161,7 +161,7 @@ SimpleNode::SimpleNode(int code)
: Node(), _name(code), _attributes(), _child_count(0),
_cached_positions_valid(false)
{
- this->_logger = NULL;
+ this->_document = NULL;
this->_document = NULL;
this->_parent = this->_next = NULL;
this->_first_child = this->_last_child = NULL;
@@ -174,7 +174,7 @@ SimpleNode::SimpleNode(SimpleNode const &node)
_child_count(node._child_count),
_cached_positions_valid(node._cached_positions_valid)
{
- _logger = NULL;
+ _document = NULL;
_document = NULL;
_parent = _next = NULL;
_first_child = _last_child = NULL;
@@ -282,8 +282,8 @@ void SimpleNode::setContent(gchar const *content) {
_content = new_content;
if ( _content != old_content ) {
- if (_logger) {
- _logger->notifyContentChanged(*this, old_content, _content);
+ if (_document) {
+ _document->logger()->notifyContentChanged(*this, old_content, _content);
}
_observers.notifyContentChanged(*this, old_content, _content);
@@ -336,8 +336,8 @@ SimpleNode::setAttribute(gchar const *name, gchar const *value, bool const is_in
}
if ( new_value != old_value && (!old_value || !new_value || strcmp(old_value, new_value))) {
- if (_logger) {
- _logger->notifyAttributeChanged(*this, key, old_value, new_value);
+ if (_document) {
+ _document->logger()->notifyAttributeChanged(*this, key, old_value, new_value);
}
_observers.notifyAttributeChanged(*this, key, old_value, new_value);
@@ -380,10 +380,7 @@ void SimpleNode::addChild(Node *child, Node *ref) {
if (_document) {
child->_bindDocument(*_document);
- }
- if (_logger) {
- child->_bindLogger(*_logger);
- _logger->notifyChildAdded(*this, *child, ref);
+ _document->logger()->notifyChildAdded(*this, *child, ref);
}
_observers.notifyChildAdded(*this, *child, ref);
@@ -401,18 +398,6 @@ void SimpleNode::_bindDocument(Document &document) {
}
}
-void SimpleNode::_bindLogger(TransactionLogger &logger) {
- g_assert(!_logger || _logger == &logger);
-
- if (!_logger) {
- _logger = &logger;
-
- for ( Node *child = _first_child ; child != NULL ; child = child->next() ) {
- child->_bindLogger(logger);
- }
- }
-}
-
void SimpleNode::removeChild(Node *child) {
g_assert(child);
g_assert(child->parent() == this);
@@ -438,8 +423,8 @@ void SimpleNode::removeChild(Node *child) {
child->_setParent(NULL);
_child_count--;
- if (_logger) {
- _logger->notifyChildRemoved(*this, *child, ref);
+ if (_document) {
+ _document->logger()->notifyChildRemoved(*this, *child, ref);
}
_observers.notifyChildRemoved(*this, *child, ref);
@@ -485,8 +470,8 @@ void SimpleNode::changeOrder(Node *child, Node *ref) {
_cached_positions_valid = false;
- if (_logger) {
- _logger->notifyChildOrderChanged(*this, *child, prev, ref);
+ if (_document) {
+ _document->logger()->notifyChildOrderChanged(*this, *child, prev, ref);
}
_observers.notifyChildOrderChanged(*this, *child, prev, ref);
diff --git a/src/xml/simple-node.h b/src/xml/simple-node.h
index 367516ee7..7c32ebee6 100644
--- a/src/xml/simple-node.h
+++ b/src/xml/simple-node.h
@@ -17,7 +17,6 @@
#include "xml/node.h"
#include "xml/attribute-record.h"
-#include "xml/transaction-logger.h"
#include "xml/composite-node-observer.h"
#include "util/list-container.h"
@@ -29,14 +28,10 @@ class SimpleNode
: virtual public Node, public Inkscape::GC::Managed<>
{
public:
- Session *session() {
- return ( _logger ? &_logger->session() : NULL );
- }
-
gchar const *name() const;
int code() const { return _name; }
void setCodeUnsafe(int code) {
- g_assert(_logger == NULL);
+ g_assert(_document == NULL);
_name = code;
}
@@ -119,7 +114,6 @@ public: // ideally these should be protected somehow...
void _setParent(Node *parent) { _parent = parent; }
void _setNext(Node *next) { _next = next; }
void _bindDocument(Document &document);
- void _bindLogger(TransactionLogger &logger);
unsigned _childPosition(Node const &child) const;
unsigned _cachedPosition() const { return _cached_position; }
@@ -133,7 +127,6 @@ private:
Node *_parent;
Node *_next;
Document *_document;
- TransactionLogger *_logger;
mutable unsigned _cached_position;
int _name;
diff --git a/src/xml/simple-session.cpp b/src/xml/simple-session.cpp
deleted file mode 100644
index d5c17a540..000000000
--- a/src/xml/simple-session.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Inkscape::XML::SimpleSession - simple session/logging implementation
- *
- * Copyright 2005 MenTaLguY <mental@rydia.net>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * See the file COPYING for details.
- *
- */
-
-#include "xml/simple-session.h"
-#include "xml/event-fns.h"
-#include "xml/element-node.h"
-#include "xml/text-node.h"
-#include "xml/comment-node.h"
-
-namespace Inkscape {
-
-namespace XML {
-
-void SimpleSession::beginTransaction() {
- g_assert(!_in_transaction);
- _in_transaction = true;
-}
-
-void SimpleSession::rollback() {
- g_assert(_in_transaction);
- _in_transaction = false;
- Event *log = _log_builder.detach();
- sp_repr_undo_log(log);
- sp_repr_free_log(log);
-}
-
-void SimpleSession::commit() {
- g_assert(_in_transaction);
- _in_transaction = false;
- _log_builder.discard();
-}
-
-Inkscape::XML::Event *SimpleSession::commitUndoable() {
- g_assert(_in_transaction);
- _in_transaction = false;
- return _log_builder.detach();
-}
-
-Node *SimpleSession::createElementNode(char const *name) {
- return new ElementNode(g_quark_from_string(name));
-}
-
-Node *SimpleSession::createTextNode(char const *content) {
- return new TextNode(Util::share_string(content));
-}
-
-Node *SimpleSession::createCommentNode(char const *content) {
- return new CommentNode(Util::share_string(content));
-}
-
-void SimpleSession::notifyChildAdded(Node &parent,
- Node &child,
- Node *prev)
-{
- if (_in_transaction) {
- _log_builder.addChild(parent, child, prev);
- }
-}
-
-void SimpleSession::notifyChildRemoved(Node &parent,
- Node &child,
- Node *prev)
-{
- if (_in_transaction) {
- _log_builder.removeChild(parent, child, prev);
- }
-}
-
-void SimpleSession::notifyChildOrderChanged(Node &parent,
- Node &child,
- Node *old_prev,
- Node *new_prev)
-{
- if (_in_transaction) {
- _log_builder.setChildOrder(parent, child, old_prev, new_prev);
- }
-}
-
-void SimpleSession::notifyContentChanged(Node &node,
- Util::ptr_shared<char> old_content,
- Util::ptr_shared<char> new_content)
-{
- if (_in_transaction) {
- _log_builder.setContent(node, old_content, new_content);
- }
-}
-
-void SimpleSession::notifyAttributeChanged(Node &node,
- GQuark name,
- Util::ptr_shared<char> old_value,
- Util::ptr_shared<char> new_value)
-{
- if (_in_transaction) {
- _log_builder.setAttribute(node, name, old_value, new_value);
- }
-}
-
-}
-
-}
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
diff --git a/src/xml/simple-session.h b/src/xml/simple-session.h
deleted file mode 100644
index ecd61ba08..000000000
--- a/src/xml/simple-session.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Inkscape::XML::SimpleSession - simple session/logging implementation
- *
- * Copyright 2005 MenTaLguY <mental@rydia.net>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * See the file COPYING for details.
- *
- */
-
-#ifndef SEEN_INKSCAPE_XML_SIMPLE_SESSION_H
-#define SEEN_INKSCAPE_XML_SIMPLE_SESSION_H
-
-#include "gc-managed.h"
-#include "xml/session.h"
-#include "xml/transaction-logger.h"
-#include "xml/log-builder.h"
-
-namespace Inkscape {
-
-namespace XML {
-
-class SimpleSession : public GC::Managed<>,
- public Session,
- public TransactionLogger
-{
-public:
- SimpleSession() : _in_transaction(false) {}
-
- bool inTransaction() { return _in_transaction; }
-
- void beginTransaction();
- void rollback();
- void commit();
- Inkscape::XML::Event *commitUndoable();
-
- Node *createElementNode(char const *name);
- Node *createTextNode(char const *content);
- Node *createCommentNode(char const *content);
-
- Session &session() { return *this; }
-
- void notifyChildAdded(Inkscape::XML::Node &parent, Inkscape::XML::Node &child, Inkscape::XML::Node *prev);
-
- void notifyChildRemoved(Inkscape::XML::Node &parent, Inkscape::XML::Node &child, Inkscape::XML::Node *prev);
-
- void notifyChildOrderChanged(Inkscape::XML::Node &parent, Inkscape::XML::Node &child,
- Inkscape::XML::Node *old_prev, Inkscape::XML::Node *new_prev);
-
- void notifyContentChanged(Inkscape::XML::Node &node,
- Util::ptr_shared<char> old_content,
- Util::ptr_shared<char> new_content);
-
- void notifyAttributeChanged(Inkscape::XML::Node &node, GQuark name,
- Util::ptr_shared<char> old_value,
- Util::ptr_shared<char> new_value);
-
-private:
- SimpleSession(SimpleSession const &); // no copy
- void operator=(SimpleSession const &); // no assign
-
- bool _in_transaction;
- LogBuilder _log_builder;
-};
-
-}
-
-}
-
-#endif
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
diff --git a/src/xml/transaction-logger.h b/src/xml/transaction-logger.h
deleted file mode 100644
index 9f7bfbc50..000000000
--- a/src/xml/transaction-logger.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Inkscape::XML::TransactionLogger - logs changes for transactions
- *
- * Copyright 2005 MenTaLguY <mental@rydia.net>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * See the file COPYING for details.
- *
- */
-
-#ifndef SEEN_INKSCAPE_XML_TRANSACTION_LOGGER_H
-#define SEEN_INKSCAPE_XML_TRANSACTION_LOGGER_H
-
-#include "xml/node-observer.h"
-
-namespace Inkscape {
-namespace XML {
-class Event;
-}
-}
-
-
-namespace Inkscape {
-
-namespace XML {
-
-class Session;
-
-class TransactionLogger : public NodeObserver {
-public:
- virtual Session &session()=0;
-};
-
-}
-
-}
-
-#endif
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :