2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: Undo.h /main/1 1996/07/29 17:07:28 cde-hp $ */
24 // Copyright (c) 1994 James Clark
25 // See the file COPYING for copying permission.
28 #define Undo_INCLUDED 1
34 #include "ContentToken.h"
35 #include "OpenElement.h"
36 #include "Allocator.h"
39 namespace SP_NAMESPACE {
45 class Undo : public Link {
47 void *operator new(size_t sz, Allocator &alloc) { return alloc.alloc(sz); }
48 void *operator new(size_t sz) { return Allocator::allocSimple(sz); }
49 void operator delete(void *p) { Allocator::free(p); }
52 virtual void undo(ParserState *) = 0;
54 Undo(const Undo &); // undefined
55 void operator=(const Undo &); // undefined
58 class UndoTransition : public Undo {
60 UndoTransition(const MatchState &);
61 void undo(ParserState *);
63 UndoTransition(const UndoTransition &); // undefined
64 void operator=(const UndoTransition &); // undefined
68 class UndoStartTag : public Undo {
71 void undo(ParserState *);
73 UndoStartTag(const UndoStartTag &); // undefined
74 void operator=(const UndoStartTag &); // undefined
77 class UndoEndTag : public Undo {
79 UndoEndTag(OpenElement *);
80 void undo(ParserState *);
82 UndoEndTag(const UndoEndTag &); // undefined
83 void operator=(const UndoEndTag &); // undefined
84 Owner<OpenElement> element_;
91 #endif /* not Undo_INCLUDED */