| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

3067
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.

3070
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.

3076
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:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/cmake/cmt2cmake/pyparsing.py