getType() public method

public getType ( ) : Type
return Type
コード例 #1
0
    private static int getIndex(BioBrick brick)
    {
        int idx;

        switch (brick.getType())
        {
        case BioBrick.Type.PROMOTER:
            idx = 0;
            break;

        case BioBrick.Type.RBS:
            idx = 1;
            break;

        case BioBrick.Type.GENE:
            idx = 2;
            break;

        case BioBrick.Type.TERMINATOR:
            idx = 3;
            break;

        default:
            idx = 0;
            Logger.Log("CraftZoneManager getIndex unknown type " + brick.getType(), Logger.Level.WARN);
            break;
        }
        return(idx);
    }
コード例 #2
0
 private void insertOrdered(BioBrick toInsert)
 {
     foreach (BioBrick brick in _currentBioBricks)
     {
         if (brick.getType() > toInsert.getType())
         {
             LinkedListNode <BioBrick> afterNode = _currentBioBricks.Find(brick);
             _currentBioBricks.AddBefore(afterNode, toInsert);
             return;
         }
         else if (brick.getType() == toInsert.getType())
         {
             LinkedListNode <BioBrick> toReplaceNode = _currentBioBricks.Find(brick);
             _currentBioBricks.AddAfter(toReplaceNode, toInsert);
             _currentBioBricks.Remove(brick);
             return;
         }
     }
     _currentBioBricks.AddLast(toInsert);
 }
コード例 #3
0
 private static int getIndex(BioBrick brick)
 {
   int idx;
   switch(brick.getType())
     {
       case BioBrick.Type.PROMOTER:
         idx = 0;
         break;
       case BioBrick.Type.RBS:
         idx = 1;
         break;
       case BioBrick.Type.GENE:
         idx = 2;
         break;
       case BioBrick.Type.TERMINATOR:
         idx = 3;
         break;
     default:
       idx = 0;
       Logger.Log("CraftZoneManager getIndex unknown type "+brick.getType(), Logger.Level.WARN);
       break;
     }
   return idx;
 }
コード例 #4
0
 private static bool checkTerminator(BioBrick b)
 {
     Logger.Log("ExpressionModule::checkTerminator("+b+")", Logger.Level.DEBUG);
     return (b.getType() == BioBrick.Type.TERMINATOR);
 }  
コード例 #5
0
 private static bool checkGene(BioBrick b)
 {
     Logger.Log("ExpressionModule::checkGene("+b+")", Logger.Level.DEBUG);
     return (b.getType() == BioBrick.Type.GENE);
 }
コード例 #6
0
 private static bool checkPromoter(BioBrick b)
 {
     Logger.Log("ExpressionModule::checkPromoter("+b+")", Logger.Level.DEBUG);
     return (b.getType() == BioBrick.Type.PROMOTER);
 }
コード例 #7
0
 public static string getSpriteName(BioBrick brick) {
   return spriteNamesDico[brick.getType()];
 }
コード例 #8
0
 private static bool checkTerminator(BioBrick b)
 {
     Logger.Log("ExpressionModule::checkTerminator(" + b + ")", Logger.Level.DEBUG);
     return(b.getType() == BioBrick.Type.TERMINATOR);
 }
コード例 #9
0
 private static bool checkGene(BioBrick b)
 {
     Logger.Log("ExpressionModule::checkGene(" + b + ")", Logger.Level.DEBUG);
     return(b.getType() == BioBrick.Type.GENE);
 }
コード例 #10
0
 private static bool checkPromoter(BioBrick b)
 {
     Logger.Log("ExpressionModule::checkPromoter(" + b + ")", Logger.Level.DEBUG);
     return(b.getType() == BioBrick.Type.PROMOTER);
 }
コード例 #11
0
ファイル: Device.cs プロジェクト: quito/DSynBio_reloaded
 private static bool checkTerminator(BioBrick b)
 {
     return (b.getType() == BioBrick.Type.TERMINATOR);
 }
コード例 #12
0
ファイル: Device.cs プロジェクト: quito/DSynBio_reloaded
 private static bool checkRBS(BioBrick b)
 {
     return (b.getType() == BioBrick.Type.RBS);
 }
コード例 #13
0
ファイル: Device.cs プロジェクト: quito/DSynBio_reloaded
 private static bool checkPromoter(BioBrick b)
 {
     return (b.getType() == BioBrick.Type.PROMOTER);
 }
コード例 #14
0
ファイル: Device.cs プロジェクト: quito/DSynBio_reloaded
 private static bool checkGene(BioBrick b)
 {
     return (b.getType() == BioBrick.Type.GENE);
 }
コード例 #15
0
 public static string getSpriteName(BioBrick brick)
 {
     return(spriteNamesDico[brick.getType()]);
 }
コード例 #16
0
 private void insertOrdered(BioBrick toInsert)
 {
   foreach(BioBrick brick in _currentBioBricks)
   {
     if(brick.getType() > toInsert.getType())
     {
       LinkedListNode<BioBrick> afterNode = _currentBioBricks.Find(brick);
       _currentBioBricks.AddBefore(afterNode, toInsert);
       return;
     }
     else if(brick.getType() == toInsert.getType())
     {
       LinkedListNode<BioBrick> toReplaceNode = _currentBioBricks.Find(brick);
       _currentBioBricks.AddAfter(toReplaceNode, toInsert);
       _currentBioBricks.Remove(brick);
       return;
     }
   }
   _currentBioBricks.AddLast(toInsert);
 }