~pyuppaal-developers/pyuppaal/trunk

« back to all changes in this revision

Viewing changes to pyuppaal/pyuppaal.py

  • Committer: Kenneth Yrke Jørgensen
  • Date: 2011-05-10 13:11:42 UTC
  • mfrom: (91.1.4 pyuppaal)
  • Revision ID: mail@yrke.dk-20110510131142-depbgff443o1gui0
Merged lp:~boegholm/pyuppaal/780495-fix for bugfix of bug #780495

Show diffs side-by-side

added added

removed removed

Lines of Context:
209
209
 
210
210
class Location:
211
211
    @require_keyword_args(1)
212
 
    def __init__(self, invariant=None, committed=False, name=None, id = None,
 
212
    def __init__(self, invariant=None, urgent=False, committed=False, name=None, id = None,
213
213
        xpos=0, ypos=0):
214
214
        self.invariant = Label("invariant", invariant)
215
215
        self.committed = committed
 
216
        self.urgent = urgent
216
217
        self.name = Label("name", name)
217
218
        self.id = id
218
219
        self.xpos = xpos
232
233
      %s
233
234
      %s
234
235
      %s
 
236
      %s
235
237
    </location>""" % (self.id, self.xpos, self.ypos, namexml, invariantxml,
236
 
        self.committed and '<committed />' or '')
 
238
        self.committed and '<committed />' or '', self.urgent and '<urgent />' or '')
237
239
 
238
240
class Branchpoint:
239
241
    @require_keyword_args(1)
335
337
                    )
336
338
            if locationxml.find("committed") != None:
337
339
                location.committed = True
 
340
            if locationxml.find("urgent") != None:
 
341
                location.urgent = True
338
342
            for labelxml in locationxml.getiterator("label"):
339
343
                if labelxml.get('kind') == 'invariant':
340
344
                    location.invariant = Label("invariant", labelxml.text)