Code

Filter effects dialog:
[inkscape.git] / src / dom / domptr.cpp
1 /**
2  * Phoebe DOM Implementation.
3  *
4  * This is a C++ approximation of the W3C DOM model, which follows
5  * fairly closely the specifications in the various .idl files, copies of
6  * which are provided for reference.  Most important is this one:
7  *
8  * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
9  *
10  * Authors:
11  *   Bob Jamison
12  *
13  * Copyright (C) 2006 Bob Jamison
14  *
15  *  This library is free software; you can redistribute it and/or
16  *  modify it under the terms of the GNU Lesser General Public
17  *  License as published by the Free Software Foundation; either
18  *  version 2.1 of the License, or (at your option) any later version.
19  *
20  *  This library is distributed in the hope that it will be useful,
21  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23  *  Lesser General Public License for more details.
24  *
25  *  You should have received a copy of the GNU Lesser General Public
26  *  License along with this library; if not, write to the Free Software
27  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
28  */
30 #include "dom.h"
33 namespace org
34 {
35 namespace w3c
36 {
37 namespace dom
38 {
43 /*#########################################################################
44 ## NodePtr
45 #########################################################################*/
49 /**
50  * Increment the ref counter of the wrapped class instance
51  */
52 void incrementRefCount(Node *p)
53
54     if (p)
55             p->_refCnt++;
56 }
58 /**
59  * Decrement the ref counter of the wrapped class instance.  Delete
60  * the object if the reference count goes to zero 
61  */
62 void decrementRefCount(Node *p)
63 {
64     if (p)
65         {
66                  if (--(p->_refCnt) < 1)
67             delete p;
68         }
69 }
74 }  //namespace dom
75 }  //namespace w3c
76 }  //namespace org
80 /*#########################################################################
81 ## E N D    O F    F I L E
82 #########################################################################*/