libsbmlcs.FunctionDefinition.isSetMath C# (CSharp) Method

isSetMath() public method

public isSetMath ( ) : bool
return bool
        public bool isSetMath()
        {
            bool ret = libsbmlPINVOKE.FunctionDefinition_isSetMath(swigCPtr);
            return ret;
        }

Usage Example

Ejemplo n.º 1
0
    private static void printFunctionDefinition(int n, FunctionDefinition fd)
    {
        ASTNode math;
        string formula;

        if (fd.isSetMath())
        {
            Console.Write("FunctionDefinition " + n + ", " + fd.getId());

            math = fd.getMath();

            /* Print function arguments. */
            if (math.getNumChildren() > 1)
            {
                Console.Write("(" + (math.getLeftChild()).getName());

                for (n = 1; n < math.getNumChildren() - 1; ++n)
                {
                    Console.Write(", " + (math.getChild(n)).getName());
                }
            }

            Console.Write(") := ");

            /* Print function body. */
            if (math.getNumChildren() == 0)
            {
                Console.Write("(no body defined)");
            }
            else
            {
                math = math.getChild(math.getNumChildren() - 1);
                formula = libsbml.formulaToString(math);
                Console.Write(formula + Environment.NewLine);

            }
        }
    }
All Usage Examples Of libsbmlcs.FunctionDefinition::isSetMath