view python/ppci/core/value.py @ 118:db8aafe00d27

Added elf file read scripts
author Windel Bouwman
date Sat, 12 Jan 2013 09:39:23 +0100
parents 9e552d34bd60
children
line wrap: on
line source


class Value:
   def __init__(self, vty=None):
      self.valueType = vty
      self.name = None
   def getContext(self):
      return self.valueType.context
   def dump(self):
      print(self)

   def getName(self):
      return self.name
   def setName(self, name):
      if not self.name and not name:
         return
      self.name = name

      if self.st:
         pass
      else:
         pass
   Name = property(getName, setName)

class Constant(Value):
   def __init__(self, value, vty):
      super().__init__(vty)
      self.value = value
      print('new constant value: ', value)