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
pyparsing.OnlyOnce Class Reference
Inheritance diagram for pyparsing.OnlyOnce:
Inheritance graph
[legend]
Collaboration diagram for pyparsing.OnlyOnce:
Collaboration graph
[legend]

Public Member Functions

def __init__
 
def __call__
 
def reset
 

Public Attributes

 callable
 
 called
 

Detailed Description

Wrapper for parse actions, to ensure they are only called once.

Definition at line 3065 of file pyparsing.py.

Constructor & Destructor Documentation

def pyparsing.OnlyOnce.__init__ (   self,
  methodCall 
)

Definition at line 3067 of file pyparsing.py.

3068  def __init__(self, methodCall):
3069  self.callable = ParserElement._normalizeParseActionArgs(methodCall)
self.called = False

Member Function Documentation

def pyparsing.OnlyOnce.__call__ (   self,
  s,
  l,
  t 
)

Definition at line 3070 of file pyparsing.py.

3071  def __call__(self,s,l,t):
3072  if not self.called:
3073  results = self.callable(s,l,t)
3074  self.called = True
3075  return results
raise ParseException(s,l,"")
def pyparsing.OnlyOnce.reset (   self)

Definition at line 3076 of file pyparsing.py.

3077  def reset(self):
3078  self.called = False

Member Data Documentation

pyparsing.OnlyOnce.callable

Definition at line 3068 of file pyparsing.py.

pyparsing.OnlyOnce.called

Definition at line 3069 of file pyparsing.py.


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