Inheritance: IDisposable
Ejemplo n.º 1
0
        internal static HandleRef getCPtrAndDisown(ASTBase obj)
        {
            HandleRef ptr = new HandleRef(null, IntPtr.Zero);

            if (obj != null)
            {
                ptr             = obj.swigCPtr;
                obj.swigCMemOwn = false;
            }

            return(ptr);
        }
Ejemplo n.º 2
0
        int replaceChild(long n, ASTBase newChild, bool delreplaced)
        {
            int ret = libsbmlPINVOKE.ASTBasePlugin_replaceChild(swigCPtr, n, ASTBase.getCPtr(newChild), delreplaced);

            return(ret);
        }
Ejemplo n.º 3
0
        int prependChild(ASTBase newChild)
        {
            int ret = libsbmlPINVOKE.ASTBasePlugin_prependChild(swigCPtr, ASTBase.getCPtr(newChild));

            return(ret);
        }
Ejemplo n.º 4
0
        int insertChild(long n, ASTBase newChild)
        {
            int ret = libsbmlPINVOKE.ASTBasePlugin_insertChild(swigCPtr, n, ASTBase.getCPtr(newChild));

            return(ret);
        }
Ejemplo n.º 5
0
        ASTBase getChild(long n)
        {
            ASTBase ret = (ASTBase)libsbml.DowncastASTBase(libsbmlPINVOKE.ASTBasePlugin_getChild(swigCPtr, n), false);

            return(ret);
        }
Ejemplo n.º 6
0
        int addChild(ASTBase child)
        {
            int ret = libsbmlPINVOKE.ASTBasePlugin_addChild(swigCPtr, ASTBase.getCPtr(child));

            return(ret);
        }
Ejemplo n.º 7
0
 /** */
 /* libsbml-internal */
 public int prependChild(ASTBase newChild)
 {
     int ret = libsbmlPINVOKE.ASTBasePlugin_prependChild(swigCPtr, ASTBase.getCPtr(newChild));
     return ret;
 }
Ejemplo n.º 8
0
        public virtual ASTBase getFunction()
        {
            ASTBase ret = (ASTBase)libsbml.DowncastASTBase(libsbmlPINVOKE.ASTBase_getFunction(swigCPtr), false);

            return(ret);
        }
Ejemplo n.º 9
0
 void connectToParent(ASTBase astbase)
 {
     libsbmlPINVOKE.ASTBasePlugin_connectToParent(swigCPtr, ASTBase.getCPtr(astbase));
 }
Ejemplo n.º 10
0
        internal static HandleRef getCPtrAndDisown(ASTBase obj)
        {
            HandleRef ptr = new HandleRef(null, IntPtr.Zero);

            if (obj != null)
            {
            ptr             = obj.swigCPtr;
            obj.swigCMemOwn = false;
            }

            return ptr;
        }
Ejemplo n.º 11
0
 internal static HandleRef getCPtr(ASTBase obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Ejemplo n.º 12
0
        public static ASTBase DowncastASTBase(IntPtr cPtr, bool owner)
        {
            if (cPtr.Equals(IntPtr.Zero)) return null;

            ASTBase ab = new ASTBase(cPtr,false);
            switch( ab.getTypeCode() )
            {
            default:
            case (int)libsbml.AST_TYPECODE_BASE:
            return new ASTBase(cPtr, owner);
            /*
            case (int)libsbml.AST_TYPECODE_CN_BASE:
            return new ASTCnBase(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_FUNCTION_BASE:
            return new ASTFunctionBase(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_NUMBER:
            return new ASTNumber(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_CN_INTEGER:
            return new ASTCnIntegerNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_CN_EXPONENTIAL:
            return new ASTCnExponentialNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_CN_RATIONAL:
            return new ASTCnRationalNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_CN_REAL:
            return new ASTCnRealNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_CSYMBOL:
            return new ASTCSymbol(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_CSYMBOL_AVOGADRO:
            return new ASTCSymbolAvogadroNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_CSYMBOL_DELAY:
            return new ASTCSymbolDelayNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_CSYMBOL_TIME:
            return new ASTCSymbolTimeNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_FUNCTION:
            return new ASTFunction(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_FUNCTION_UNARY:
            return new ASTUnaryFunctionNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_FUNCTION_BINARY:
            return new ASTBinaryFunctionNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_FUNCTION_NARY:
            return new ASTNaryFunctionNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_FUNCTION_PIECEWISE:
            return new ASTPiecewiseFunctionNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_FUNCTION_LAMBDA:
            return new ASTLambdaFunctionNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_FUNCTION_CI:
            return new ASTCiFunctionNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_FUNCTION_SEMANTIC:
            return new ASTSemanticsNode(cPtr, owner);
            case (int)libsbml.AST_TYPECODE_FUNCTION_QUALIFIER:
            return new ASTQualifierNode(cPtr, owner);*/
            case (int)libsbml.AST_TYPECODE_ASTNODE:
            return new ASTNode(cPtr, owner);

            }
            //return new ASTBase(cPtr, owner);
        }
Ejemplo n.º 13
0
 /**
    * Sets the parent SBML object of this plugin object to
    * this object and child elements (if any).
    * (Creates a child-parent relationship by this plugin object)
    *
    * This function is called when this object is created by
    * the parent element.
    * Subclasses must override this this function if they have one
    * or more child elements. Also, ASTBasePlugin::connectToParent(@if java SBase sbase@endif)
    * must be called in the overridden function.
    *
    * @param sbase the SBase object to use
    *
    * @see setSBMLDocument
    * @see enablePackageInternal
    */
 /* libsbml-internal */
 public void connectToParent(ASTBase astbase)
 {
     libsbmlPINVOKE.ASTBasePlugin_connectToParent(swigCPtr, ASTBase.getCPtr(astbase));
 }
Ejemplo n.º 14
0
 /** */
 /* libsbml-internal */
 public int addChild(ASTBase child)
 {
     int ret = libsbmlPINVOKE.ASTBasePlugin_addChild(swigCPtr, ASTBase.getCPtr(child));
     return ret;
 }
Ejemplo n.º 15
0
 /** */
 /* libsbml-internal */
 public int replaceChild(long n, ASTBase newChild)
 {
     int ret = libsbmlPINVOKE.ASTBasePlugin_replaceChild(swigCPtr, n, ASTBase.getCPtr(newChild));
     return ret;
 }
Ejemplo n.º 16
0
 internal static HandleRef getCPtr(ASTBase obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
Ejemplo n.º 17
0
        ASTBase getParentASTObject()
        {
            ASTBase ret = (ASTBase)libsbml.DowncastASTBase(libsbmlPINVOKE.ASTBasePlugin_getParentASTObject__SWIG_0(swigCPtr), false);

            return(ret);
        }
Ejemplo n.º 18
0
        ASTBase getMath()
        {
            ASTBase ret = (ASTBase)libsbml.DowncastASTBase(libsbmlPINVOKE.ASTBasePlugin_getMath(swigCPtr), false);

            return(ret);
        }
Ejemplo n.º 19
0
        ASTBase deepCopy()
        {
            ASTBase ret = (ASTBase)libsbml.DowncastASTBase(libsbmlPINVOKE.ASTBase_deepCopy(swigCPtr), false);

            return(ret);
        }
Ejemplo n.º 20
0
 /** */
 /* libsbml-internal */
 public new int insertChild(long n, ASTBase newChild)
 {
     int ret = libsbmlPINVOKE.ASTBasePlugin_insertChild(swigCPtr, n, ASTBase.getCPtr(newChild));
     return ret;
 }