當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。