当前位置: 首页>>代码示例>>C#>>正文


C# libsbmlcs.SBase类代码示例

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


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


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