Gaudi Framework, version v23r9

Home   Generated: Thu Jul 18 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
 varName
 
 local
 
 expandVars
 
 log
 

Detailed Description

Class for manipulating with environment scalars.

Definition at line 293 of file Variable.py.

Constructor & Destructor Documentation

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

Definition at line 296 of file Variable.py.

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

Member Function Documentation

def EnvConfig.Variable.Scalar.__str__ (   self)

Definition at line 337 of file Variable.py.

338  def __str__(self):
339  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 325 of file Variable.py.

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

Definition at line 300 of file Variable.py.

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

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

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

Definition at line 316 of file Variable.py.

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

Definition at line 333 of file Variable.py.

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

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

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

Definition at line 312 of file Variable.py.

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

Member Data Documentation

EnvConfig.Variable.Scalar.val

Definition at line 298 of file Variable.py.


The documentation for this class was generated from the following file:
Generated at Thu Jul 18 2013 12:18:13 for Gaudi Framework, version v23r9 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004