當前位置: 首頁>>代碼示例>>C#>>正文


C# libsbmlcs.Species類代碼示例

本文整理匯總了C#中libsbmlcs.Species的典型用法代碼示例。如果您正苦於以下問題:C# Species類的具體用法?C# Species怎麽用?C# Species使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Species類屬於libsbmlcs命名空間,在下文中一共展示了Species類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: setUp

 public void setUp()
 {
     C = new  Species(1,2);
       if (C == null);
       {
       }
 }
開發者ID:alexholehouse,項目名稱:SBMLIntegrator,代碼行數:7,代碼來源:TestSpecies_newSetters.cs

示例2: test_ListOf_clear

 public void test_ListOf_clear()
 {
     ListOf lo = new  ListOf(2,4);
       SBase sp = new  Species(2,4);
       lo.append(sp);
       lo.append(sp);
       lo.append(sp);
       lo.append(sp);
       lo.append(sp);
       assertTrue( lo.size() == 5 );
       lo.clear(true);
       assertTrue( lo.size() == 0 );
       lo.append(sp);
       lo.append(sp);
       lo.append(sp);
       lo.append(sp);
       lo.appendAndOwn(sp);
       assertTrue( lo.size() == 5 );
       SBase elem;
       elem = lo.get(0);
       elem = null;
       elem = lo.get(1);
       elem = null;
       elem = lo.get(2);
       elem = null;
       elem = lo.get(3);
       elem = null;
       elem = lo.get(4);
       elem = null;
       lo.clear(false);
       assertTrue( lo.size() == 0 );
       lo = null;
 }
開發者ID:0u812,項目名稱:roadrunner-backup,代碼行數:33,代碼來源:TestListOf.cs

示例3: setUp

 public void setUp()
 {
     S = new  Species(3,1);
       if (S == null);
       {
       }
 }
開發者ID:0u812,項目名稱:roadrunner-backup,代碼行數:7,代碼來源:TestL3Species.cs

示例4: test_Species_setCharge2

 public void test_Species_setCharge2()
 {
     Species c = new  Species(2,2);
       int i = c.setCharge(4);
       assertTrue( i == libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE );
       assertEquals( false, c.isSetCharge() );
       c = null;
 }
開發者ID:alexholehouse,項目名稱:SBMLIntegrator,代碼行數:8,代碼來源:TestSpecies_newSetters.cs

示例5: test_ListOf_append

 public void test_ListOf_append()
 {
     Model m = new  Model(2,4);
       m.createCompartment();
       ListOf loc = m.getListOfCompartments();
       assertTrue( loc.size() == 1 );
       SBase c = new  Compartment(2,4);
       int i = loc.append(c);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( loc.size() == 2 );
       SBase sp = new  Species(2,4);
       i = loc.append(sp);
       assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
       assertTrue( loc.size() == 2 );
       m = null;
       sp = null;
 }
開發者ID:0u812,項目名稱:roadrunner-backup,代碼行數:17,代碼來源:TestListOf.cs

示例6: Species

 /**
    * Copy constructor; creates a copy of this Species object.
    *
    * @param orig the object to copy.
    *
    * @throws @if python ValueError @else SBMLConstructorException @endif
    * Thrown if the argument @p orig is @c null.
    */
 public Species(Species orig)
     : this(libsbmlPINVOKE.new_Species__SWIG_2(Species.getCPtr(orig)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
開發者ID:0u812,項目名稱:roadrunner-backup,代碼行數:13,代碼來源:Species.cs

示例7: getCPtrAndDisown

        internal static HandleRef getCPtrAndDisown(Species obj)
        {
            HandleRef ptr = new HandleRef(null, IntPtr.Zero);

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

            return ptr;
        }
開發者ID:0u812,項目名稱:roadrunner-backup,代碼行數:12,代碼來源:Species.cs

示例8: test_Species_setName2

 public void test_Species_setName2()
 {
     Species c = new  Species(2,2);
       int i = c.setName( "1cell");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( true, c.isSetName() );
       i = c.unsetName();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetName() );
       c = null;
 }
開發者ID:alexholehouse,項目名稱:SBMLIntegrator,代碼行數:11,代碼來源:TestSpecies_newSetters.cs

示例9: test_Species_parent_add

 public void test_Species_parent_add()
 {
     Species ia = new Species(2,4);
       ia.setId("s");
       ia.setCompartment("c");
       Model m = new Model(2,4);
       m.addSpecies(ia);
       ia = null;
       ListOf lo = m.getListOfSpecies();
       assertTrue( lo == m.getSpecies(0).getParentSBMLObject() );
       assertTrue( m == lo.getParentSBMLObject() );
 }
開發者ID:alexholehouse,項目名稱:SBMLIntegrator,代碼行數:12,代碼來源:TestSBMLParentObject.cs

示例10: test_SBase_setModelHistory

 public void test_SBase_setModelHistory()
 {
     SBase sb = new Species(2,4);
       ModelHistory mh = new  ModelHistory();
       int i = sb.setModelHistory(mh);
       assertTrue( i == libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE );
       mh = null;
 }
開發者ID:sys-bio,項目名稱:libroadrunner-deps,代碼行數:8,代碼來源:TestSBase_newSetters.cs

示例11: test_Species_setHasOnlySubstanceUnits2

 public void test_Species_setHasOnlySubstanceUnits2()
 {
     Species c = new  Species(2,2);
       int i = c.setHasOnlySubstanceUnits(false);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( c.getHasOnlySubstanceUnits() == false );
       i = c.setHasOnlySubstanceUnits(true);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( c.getHasOnlySubstanceUnits() == true );
       c = null;
 }
開發者ID:alexholehouse,項目名稱:SBMLIntegrator,代碼行數:11,代碼來源:TestSpecies_newSetters.cs

示例12: test_Species_setSubstanceUnits4

 public void test_Species_setSubstanceUnits4()
 {
     Species c = new  Species(2,2);
       int i = c.setSubstanceUnits( "mole");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue((  "mole" == c.getSubstanceUnits() ));
       assertEquals( true, c.isSetSubstanceUnits() );
       i = c.setSubstanceUnits("");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetSubstanceUnits() );
       c = null;
 }
開發者ID:alexholehouse,項目名稱:SBMLIntegrator,代碼行數:12,代碼來源:TestSpecies_newSetters.cs

示例13: test_Species_setSubstanceUnits2

 public void test_Species_setSubstanceUnits2()
 {
     Species c = new  Species(2,2);
       int i = c.setSubstanceUnits( "1cell");
       assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE );
       assertEquals( false, c.isSetSubstanceUnits() );
       c = null;
 }
開發者ID:alexholehouse,項目名稱:SBMLIntegrator,代碼行數:8,代碼來源:TestSpecies_newSetters.cs

示例14: test_Species_setSpeciesType4

 public void test_Species_setSpeciesType4()
 {
     Species c = new  Species(2,2);
       int i = c.setSpeciesType( "cell");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( true, c.isSetSpeciesType() );
       assertTrue((  "cell"  == c.getSpeciesType() ));
       i = c.setSpeciesType("");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetSpeciesType() );
       c = null;
 }
開發者ID:alexholehouse,項目名稱:SBMLIntegrator,代碼行數:12,代碼來源:TestSpecies_newSetters.cs

示例15: test_Species_setSpeciesType2

 public void test_Species_setSpeciesType2()
 {
     Species c = new  Species(2,2);
       int i = c.setSpeciesType( "1cell");
       assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE );
       assertEquals( false, c.isSetSpeciesType() );
       i = c.unsetSpeciesType();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetSpeciesType() );
       c = null;
 }
開發者ID:alexholehouse,項目名稱:SBMLIntegrator,代碼行數:11,代碼來源:TestSpecies_newSetters.cs


注:本文中的libsbmlcs.Species類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。