Changeset 99 for 05/devel/sgfpars.py
- Timestamp:
- 03/19/04 22:58:00 (5 years ago)
- Files:
-
- 05/devel/sgfpars.py (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
05/devel/sgfpars.py
r62 r99 2 2 # Don't modify this file, modify the SWIG interface instead. 3 3 # This file is compatible with both classic and new-style classes. 4 4 5 import _sgfpars 6 5 7 def _swig_setattr(self,class_type,name,value): 6 8 if (name == "this"): … … 26 28 class _object : pass 27 29 _newclass = 0 30 del types 28 31 29 32 … … 33 36 __swig_getmethods__ = {} 34 37 __getattr__ = lambda self, name: _swig_getattr(self, SGFError, name) 35 def __init__(self,*args): 36 _swig_setattr(self, SGFError, 'this', apply(_sgfpars.new_SGFError,args)) 38 def __repr__(self): 39 return "<C SGFError instance at %s>" % (self.this,) 40 def __init__(self, *args): 41 _swig_setattr(self, SGFError, 'this', _sgfpars.new_SGFError(*args)) 37 42 _swig_setattr(self, SGFError, 'thisown', 1) 38 def __del__(self, destroy= _sgfpars.delete_SGFError): 39 try: 40 if self.thisown: destroy(self) 41 except: pass 42 def __repr__(self): 43 return "<C SGFError instance at %s>" % (self.this,) 43 def __del__(self, destroy=_sgfpars.delete_SGFError): 44 try: 45 if self.thisown: destroy(self) 46 except: pass 44 47 45 48 class SGFErrorPtr(SGFError): 46 def __init__(self, this):49 def __init__(self, this): 47 50 _swig_setattr(self, SGFError, 'this', this) 48 51 if not hasattr(self,"thisown"): _swig_setattr(self, SGFError, 'thisown', 0) … … 50 53 _sgfpars.SGFError_swigregister(SGFErrorPtr) 51 54 55 52 56 SGFescape = _sgfpars.SGFescape 53 54 57 class Node(_object): 55 58 __swig_setmethods__ = {} … … 57 60 __swig_getmethods__ = {} 58 61 __getattr__ = lambda self, name: _swig_getattr(self, Node, name) 62 def __repr__(self): 63 return "<C Node instance at %s>" % (self.this,) 59 64 __swig_setmethods__["previous"] = _sgfpars.Node_previous_set 60 65 __swig_getmethods__["previous"] = _sgfpars.Node_previous_get 61 if _newclass:previous = property(_sgfpars.Node_previous_get, _sgfpars.Node_previous_set)66 if _newclass:previous = property(_sgfpars.Node_previous_get, _sgfpars.Node_previous_set) 62 67 __swig_setmethods__["next"] = _sgfpars.Node_next_set 63 68 __swig_getmethods__["next"] = _sgfpars.Node_next_get 64 if _newclass:next = property(_sgfpars.Node_next_get, _sgfpars.Node_next_set)69 if _newclass:next = property(_sgfpars.Node_next_get, _sgfpars.Node_next_set) 65 70 __swig_setmethods__["up"] = _sgfpars.Node_up_set 66 71 __swig_getmethods__["up"] = _sgfpars.Node_up_get 67 if _newclass:up = property(_sgfpars.Node_up_get, _sgfpars.Node_up_set)72 if _newclass:up = property(_sgfpars.Node_up_get, _sgfpars.Node_up_set) 68 73 __swig_setmethods__["down"] = _sgfpars.Node_down_set 69 74 __swig_getmethods__["down"] = _sgfpars.Node_down_get 70 if _newclass:down = property(_sgfpars.Node_down_get, _sgfpars.Node_down_set)75 if _newclass:down = property(_sgfpars.Node_down_get, _sgfpars.Node_down_set) 71 76 __swig_setmethods__["numChildren"] = _sgfpars.Node_numChildren_set 72 77 __swig_getmethods__["numChildren"] = _sgfpars.Node_numChildren_get 73 if _newclass:numChildren = property(_sgfpars.Node_numChildren_get, _sgfpars.Node_numChildren_set)78 if _newclass:numChildren = property(_sgfpars.Node_numChildren_get, _sgfpars.Node_numChildren_set) 74 79 __swig_setmethods__["level"] = _sgfpars.Node_level_set 75 80 __swig_getmethods__["level"] = _sgfpars.Node_level_get 76 if _newclass:level = property(_sgfpars.Node_level_get, _sgfpars.Node_level_set)81 if _newclass:level = property(_sgfpars.Node_level_get, _sgfpars.Node_level_set) 77 82 __swig_setmethods__["SGFstring"] = _sgfpars.Node_SGFstring_set 78 83 __swig_getmethods__["SGFstring"] = _sgfpars.Node_SGFstring_get 79 if _newclass:SGFstring = property(_sgfpars.Node_SGFstring_get, _sgfpars.Node_SGFstring_set)84 if _newclass:SGFstring = property(_sgfpars.Node_SGFstring_get, _sgfpars.Node_SGFstring_set) 80 85 __swig_setmethods__["parsed"] = _sgfpars.Node_parsed_set 81 86 __swig_getmethods__["parsed"] = _sgfpars.Node_parsed_get 82 if _newclass:parsed = property(_sgfpars.Node_parsed_get, _sgfpars.Node_parsed_set)87 if _newclass:parsed = property(_sgfpars.Node_parsed_get, _sgfpars.Node_parsed_set) 83 88 __swig_setmethods__["data"] = _sgfpars.Node_data_set 84 89 __swig_getmethods__["data"] = _sgfpars.Node_data_get 85 if _newclass:data = property(_sgfpars.Node_data_get, _sgfpars.Node_data_set)90 if _newclass:data = property(_sgfpars.Node_data_get, _sgfpars.Node_data_set) 86 91 __swig_setmethods__["posyD"] = _sgfpars.Node_posyD_set 87 92 __swig_getmethods__["posyD"] = _sgfpars.Node_posyD_get 88 if _newclass:posyD = property(_sgfpars.Node_posyD_get, _sgfpars.Node_posyD_set)89 def __init__(self, *args):90 _swig_setattr(self, Node, 'this', apply(_sgfpars.new_Node,args))93 if _newclass:posyD = property(_sgfpars.Node_posyD_get, _sgfpars.Node_posyD_set) 94 def __init__(self, *args): 95 _swig_setattr(self, Node, 'this', _sgfpars.new_Node(*args)) 91 96 _swig_setattr(self, Node, 'thisown', 1) 92 def __del__(self, destroy= _sgfpars.delete_Node): 93 try: 94 if self.thisown: destroy(self) 95 except: pass 96 def pathToNode(*args): return apply(_sgfpars.Node_pathToNode,args) 97 def parseNode(*args): return apply(_sgfpars.Node_parseNode,args) 98 def getData(*args): return apply(_sgfpars.Node_getData,args) 99 def __repr__(self): 100 return "<C Node instance at %s>" % (self.this,) 97 def __del__(self, destroy=_sgfpars.delete_Node): 98 try: 99 if self.thisown: destroy(self) 100 except: pass 101 def pathToNode(*args): return _sgfpars.Node_pathToNode(*args) 102 def parseNode(*args): return _sgfpars.Node_parseNode(*args) 103 def getData(*args): return _sgfpars.Node_getData(*args) 101 104 102 105 class NodePtr(Node): 103 def __init__(self, this):106 def __init__(self, this): 104 107 _swig_setattr(self, Node, 'this', this) 105 108 if not hasattr(self,"thisown"): _swig_setattr(self, Node, 'thisown', 0) … … 113 116 __swig_getmethods__ = {} 114 117 __getattr__ = lambda self, name: _swig_getattr(self, Cursor, name) 115 def __init__(self,*args): 116 _swig_setattr(self, Cursor, 'this', apply(_sgfpars.new_Cursor,args)) 118 def __repr__(self): 119 return "<C Cursor instance at %s>" % (self.this,) 120 def __init__(self, *args): 121 _swig_setattr(self, Cursor, 'this', _sgfpars.new_Cursor(*args)) 117 122 _swig_setattr(self, Cursor, 'thisown', 1) 118 def __del__(self, destroy= _sgfpars.delete_Cursor):123 def __del__(self, destroy=_sgfpars.delete_Cursor): 119 124 try: 120 125 if self.thisown: destroy(self) … … 122 127 __swig_setmethods__["atStart"] = _sgfpars.Cursor_atStart_set 123 128 __swig_getmethods__["atStart"] = _sgfpars.Cursor_atStart_get 124 if _newclass:atStart = property(_sgfpars.Cursor_atStart_get, _sgfpars.Cursor_atStart_set)129 if _newclass:atStart = property(_sgfpars.Cursor_atStart_get, _sgfpars.Cursor_atStart_set) 125 130 __swig_setmethods__["atEnd"] = _sgfpars.Cursor_atEnd_set 126 131 __swig_getmethods__["atEnd"] = _sgfpars.Cursor_atEnd_get 127 if _newclass:atEnd = property(_sgfpars.Cursor_atEnd_get, _sgfpars.Cursor_atEnd_set)132 if _newclass:atEnd = property(_sgfpars.Cursor_atEnd_get, _sgfpars.Cursor_atEnd_set) 128 133 __swig_setmethods__["height"] = _sgfpars.Cursor_height_set 129 134 __swig_getmethods__["height"] = _sgfpars.Cursor_height_get 130 if _newclass:height = property(_sgfpars.Cursor_height_get, _sgfpars.Cursor_height_set)135 if _newclass:height = property(_sgfpars.Cursor_height_get, _sgfpars.Cursor_height_set) 131 136 __swig_setmethods__["width"] = _sgfpars.Cursor_width_set 132 137 __swig_getmethods__["width"] = _sgfpars.Cursor_width_get 133 if _newclass:width = property(_sgfpars.Cursor_width_get, _sgfpars.Cursor_width_set)138 if _newclass:width = property(_sgfpars.Cursor_width_get, _sgfpars.Cursor_width_set) 134 139 __swig_setmethods__["root"] = _sgfpars.Cursor_root_set 135 140 __swig_getmethods__["root"] = _sgfpars.Cursor_root_get 136 if _newclass:root = property(_sgfpars.Cursor_root_get, _sgfpars.Cursor_root_set)141 if _newclass:root = property(_sgfpars.Cursor_root_get, _sgfpars.Cursor_root_set) 137 142 __swig_setmethods__["currentN"] = _sgfpars.Cursor_currentN_set 138 143 __swig_getmethods__["currentN"] = _sgfpars.Cursor_currentN_get 139 if _newclass:currentN = property(_sgfpars.Cursor_currentN_get, _sgfpars.Cursor_currentN_set)144 if _newclass:currentN = property(_sgfpars.Cursor_currentN_get, _sgfpars.Cursor_currentN_set) 140 145 __swig_setmethods__["posx"] = _sgfpars.Cursor_posx_set 141 146 __swig_getmethods__["posx"] = _sgfpars.Cursor_posx_get 142 if _newclass:posx = property(_sgfpars.Cursor_posx_get, _sgfpars.Cursor_posx_set)147 if _newclass:posx = property(_sgfpars.Cursor_posx_get, _sgfpars.Cursor_posx_set) 143 148 __swig_setmethods__["posy"] = _sgfpars.Cursor_posy_set 144 149 __swig_getmethods__["posy"] = _sgfpars.Cursor_posy_get 145 if _newclass:posy = property(_sgfpars.Cursor_posy_get, _sgfpars.Cursor_posy_set)150 if _newclass:posy = property(_sgfpars.Cursor_posy_get, _sgfpars.Cursor_posy_set) 146 151 __swig_setmethods__["encoding"] = _sgfpars.Cursor_encoding_set 147 152 __swig_getmethods__["encoding"] = _sgfpars.Cursor_encoding_get 148 if _newclass:encoding = property(_sgfpars.Cursor_encoding_get,_sgfpars.Cursor_encoding_set) 149 def noChildren(*args): return apply(_sgfpars.Cursor_noChildren,args) 150 def currentNode(*args): return apply(_sgfpars.Cursor_currentNode,args) 151 def parse(*args): return apply(_sgfpars.Cursor_parse,args) 152 def game(*args): return apply(_sgfpars.Cursor_game,args) 153 def next(*args): return apply(_sgfpars.Cursor_next,args) 154 def previous(*args): return apply(_sgfpars.Cursor_previous,args) 155 def getRootNode(*args): return apply(_sgfpars.Cursor_getRootNode,args) 156 def updateCurrentNode(*args): return apply(_sgfpars.Cursor_updateCurrentNode,args) 157 def updateRootNode(*args): return apply(_sgfpars.Cursor_updateRootNode,args) 158 def rootNodeToString(*args): return apply(_sgfpars.Cursor_rootNodeToString,args) 159 def nodeToString(*args): return apply(_sgfpars.Cursor_nodeToString,args) 160 def outputVar(*args): return apply(_sgfpars.Cursor_outputVar,args) 161 def output(*args): return apply(_sgfpars.Cursor_output,args) 162 def add(*args): return apply(_sgfpars.Cursor_add,args) 163 def delVariation(*args): return apply(_sgfpars.Cursor_delVariation,args) 164 def setFlags(*args): return apply(_sgfpars.Cursor_setFlags,args) 165 def __repr__(self): 166 return "<C Cursor instance at %s>" % (self.this,) 153 if _newclass:encoding = property(_sgfpars.Cursor_encoding_get, _sgfpars.Cursor_encoding_set) 154 def noChildren(*args): return _sgfpars.Cursor_noChildren(*args) 155 def currentNode(*args): return _sgfpars.Cursor_currentNode(*args) 156 def parse(*args): return _sgfpars.Cursor_parse(*args) 157 def game(*args): return _sgfpars.Cursor_game(*args) 158 def next(*args): return _sgfpars.Cursor_next(*args) 159 def previous(*args): return _sgfpars.Cursor_previous(*args) 160 def getRootNode(*args): return _sgfpars.Cursor_getRootNode(*args) 161 def updateCurrentNode(*args): return _sgfpars.Cursor_updateCurrentNode(*args) 162 def updateRootNode(*args): return _sgfpars.Cursor_updateRootNode(*args) 163 def rootNodeToString(*args): return _sgfpars.Cursor_rootNodeToString(*args) 164 def nodeToString(*args): return _sgfpars.Cursor_nodeToString(*args) 165 def outputVar(*args): return _sgfpars.Cursor_outputVar(*args) 166 def output(*args): return _sgfpars.Cursor_output(*args) 167 def add(*args): return _sgfpars.Cursor_add(*args) 168 def delVariation(*args): return _sgfpars.Cursor_delVariation(*args) 169 def setFlags(*args): return _sgfpars.Cursor_setFlags(*args) 167 170 168 171 class CursorPtr(Cursor): 169 def __init__(self, this):172 def __init__(self, this): 170 173 _swig_setattr(self, Cursor, 'this', this) 171 174 if not hasattr(self,"thisown"): _swig_setattr(self, Cursor, 'thisown', 0) … … 178 181 __swig_getmethods__ = {} 179 182 __getattr__ = lambda self, name: _swig_getattr(self, intN, name) 183 def __repr__(self): 184 return "<C intN instance at %s>" % (self.this,) 180 185 __swig_setmethods__["data"] = _sgfpars.intN_data_set 181 186 __swig_getmethods__["data"] = _sgfpars.intN_data_get 182 if _newclass:data = property(_sgfpars.intN_data_get, _sgfpars.intN_data_set)187 if _newclass:data = property(_sgfpars.intN_data_get, _sgfpars.intN_data_set) 183 188 __swig_setmethods__["prev"] = _sgfpars.intN_prev_set 184 189 __swig_getmethods__["prev"] = _sgfpars.intN_prev_get 185 if _newclass:prev = property(_sgfpars.intN_prev_get, _sgfpars.intN_prev_set)186 def __init__(self, *args):187 _swig_setattr(self, intN, 'this', apply(_sgfpars.new_intN,args))190 if _newclass:prev = property(_sgfpars.intN_prev_get, _sgfpars.intN_prev_set) 191 def __init__(self, *args): 192 _swig_setattr(self, intN, 'this', _sgfpars.new_intN(*args)) 188 193 _swig_setattr(self, intN, 'thisown', 1) 189 def __del__(self, destroy= _sgfpars.delete_intN): 190 try: 191 if self.thisown: destroy(self) 192 except: pass 193 def __repr__(self): 194 return "<C intN instance at %s>" % (self.this,) 194 def __del__(self, destroy=_sgfpars.delete_intN): 195 try: 196 if self.thisown: destroy(self) 197 except: pass 195 198 196 199 class intNPtr(intN): 197 def __init__(self, this):200 def __init__(self, this): 198 201 _swig_setattr(self, intN, 'this', this) 199 202 if not hasattr(self,"thisown"): _swig_setattr(self, intN, 'thisown', 0) … … 206 209 __swig_getmethods__ = {} 207 210 __getattr__ = lambda self, name: _swig_getattr(self, IntStack, name) 211 def __repr__(self): 212 return "<C IntStack instance at %s>" % (self.this,) 208 213 __swig_setmethods__["root"] = _sgfpars.IntStack_root_set 209 214 __swig_getmethods__["root"] = _sgfpars.IntStack_root_get 210 if _newclass:root = property(_sgfpars.IntStack_root_get, _sgfpars.IntStack_root_set)211 def __init__(self, *args):212 _swig_setattr(self, IntStack, 'this', apply(_sgfpars.new_IntStack,args))215 if _newclass:root = property(_sgfpars.IntStack_root_get, _sgfpars.IntStack_root_set) 216 def __init__(self, *args): 217 _swig_setattr(self, IntStack, 'this', _sgfpars.new_IntStack(*args)) 213 218 _swig_setattr(self, IntStack, 'thisown', 1) 214 def push(*args): return apply(_sgfpars.IntStack_push,args) 215 def pop(*args): return apply(_sgfpars.IntStack_pop,args) 216 def top(*args): return apply(_sgfpars.IntStack_top,args) 217 def nonempty(*args): return apply(_sgfpars.IntStack_nonempty,args) 218 def __del__(self, destroy= _sgfpars.delete_IntStack): 219 try: 220 if self.thisown: destroy(self) 221 except: pass 222 def __repr__(self): 223 return "<C IntStack instance at %s>" % (self.this,) 219 def push(*args): return _sgfpars.IntStack_push(*args) 220 def pop(*args): return _sgfpars.IntStack_pop(*args) 221 def top(*args): return _sgfpars.IntStack_top(*args) 222 def nonempty(*args): return _sgfpars.IntStack_nonempty(*args) 223 def __del__(self, destroy=_sgfpars.delete_IntStack): 224 try: 225 if self.thisown: destroy(self) 226 except: pass 224 227 225 228 class IntStackPtr(IntStack): 226 def __init__(self, this):229 def __init__(self, this): 227 230 _swig_setattr(self, IntStack, 'this', this) 228 231 if not hasattr(self,"thisown"): _swig_setattr(self, IntStack, 'thisown', 0) … … 235 238 __swig_getmethods__ = {} 236 239 __getattr__ = lambda self, name: _swig_getattr(self, nodeN, name) 240 def __repr__(self): 241 return "<C nodeN instance at %s>" % (self.this,) 237 242 __swig_setmethods__["data"] = _sgfpars.nodeN_data_set 238 243 __swig_getmethods__["data"] = _sgfpars.nodeN_data_get 239 if _newclass:data = property(_sgfpars.nodeN_data_get, _sgfpars.nodeN_data_set)244 if _newclass:data = property(_sgfpars.nodeN_data_get, _sgfpars.nodeN_data_set) 240 245 __swig_setmethods__["prev"] = _sgfpars.nodeN_prev_set 241 246 __swig_getmethods__["prev"] = _sgfpars.nodeN_prev_get 242 if _newclass:prev = property(_sgfpars.nodeN_prev_get, _sgfpars.nodeN_prev_set)243 def __init__(self, *args):244 _swig_setattr(self, nodeN, 'this', apply(_sgfpars.new_nodeN,args))247 if _newclass:prev = property(_sgfpars.nodeN_prev_get, _sgfpars.nodeN_prev_set) 248 def __init__(self, *args): 249 _swig_setattr(self, nodeN, 'this', _sgfpars.new_nodeN(*args)) 245 250 _swig_setattr(self, nodeN, 'thisown', 1) 246 def __del__(self, destroy= _sgfpars.delete_nodeN): 247 try: 248 if self.thisown: destroy(self) 249 except: pass 250 def __repr__(self): 251 return "<C nodeN instance at %s>" % (self.this,) 251 def __del__(self, destroy=_sgfpars.delete_nodeN): 252 try: 253 if self.thisown: destroy(self) 254 except: pass 252 255 253 256 class nodeNPtr(nodeN): 254 def __init__(self, this):257 def __init__(self, this): 255 258 _swig_setattr(self, nodeN, 'this', this) 256 259 if not hasattr(self,"thisown"): _swig_setattr(self, nodeN, 'thisown', 0) … … 263 266 __swig_getmethods__ = {} 264 267 __getattr__ = lambda self, name: _swig_getattr(self, NodeStack, name) 268 def __repr__(self): 269 return "<C NodeStack instance at %s>" % (self.this,) 265 270 __swig_setmethods__["root"] = _sgfpars.NodeStack_root_set 266 271 __swig_getmethods__["root"] = _sgfpars.NodeStack_root_get 267 if _newclass:root = property(_sgfpars.NodeStack_root_get, _sgfpars.NodeStack_root_set)268 def __init__(self, *args):269 _swig_setattr(self, NodeStack, 'this', apply(_sgfpars.new_NodeStack,args))272 if _newclass:root = property(_sgfpars.NodeStack_root_get, _sgfpars.NodeStack_root_set) 273 def __init__(self, *args): 274 _swig_setattr(self, NodeStack, 'this', _sgfpars.new_NodeStack(*args)) 270 275 _swig_setattr(self, NodeStack, 'thisown', 1) 271 def push(*args): return apply(_sgfpars.NodeStack_push,args) 272 def pop(*args): return apply(_sgfpars.NodeStack_pop,args) 273 def top(*args): return apply(_sgfpars.NodeStack_top,args) 274 def nonempty(*args): return apply(_sgfpars.NodeStack_nonempty,args) 275 def __del__(self, destroy= _sgfpars.delete_NodeStack): 276 try: 277 if self.thisown: destroy(self) 278 except: pass 279 def __repr__(self): 280 return "<C NodeStack instance at %s>" % (self.this,) 276 def push(*args): return _sgfpars.NodeStack_push(*args) 277 def pop(*args): return _sgfpars.NodeStack_pop(*args) 278 def top(*args): return _sgfpars.NodeStack_top(*args) 279 def nonempty(*args): return _sgfpars.NodeStack_nonempty(*args) 280 def __del__(self, destroy=_sgfpars.delete_NodeStack): 281 try: 282 if self.thisown: destroy(self) 283 except: pass 281 284 282 285 class NodeStackPtr(NodeStack): 283 def __init__(self, this):286 def __init__(self, this): 284 287 _swig_setattr(self, NodeStack, 'this', this) 285 288 if not hasattr(self,"thisown"): _swig_setattr(self, NodeStack, 'thisown', 0)
