Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
CMFCore.Expression.Expression Class Reference
Inheritance diagram for CMFCore.Expression.Expression:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.Expression.Expression:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __call__

Public Attributes

 text

Static Public Attributes

string text = ''
tuple security = ClassSecurityInfo()

Static Private Attributes

 _v_compiled = None

Detailed Description

Definition at line 28 of file Expression.py.


Constructor & Destructor Documentation

def CMFCore.Expression.Expression.__init__ (   self,
  text 
)

Definition at line 35 of file Expression.py.

00035 
00036     def __init__(self, text):
00037         self.text = text
00038         if text.strip():
00039             self._v_compiled = getEngine().compile(text)


Member Function Documentation

def CMFCore.Expression.Expression.__call__ (   self,
  econtext 
)

Definition at line 40 of file Expression.py.

00040 
00041     def __call__(self, econtext):
00042         if not self.text.strip():
00043             return ''
00044         compiled = self._v_compiled
00045         if compiled is None:
00046             compiled = self._v_compiled = getEngine().compile(self.text)
00047         # ?? Maybe expressions should manipulate the security
00048         # context stack.
00049         res = compiled(econtext)
00050         if isinstance(res, Exception):
00051             raise res
00052         return res
00053 
00054 InitializeClass(Expression)
00055 

Here is the caller graph for this function:


Member Data Documentation

Definition at line 31 of file Expression.py.

tuple CMFCore.Expression.Expression.security = ClassSecurityInfo() [static]

Definition at line 33 of file Expression.py.

string CMFCore.Expression.Expression.text = '' [static]

Definition at line 30 of file Expression.py.

Definition at line 36 of file Expression.py.


The documentation for this class was generated from the following file: