The Assimilation Project  based on Assimilation version 1.1.7.1474836767
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 graphnodeexpression.py.

Constructor & Destructor Documentation

def cma.graphnodeexpression.GraphNodeExpression.__init__ (   self)

Definition at line 33 of file graphnodeexpression.py.

Member Function Documentation

def cma.graphnodeexpression.GraphNodeExpression.evaluate (   expression,
  context 
)
static
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 graphnodeexpression.py.

def cma.graphnodeexpression.GraphNodeExpression.functioncall (   expression,
  context 
)
static
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 graphnodeexpression.py.

def cma.graphnodeexpression.GraphNodeExpression.FunctionDescriptions ( )
static
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 graphnodeexpression.py.

def cma.graphnodeexpression.GraphNodeExpression.RegisterFun (   function)
static

Definition at line 213 of file graphnodeexpression.py.

Field Documentation

dictionary cma.graphnodeexpression.GraphNodeExpression.functions = {}
static

Definition at line 32 of file graphnodeexpression.py.


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