summaryrefslogtreecommitdiffstats
path: root/globalvars.py
blob: ed2284ad73c4a5b25cfdcdf2ea386f070228aea0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#/***************************************************************************
#                             globalvars.h
#                             -----------
#    begin                : sam nov 2 2002
#    copyright            : (C) 1992-2004 by Fabian Padilla
#    email                : fp@bridgethink.com
# ***************************************************************************/

# /***************************************************************************
#  *                                                                         *
#  *   This program is free software; you can redistribute it and/or modify  *
#  *   it under the terms of the Foundation Public License as published by   *
#  *   bridgethink sarl; either version 2 of the License, or                 *
#  *   (at your option) any later version.                                   *
#  *                                                                         *
#  ***************************************************************************/

#
#  from C++ to python by Jeremy Zurcher <jeremy@asynk.ch>
#

""" doc """

from fstringhash import FstringHash
import evenjastrings as ES

#gvActionNormal = None
#gvActionDestination1Data = None
#gvActionDestination2Data = None
#gvActionFollowDestination = None
#gvActionWait = None

#gvActionAdd = None
#gvActionUpdate = None
#gvActionDelete = None
#gvActionGet = None
#gvActionFind = None

#gvActionEnd = None
#gvActionError = None

#// SYSTEM ACTIONS
#gvActionSysAddDest = None

#// PARAMETERS
#gvNoValues = None

#def initGlobalVars():
#
#    global gvActionNormal
#    global gvActionDestination1Data
#    global gvActionDestination2Data
#    global gvActionFollowDestination
#    global gvActionWait
#    global gvActionAdd
#    global gvActionUpdate
#    global gvActionDelete
#    global gvActionGet
#    global gvActionFind
#    global gvActionEnd
#    global gvActionError
#    global gvActionSysAddDest
#    global gvNoValues
#
gvActionNormal = FstringHash()
gvActionNormal.setString(ES.ACT_NORMAL)

gvActionDestination1Data = FstringHash()
gvActionDestination1Data.setString(ES.ACT_DESTINATION1DATA)

gvActionDestination2Data = FstringHash()
gvActionDestination2Data.setString(ES.ACT_DESTINATION2DATA)

gvActionFollowDestination = FstringHash()
gvActionFollowDestination.setString(ES.ACT_FOLLOWDESTINATION)

gvActionWait = FstringHash()
gvActionWait.setString(ES.ACT_WAIT)

gvActionAdd = FstringHash()
gvActionAdd.setString(ES.ACT_ADD)

gvActionUpdate = FstringHash()
gvActionUpdate.setString(ES.ACT_UPDATE)

gvActionDelete = FstringHash()
gvActionDelete.setString(ES.ACT_DELETE)

gvActionGet = FstringHash()
gvActionGet.setString(ES.ACT_GET)

gvActionFind = FstringHash()
gvActionFind.setString(ES.ACT_FIND)

gvActionEnd = FstringHash()
gvActionEnd.setString(ES.ACT_END)

gvActionError = FstringHash()
gvActionError.setString(ES.ACT_ERROR)

gvActionSysAddDest = FstringHash()
gvActionSysAddDest.setString(ES.ACT_SYS_ADDDEST)

gvNoValues = FstringHash()
gvNoValues.setString(ES.TXT_NOVALUES)


#if __name__ == '__main__':
#
#    import unittest
#    D = dir()
#    L=[    ES.ACT_ADD,\
#        ES.ACT_DELETE,\
#        ES.ACT_DESTINATION1DATA,\
#        ES.ACT_DESTINATION2DATA,\
#        ES.ACT_END,\
#        ES.ACT_ERROR,\
#        ES.ACT_FIND,\
#        ES.ACT_FOLLOWDESTINATION,\
#        ES.ACT_GET,\
#        ES.ACT_NORMAL,\
#        ES.ACT_SYS_ADDDEST,\
#        ES.ACT_UPDATE,\
#        ES.ACT_WAIT,\
#        ES.TXT_NOVALUES]
#
#    class globalvarsTestCase(unittest.TestCase):
#
#        def testInit(self):
#            initGlobalVars()
#            for I in D:
#                if I[:2]=="gv":
#                    self.assertNotEquals(eval(D[D.index(I)]).getString(),D.index(I))
#    unittest.main()