libsbml.Constraint.getMath C# (CSharp) Method

getMath() public method

public getMath ( ) : ASTNode
return ASTNode
        public ASTNode getMath()
        {
            IntPtr cPtr = libsbmlPINVOKE.Constraint_getMath(swigCPtr);
            ASTNode ret = (cPtr == IntPtr.Zero) ? null : new ASTNode(cPtr, false);
            return ret;
        }

Usage Example

 public void test_Constraint_copyConstructor()
 {
     Constraint o1 = new Constraint(2,4);
       o1.setMetaId("c");
       assertTrue( o1.getMetaId() ==  "c" );
       XMLNode text = XMLNode.convertStringToXMLNode(" Some text ");
       XMLTriple triple = new XMLTriple("p", "http://www.w3.org/1999/xhtml", "");
       XMLAttributes att = new XMLAttributes();
       XMLNamespaces xmlns = new XMLNamespaces();
       xmlns.add("http://www.w3.org/1999/xhtml");
       XMLNode p = new XMLNode(triple,att,xmlns);
       p.addChild(text);
       XMLTriple triple1 = new XMLTriple("message", "", "");
       XMLAttributes att1 = new XMLAttributes();
       XMLNode message = new XMLNode(triple1,att1);
       message.addChild(p);
       ASTNode math = new ASTNode(libsbml.AST_CONSTANT_PI);
       o1.setMath(math);
       o1.setMessage(message);
       math = null;
       message = null;
       XMLNode msg;
       assertTrue( o1.getMath() != null );
       msg = o1.getMessage();
       assertTrue( msg != null );
       Constraint o2 = new Constraint(o1);
       assertTrue( o2.getMetaId() ==  "c" );
       assertTrue( o2.getMath() != null );
       msg = o2.getMessage();
       assertTrue( msg != null );
       assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() );
       o2 = null;
       o1 = null;
 }