The Assimilation Project  based on Assimilation version
cma.graphnodeexpression.GraphNodeExpression Class Reference
Inheritance diagram for cma.graphnodeexpression.GraphNodeExpression:
Collaboration diagram for cma.graphnodeexpression.GraphNodeExpression:

Public Member Functions

def __init__ (self)

Static Public Member Functions

def evaluate (expression, context)
def functioncall (expression, context)
def FunctionDescriptions ()
def RegisterFun (function)

Static Public Attributes

dictionary functions = {}

Detailed Description

We implement Graph node expressions - we are't a real class

Definition at line 30 of file

Constructor & Destructor Documentation

def cma.graphnodeexpression.GraphNodeExpression.__init__ (   self)

Definition at line 33 of file

Member Function Documentation

def cma.graphnodeexpression.GraphNodeExpression.evaluate (   expression,
Evaluate an expression.
It can be:
    None - return None
    'some-value -- return some-value (it's a constant)
    or an expression to find in values or graphnodes
    or @functionname(args) - for defined functions...

    We may add other kinds of expressions in the future...

Definition at line 37 of file

def cma.graphnodeexpression.GraphNodeExpression.functioncall (   expression,
Performs a function call for our expression language

Figures out the function name, and the arguments and then
calls that function with those arguments.

All our defined functions take an argv argument string first, then an
ExpressionContext argument.

This parsing is incredibly primitive.  Feel free to improve it ;-)

Definition at line 157 of file

def cma.graphnodeexpression.GraphNodeExpression.FunctionDescriptions ( )
Return a list of tuples of (funcname, docstring) for all our GraphNodeExpression
defined functions.  The list is sorted by function name.

Definition at line 201 of file

def cma.graphnodeexpression.GraphNodeExpression.RegisterFun (   function)

Definition at line 213 of file

Field Documentation

dictionary cma.graphnodeexpression.GraphNodeExpression.functions = {}

Definition at line 32 of file

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