Gaudi Framework, version v25r2

Home   Generated: Wed Jun 4 2014
 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
 varName
 
 local
 
 expandVars
 
 log
 

Detailed Description

Class for manipulating with environment scalars.

Definition at line 295 of file Variable.py.

Constructor & Destructor Documentation

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

Definition at line 298 of file Variable.py.

299  def __init__(self, name, local=False):
300  super(Scalar, self).__init__(name, local)
301  self.val = ''

Member Function Documentation

def EnvConfig.Variable.Scalar.__str__ (   self)

Definition at line 339 of file Variable.py.

340  def __str__(self):
341  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 327 of file Variable.py.

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

Definition at line 302 of file Variable.py.

303  def name(self):
304  '''Returns the name of the scalar.'''
305  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 331 of file Variable.py.

332  def prepend(self, value, separator=':', environment=None):# pylint: disable=W0613
333  '''Adds value(s) at the beginning of the scalar.'''
334  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 321 of file Variable.py.

322  def remove(self, value, separator=':', regexp=True):# pylint: disable=W0613
323  '''Removes value(s) from the scalar. If value is not found, removal is canceled.'''
324  value = self.search(value)
325  for val in value:
326  self.val = self.val.replace(val, '')
def EnvConfig.Variable.Scalar.remove_regexp (   self,
  value,
  separator = ':' 
)

Definition at line 318 of file Variable.py.

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

Definition at line 335 of file Variable.py.

336  def search(self, expr):
337  '''Searches in scalar`s values for a match'''
338  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 306 of file Variable.py.

307  def set(self, value, separator=':', environment=None):# pylint: disable=W0613
308  '''Sets the value of the scalar. Any previous value is overwritten.'''
309  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 310 of file Variable.py.

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

Definition at line 314 of file Variable.py.

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

Member Data Documentation

EnvConfig.Variable.Scalar.val

Definition at line 300 of file Variable.py.


The documentation for this class was generated from the following file:
Generated at Wed Jun 4 2014 14:49:04 for Gaudi Framework, version v25r2 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004