Gaudi Framework, version v23r6

Home   Generated: Wed Jan 30 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
EnvConfig.Variable.Scalar Class Reference
Inheritance diagram for EnvConfig.Variable.Scalar:
Inheritance graph
[legend]
Collaboration diagram for EnvConfig.Variable.Scalar:
Collaboration graph
[legend]

Public Member Functions

def __init__
 
def name
 
def set
 
def unset
 
def value
 
def remove_regexp
 
def remove
 
def append
 
def prepend
 
def search
 
def __str__
 
- Public Member Functions inherited from EnvConfig.Variable.VariableBase
def __init__
 
def process
 

Public Attributes

 val
 
- Public Attributes inherited from EnvConfig.Variable.VariableBase
 report
 
 varName
 
 local
 
 expandVars
 

Detailed Description

Class for manipulating with environment scalars.

Definition at line 288 of file Variable.py.

Constructor & Destructor Documentation

def EnvConfig.Variable.Scalar.__init__ (   self,
  name,
  local = False,
  report = None 
)

Definition at line 291 of file Variable.py.

292  def __init__(self, name, local=False, report=None):
293  super(Scalar, self).__init__(name, local, report)
294  self.val = ''

Member Function Documentation

def EnvConfig.Variable.Scalar.__str__ (   self)

Definition at line 332 of file Variable.py.

333  def __str__(self):
334  return self.val
def EnvConfig.Variable.Scalar.append (   self,
  value,
  separator = ':',
  environment = None 
)
Adds value(s) at the end of the scalar.

Definition at line 320 of file Variable.py.

321  def append(self, value, separator=':', environment=None):# pylint: disable=W0613
322  '''Adds value(s) at the end of the scalar.'''
323  self.val += self.process(value, environment)
def EnvConfig.Variable.Scalar.name (   self)
Returns the name of the scalar.

Definition at line 295 of file Variable.py.

296  def name(self):
297  '''Returns the name of the scalar.'''
298  return self.varName
def EnvConfig.Variable.Scalar.prepend (   self,
  value,
  separator = ':',
  environment = None 
)
Adds value(s) at the beginning of the scalar.

Definition at line 324 of file Variable.py.

325  def prepend(self, value, separator=':', environment=None):# pylint: disable=W0613
326  '''Adds value(s) at the beginning of the scalar.'''
327  self.val = self.process(value, environment) + self.val
def EnvConfig.Variable.Scalar.remove (   self,
  value,
  separator = ':',
  regexp = True 
)
Removes value(s) from the scalar. If value is not found, removal is canceled.

Definition at line 314 of file Variable.py.

315  def remove(self, value, separator=':', regexp=True):# pylint: disable=W0613
316  '''Removes value(s) from the scalar. If value is not found, removal is canceled.'''
317  value = self.search(value)
318  for val in value:
319  self.val = self.val.replace(val, '')
def EnvConfig.Variable.Scalar.remove_regexp (   self,
  value,
  separator = ':' 
)

Definition at line 311 of file Variable.py.

312  def remove_regexp(self, value, separator=':'):
313  self.remove(value, separator, True)
def EnvConfig.Variable.Scalar.search (   self,
  expr 
)
Searches in scalar`s values for a match

Definition at line 328 of file Variable.py.

329  def search(self, expr):
330  '''Searches in scalar`s values for a match'''
331  return re.findall(expr, self.val)
def EnvConfig.Variable.Scalar.set (   self,
  value,
  separator = ':',
  environment = None 
)
Sets the value of the scalar. Any previous value is overwritten.

Definition at line 299 of file Variable.py.

300  def set(self, value, separator=':', environment=None):# pylint: disable=W0613
301  '''Sets the value of the scalar. Any previous value is overwritten.'''
302  self.val = self.process(value, environment)
def EnvConfig.Variable.Scalar.unset (   self,
  value,
  separator = ':',
  environment = None 
)
Sets the value of the variable to empty. Any previous value is overwritten.

Definition at line 303 of file Variable.py.

304  def unset(self, value, separator=':', environment=None):# pylint: disable=W0613
305  '''Sets the value of the variable to empty. Any previous value is overwritten.'''
306  self.val = ''
def EnvConfig.Variable.Scalar.value (   self,
  asString = False,
  separator = ':' 
)
Returns values of the scalar.

Definition at line 307 of file Variable.py.

308  def value(self, asString=False, separator=':'):# pylint: disable=W0613
309  '''Returns values of the scalar.'''
310  return self.val

Member Data Documentation

EnvConfig.Variable.Scalar.val

Definition at line 293 of file Variable.py.


The documentation for this class was generated from the following file:
Generated at Wed Jan 30 2013 17:13:49 for Gaudi Framework, version v23r6 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004