• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# libsbmlcs.SBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中libsbmlcs.SBase的典型用法代码示例。如果您正苦于以下问题:C# SBase类的具体用法?C# SBase怎么用?C# SBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SBase类属于libsbmlcs命名空间,在下文中一共展示了SBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: printAnnotation

    private static void printAnnotation(SBase sb)
    {
        string id = "";

        if (sb.isSetId())
        {
            id = sb.getId();
        }
        printAnnotation(sb, id);
    }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:10,代码来源:printAnnotation.cs


示例2: checkCompatibility

 /** */
 /* libsbml-internal */
 public int checkCompatibility(SBase arg0)
 {
     int ret = libsbmlPINVOKE.SBase_checkCompatibility(swigCPtr, SBase.getCPtr(arg0));
     return ret;
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:7,代码来源:SBase.cs


示例3: getCPtr

 internal static HandleRef getCPtr(SBase obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:4,代码来源:SBase.cs


示例4: matchesRequiredSBMLNamespacesForAddition

 /**
    * Returns @c true if this object's set of XML namespaces are a subset
    * of the given object's XML namespaces.
    *
    * *
  *
  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
  * information.  It is used to communicate the SBML Level, Version, and (in
  * Level 3) packages used in addition to SBML Level 3 Core.  A
  * common approach to using libSBML's SBMLNamespaces facilities is to create an
  * SBMLNamespaces object somewhere in a program once, then hand that object
  * as needed to object constructors that accept SBMLNamespaces as arguments.
  *
  *
    *
    * @param sb an object to compare with respect to namespaces
    *
    * @return bool, @c true if this object's collection of namespaces is
    * a subset of @p sb's, @c false otherwise.
    */
 public bool matchesRequiredSBMLNamespacesForAddition(SBase sb)
 {
     bool ret = libsbmlPINVOKE.SBase_matchesRequiredSBMLNamespacesForAddition__SWIG_0(swigCPtr, SBase.getCPtr(sb));
     return ret;
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:25,代码来源:SBase.cs


示例5: testClone

        static void testClone(SBase s)
        {
            string ename = s.getElementName();
              SBase c = s.clone();

              if ( c is Compartment ) { Compartment x = (s as Compartment).clone(); c = x; }
              else if ( c is CompartmentType ) { CompartmentType x = (s as CompartmentType).clone(); c = x; }
              else if ( c is Constraint ) { Constraint x = (s as Constraint).clone(); c = x; }
              else if ( c is Delay ) { Delay x = (s as Delay).clone(); c = x; }
              else if ( c is Event ) { Event x = (s as Event).clone(); c = x; }
              else if ( c is EventAssignment ) { EventAssignment x = (s as EventAssignment).clone(); c = x; }
              else if ( c is FunctionDefinition ) { FunctionDefinition x = (s as FunctionDefinition).clone(); c = x; }
              else if ( c is InitialAssignment ) { InitialAssignment x = (s as InitialAssignment).clone(); c = x; }
              else if ( c is KineticLaw ) { KineticLaw x = (s as KineticLaw).clone(); c = x; }
              // currently return type of ListOf::clone() is SBase
              else if ( c is ListOf ) { SBase x = (s as ListOf).clone(); c = x; }
              else if ( c is Model ) { Model x = (s as Model).clone(); c = x; }
              else if ( c is Parameter ) { Parameter x = (s as Parameter).clone(); c = x; }
              else if ( c is Reaction ) { Reaction x = (s as Reaction).clone(); c = x; }
              else if ( c is AlgebraicRule ) { AlgebraicRule x = (s as AlgebraicRule).clone(); c = x; }
              else if ( c is AssignmentRule ) { AssignmentRule x = (s as AssignmentRule).clone(); c = x; }
              else if ( c is RateRule ) { RateRule x = (s as RateRule).clone(); c = x; }
              else if ( c is SBMLDocument ) { SBMLDocument x = (s as SBMLDocument).clone(); c = x; }
              else if ( c is Species ) { Species x = (s as Species).clone(); c = x; }
              else if ( c is SpeciesReference ) { SpeciesReference x = (s as SpeciesReference).clone(); c = x; }
              else if ( c is SpeciesType ) { SpeciesType x = (s as SpeciesType).clone(); c = x; }
              else if ( c is SpeciesReference ) { SpeciesReference x = (s as SpeciesReference).clone(); c = x; }
              else if ( c is StoichiometryMath ) { StoichiometryMath x = (s as StoichiometryMath).clone(); c = x; }
              else if ( c is Trigger ) { Trigger x = (s as Trigger).clone(); c = x; }
              else if ( c is Unit ) { Unit x = (s as Unit).clone(); c = x; }
              else if ( c is UnitDefinition ) { UnitDefinition x = (s as UnitDefinition).clone(); c = x; }
              else if ( c is ListOfCompartmentTypes ) { ListOfCompartmentTypes x = (s as ListOfCompartmentTypes).clone(); c = x; }
              else if ( c is ListOfCompartments ) { ListOfCompartments x = (s as ListOfCompartments).clone(); c = x; }
              else if ( c is ListOfConstraints ) { ListOfConstraints x = (s as ListOfConstraints).clone(); c = x; }
              else if ( c is ListOfEventAssignments ) { ListOfEventAssignments x = (s as ListOfEventAssignments).clone(); c = x; }
              else if ( c is ListOfEvents ) { ListOfEvents x = (s as ListOfEvents).clone(); c = x; }
              else if ( c is ListOfFunctionDefinitions ) { ListOfFunctionDefinitions x = (s as ListOfFunctionDefinitions).clone(); c = x; }
              else if ( c is ListOfInitialAssignments ) { ListOfInitialAssignments x = (s as ListOfInitialAssignments).clone(); c = x; }
              else if ( c is ListOfParameters ) { ListOfParameters x = (s as ListOfParameters).clone(); c = x; }
              else if ( c is ListOfReactions ) { ListOfReactions x = (s as ListOfReactions).clone(); c = x; }
              else if ( c is ListOfRules ) { ListOfRules x = (s as ListOfRules).clone(); c = x; }
              else if ( c is ListOfSpecies ) { ListOfSpecies x = (s as ListOfSpecies).clone(); c = x; }
              else if ( c is ListOfSpeciesReferences ) { ListOfSpeciesReferences x = (s as ListOfSpeciesReferences).clone(); c = x; }
              else if ( c is ListOfSpeciesTypes ) { ListOfSpeciesTypes x = (s as ListOfSpeciesTypes).clone(); c = x; }
              else if ( c is ListOfUnitDefinitions ) { ListOfUnitDefinitions x = (s as ListOfUnitDefinitions).clone(); c = x; }
              else if ( c is ListOfUnits ) { ListOfUnits x = (s as ListOfUnits).clone(); c = x; }
              else
              {
            ERR("[testClone] Error: (" + ename + ") : clone() failed.");
            return;
              }

              if ( c == null)
              {
            ERR("[testClone] Error: (" + ename + ") : clone() failed.");
            return;
              }

              string enameClone = c.getElementName();

              if ( ename == enameClone )
              {
            //Console.Out.WriteLine("[testClone] OK: (" + ename + ") clone(" + enameClone + ") : type match.");
            OK();
              }
              else
              {
            ERR("[testClone] Error: (" + ename + ") clone(" + enameClone + ") : type mismatch.");
              }
        }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:70,代码来源:TestRW.cs


示例6: connectToParent

 /** */
 /* libsbml-internal */
 public new void connectToParent(SBase sbase)
 {
     libsbmlPINVOKE.SBasePlugin_connectToParent(swigCPtr, SBase.getCPtr(sbase));
 }
开发者ID:kirichoi,项目名称:roadrunner,代码行数:6,代码来源:SBasePlugin.cs


示例7: insert

 /**
    * Inserts an item at a given position in this ListOf's list of items.
    *
    * This variant of the method makes a clone of the @p item handed to it.
    * This means that when the ListOf is destroyed, the original @p item will
    * <em>not</em> be destroyed.
    *
    * @param location the location in the list where to insert the item.
    * @param item the item to be inserted to the list.
    *
    *
  * @return integer value indicating success/failure of the
  * function.  @if clike The value is drawn from the
  * enumeration #OperationReturnValues_t. @endif The possible values
  * returned by this function are:
  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS [email protected]
    * @li @link libsbml#LIBSBML_INVALID_OBJECT [email protected]
    *
    * @see insertAndOwn(int location, SBase item)
    */
 public int insert(int location, SBase item)
 {
     int ret = libsbmlPINVOKE.ListOf_insert(swigCPtr, location, SBase.getCPtr(item));
     return ret;
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:25,代码来源:ListOf.cs


示例8: filter

 public virtual bool filter(SBase element)
 {
     bool ret = (SwigDerivedClassHasMethod("filter", swigMethodTypes0) ? libsbmlPINVOKE.ElementFilter_filterSwigExplicitElementFilter(swigCPtr, SBase.getCPtr(element)) : libsbmlPINVOKE.ElementFilter_filter(swigCPtr, SBase.getCPtr(element)));
     return ret;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:5,代码来源:ElementFilter.cs


示例9: printNotes

    private static void printNotes(SBase sb, string id)
    {
        if (!sb.isSetNotes()) return;

        Console.WriteLine("----- " + sb.getElementName() + " (" + id
        + ") notes -----");
        Console.WriteLine(sb.getNotesString());
        Console.WriteLine();
    }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:9,代码来源:printNotes.cs


示例10: isValidTypeForList

 /** */
 public new bool isValidTypeForList(SBase item)
 {
     bool ret = libsbmlPINVOKE.SBasePlugin_isValidTypeForList(swigCPtr, SBase.getCPtrAndDisown(item));
     return ret;
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:6,代码来源:SBasePlugin.cs


示例11: setOrAppendNotes

 void setOrAppendNotes(SBase sbase, string note)
 {
     if (sbase.isSetNotes ()) {
         sbase.appendNotes (note);
     } else {
         sbase.setNotes (note);
     }
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:8,代码来源:TestSBase.cs


示例12: append

 /**
    * Adds an item to the end of this ListOf's list of items.
    *
    * This method makes a clone of the @p item handed to it.  This means that
    * when the ListOf object is destroyed, the original items will not be
    * destroyed.  For a method with an alternative ownership behavior, see the
    * ListOf::appendAndOwn(@if java [email protected]) method.
    *
    * @param item the item to be added to the list.
    *
    *
  * @return integer value indicating success/failure of the
  * function.  @if clike The value is drawn from the
  * enumeration #OperationReturnValues_t. @endif The possible values
  * returned by this function are:
  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS [email protected]
    * @li @link libsbml#LIBSBML_INVALID_OBJECT [email protected]
    *
    * @see appendAndOwn(SBase disownedItem)
    * @see appendFrom(ListOf list)
    */
 public int append(SBase item)
 {
     int ret = libsbmlPINVOKE.ListOf_append(swigCPtr, SBase.getCPtr(item));
     return ret;
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:26,代码来源:ListOf.cs


示例13: appendAndOwn

 /**
    * Adds an item to the end of this ListOf's list of items.
    *
    * This method does not clone the @p disownedItem handed to it; instead, it assumes
    * ownership of it.  This means that when the ListOf is destroyed, the item
    * will be destroyed along with it.  For a method with an alternative
    * ownership behavior, see the ListOf::append(SBase item) method.
    *
    * @param disownedItem the item to be added to the list.
    *
    *
  * @return integer value indicating success/failure of the
  * function.  @if clike The value is drawn from the
  * enumeration #OperationReturnValues_t. @endif The possible values
  * returned by this function are:
  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS [email protected]
    * @li @link libsbml#LIBSBML_INVALID_OBJECT [email protected]
    *
    * @see append(SBase item)
    * @see appendFrom(ListOf list)
    */
 public int appendAndOwn(SBase disownedItem)
 {
     int ret = libsbmlPINVOKE.ListOf_appendAndOwn(swigCPtr, SBase.getCPtrAndDisown(disownedItem));
     return ret;
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:26,代码来源:ListOf.cs


示例14: parseCVTerms

 /**
    * Takes a list of CVTerm objects and creates a complete SBML annotation
    * around it.
    *
    * This essentially takes the given SBML object, reads out the CVTerm
    * objects attached to it, calls @if clike createRDFAnnotation()@else
    * RDFAnnotationParser::createRDFAnnotation()@endif to create an RDF
    * annotation to hold the terms, and finally calls @if clike
    * createAnnotation()@else
    * RDFAnnotationParser::createAnnotation()@endif to wrap the result as
    * an SBML <code>&lt;annotation&gt;</code> element.
    *
    * @param obj the SBML object to start from
    *
    * @return the XMLNode tree corresponding to the annotation.
    *
    * @if notclike @note Because this is a @em static method, the non-C++
    * language interfaces for libSBML will contain two variants.  One will
    * be a static method on the class (i.e., RDFAnnotationParser), and the
    * other will be a standalone top-level function with the name
    * RDFAnnotationParser_parseCVTerms(). They are functionally
    * identical. @endif
    */
 public static XMLNode parseCVTerms(SBase obj)
 {
     IntPtr cPtr = libsbmlPINVOKE.RDFAnnotationParser_parseCVTerms(SBase.getCPtr(obj));
     XMLNode ret = (cPtr == IntPtr.Zero) ? null : new XMLNode(cPtr, true);
     return ret;
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:29,代码来源:RDFAnnotationParser.cs


示例15: insertAndOwn

 /**
    * Inserts an item at a given position in this ListOf's list of items.
    *
    * This variant of the method does not make a clone of the @p disownedItem handed to it.
    * This means that when the ListOf is destroyed, the original @p item
    * <em>will</em> be destroyed.
    *
    * @param location the location where to insert the item
    * @param disownedItem the item to be inserted to the list
    *
    *
  * @return integer value indicating success/failure of the
  * function.  @if clike The value is drawn from the
  * enumeration #OperationReturnValues_t. @endif The possible values
  * returned by this function are:
  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS [email protected]
    * @li @link libsbml#LIBSBML_INVALID_OBJECT [email protected]
    *
    * @see insert(int location, SBase item)
    */
 public int insertAndOwn(int location, SBase disownedItem)
 {
     int ret = libsbmlPINVOKE.ListOf_insertAndOwn(swigCPtr, location, SBase.getCPtrAndDisown(disownedItem));
     return ret;
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:25,代码来源:ListOf.cs


示例16: parseOnlyModelHistory

 /**
    * Reads the model history stored in @p obj and creates the
    * XML structure for an SBML annotation representing that history.
    *
    * @param obj any SBase object
    *
    * @return the XMLNode corresponding to an annotation containing
    * MIRIAM-compliant model history information in RDF format.
    *
    * @if notclike @note Because this is a @em static method, the non-C++
    * language interfaces for libSBML will contain two variants.  One will
    * be a static method on the class (i.e., RDFAnnotationParser), and the
    * other will be a standalone top-level function with the name
    * RDFAnnotationParser_parseOnlyModelHistory(). They are functionally
    * identical. @endif
    */
 public static XMLNode parseOnlyModelHistory(SBase obj)
 {
     IntPtr cPtr = libsbmlPINVOKE.RDFAnnotationParser_parseOnlyModelHistory(SBase.getCPtr(obj));
     XMLNode ret = (cPtr == IntPtr.Zero) ? null : new XMLNode(cPtr, false);
     return ret;
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:22,代码来源:RDFAnnotationParser.cs


示例17: filter

    /// <summary>
    /// The function performing the filtering, here we just check 
    /// that we have a valid element, and that it has notes.
    /// </summary>
    /// <param name="element">the current element</param>
    /// <returns><b>true</b> if element is to be included, <b>false</b> otherwise</returns>
    public override bool filter(SBase element)
    {
        // return in case we don't have a valid element
        if (element == null || !element.isSetNotes())
            return false;

        // otherwise we have notes set and want to keep the element
        if (!element.isSetId())
            Console.WriteLine("                     found : {0}", element.getId());
        else
            Console.WriteLine("                     found element without id");

        return true;
    }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:20,代码来源:GetAllElementsWithNotes.cs


示例18: prepend

 public void prepend(SBase item)
 {
     libsbmlPINVOKE.SBaseList_prepend(swigCPtr, SBase.getCPtr(item));
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:4,代码来源:SBaseList.cs


示例19: testListOfRemove

        static void testListOfRemove(ListOf lof, SBase s)
        {
            string ename = s.getElementName();

              lof.append(s);
              SBase c = lof.get(0);

              if ( c is CompartmentType ) { CompartmentType x = (lof as ListOfCompartmentTypes).remove(0); c = x; }
              else if ( c is Compartment ) { Compartment x = (lof as ListOfCompartments).remove(0); c = x; }
              else if ( c is Constraint )  { Constraint x = (lof as ListOfConstraints).remove(0); c = x; }
              else if ( c is EventAssignment ) { EventAssignment x = (lof as ListOfEventAssignments).remove(0); c = x; }
              else if ( c is Event ) { Event x = (lof as ListOfEvents).remove(0); c = x; }
              else if ( c is FunctionDefinition ) { FunctionDefinition x = (lof as ListOfFunctionDefinitions).remove(0); c = x; }
              else if ( c is InitialAssignment ) { InitialAssignment x = (lof as ListOfInitialAssignments).remove(0); c = x; }
              else if ( c is Parameter ) { Parameter x = (lof as ListOfParameters).remove(0); c = x; }
              else if ( c is Reaction ) { Reaction x = (lof as ListOfReactions).remove(0); c = x; }
              else if ( c is Rule ) { Rule x = (lof as ListOfRules).remove(0); c = x; }
              else if ( c is Species ) { Species x = (lof as ListOfSpecies).remove(0); c = x; }
              else if ( c is SpeciesReference ) {SimpleSpeciesReference x = (lof as ListOfSpeciesReferences).remove(0); c = x; }
              else if ( c is SpeciesType ) { SpeciesType x = (lof as ListOfSpeciesTypes).remove(0); c = x; }
              else if ( c is UnitDefinition ) { UnitDefinition x = (lof as ListOfUnitDefinitions).remove(0); c = x; }
              else if ( c is Unit ) { Unit x = (lof as ListOfUnits).remove(0); c = x; }
              else
              {
            ERR("[testListOfRemove] Error: (" + ename + ") : ListOfXXX::remove() failed.");
            return;
              }

              if ( c == null)
              {
            ERR("[testListOfRemove] Error: (" + ename + ") : ListOfXXX::remove() failed.");
            return;
              }

              string enameGet = c.getElementName();

              if ( ename == enameGet )
              {
            //Console.Out.WriteLine("[testListOfRemove] OK: (" + ename + ") remove(" + enameGet + ") : type match.");
            OK();
              }
              else
              {
            ERR("[testListOfRemove] Error: (" + ename + ") remove(" + enameGet + ") : type mismatch.");
              }
        }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:46,代码来源:TestRW.cs


示例20: transform

 public virtual int transform(SBase element)
 {
     int ret = (SwigDerivedClassHasMethod("transform", swigMethodTypes0) ? libsbmlPINVOKE.IdentifierTransformer_transformSwigExplicitIdentifierTransformer(swigCPtr, SBase.getCPtr(element)) : libsbmlPINVOKE.IdentifierTransformer_transform(swigCPtr, SBase.getCPtr(element)));
     return ret;
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:5,代码来源:IdentifierTransformer.cs



注:本文中的libsbmlcs.SBase类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# libsbmlcs.Species类代码示例发布时间:2022-05-26
下一篇:
C# libsbmlcs.SBMLNamespaces类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap