12 |
# PURPOSE. See the GNU General Public License for more details. |
# PURPOSE. See the GNU General Public License for more details. |
13 |
# |
# |
14 |
# You should have received a copy of the GNU General Public |
# You should have received a copy of the GNU General Public |
15 |
# License along with program; see the file COPYING. If not, |
# License along with program; see the file COPYING. If not, |
16 |
# write to the Free Software Foundation, Inc., 59 Temple Place |
# write to the Free Software Foundation, Inc., 59 Temple Place |
17 |
# - Suite 330, Boston, MA 02111-1307, USA. |
# - Suite 330, Boston, MA 02111-1307, USA. |
18 |
# |
# |
19 |
# Copyright 2000, 2001, 2002 Free Software Foundation |
# Copyright 2000-2002 Free Software Foundation |
20 |
# |
# |
21 |
# |
# |
22 |
# FILE: |
# FILE: |
31 |
|
|
32 |
|
|
33 |
from gnue.common.GTrigger import GTriggerNamespace |
from gnue.common.GTrigger import GTriggerNamespace |
34 |
|
from gnue.common.GObjects import GObj |
35 |
# |
# |
36 |
# GRootObj |
# GRootObj |
37 |
# |
# |
38 |
# |
# |
39 |
class GRootObj: |
class GRootObj(GObj): |
40 |
def __init__(self): |
def __init__(self, rootName, xmlElementCallback, xmlParser): |
41 |
self._triggerNamespaceTree = None |
self._triggerNamespaceTree = None |
42 |
|
self._rname = rootName |
43 |
|
self.__xmlElementCallback = xmlElementCallback |
44 |
|
self._xmlParser = xmlParser |
45 |
|
|
46 |
|
# This will store any "global myVar" that the triggers execute. |
47 |
|
self._globalRuntimeNamespace = {} |
48 |
|
|
49 |
def initTriggerSystem(self): |
def initTriggerSystem(self): |
50 |
self._triggerNamespaceTree = GTriggerNamespace(self) |
self._triggerNamespaceTree = GTriggerNamespace(self,rootName=self._rname) |
51 |
|
|
52 |
|
def dumpXML(self, treeDump=1, gap=" "): |
53 |
|
return GObj.dumpXML(self, self.__xmlElementCallback(), |
54 |
|
treeDump, gap, xmlnamespaces={}) |
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|