本文整理汇总了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);
{
}
}
示例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;
}
示例3: setUp
public void setUp()
{
S = new Species(3,1);
if (S == null);
{
}
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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() );
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}