void CreateCard() // 카드 생성 함수 { AssignCell(); // CellNum 부여 함수 AssignCoord(); // CellNum에 따른 좌표 부여 AssignType(0, Stage.TypeCount); // Type 부여 함수 (랜덤. 중복 1회) AssignForm();// PrintForm 부여 }
/***************************************************************************************************************************** Routine to read the Bench Mark(.isc files) *****************************************************************************************************************************/ int ReadIsc(FILE *fisc,NODE *graph) { char c,noty[Mlin],from[Mlin],str1[Mlin],str2[Mlin],name[Mlin],line[Mlin]; int i,id,fid,fin,fout,mid=0; // intialize all nodes in graph structure for(i=0;i<Mnod;i++){ InitializeCircuit(graph,i); } //skip the comment lines do fgets(line,Mlin,fisc); while(line[0] == '*'); // read line by line while(!feof(fisc)){ //initialize temporary strings bzero(noty,strlen(noty)); bzero(from,strlen(from)); bzero(str1,strlen(str1)); bzero(str2,strlen(str2)); bzero(name,strlen(name)); //break line into data sscanf(line, "%d %s %s %s %s",&id,name,noty,str1,str2); //fill in the type strcpy(graph[id].nam,name); graph[id].typ=AssignType(noty); //fill in fanin and fanout numbers if(graph[id].typ!=FROM) { fout= atoi(str1); fin=atoi(str2); } else{ fin=fout= 1; strcpy(from,str1); } if(id > mid){ mid=id; } graph[id].nfo=fout; graph[id].nfi=fin; if(fout==0){ graph[id].po=1; } //create fanin and fanout lists switch (graph[id].typ) { case 0 : printf("ReadIsc: Error in input file (Node %d)\n",id); exit(1); case INPT : break; case AND : case NAND : case OR : case NOR : case XOR : case XNOR : case BUFF : case NOT : for(i=1;i<=fin;i++) { fscanf(fisc, "%d", &fid); InsertList(&graph[id].fin,fid); InsertList(&graph[fid].fot,id); } fscanf(fisc,"\n"); break; case FROM : for(i=mid;i>0;i--){ if(graph[i].typ!=0){ if(strcmp(graph[i].nam,from)==0){ fid=i; break; } } } InsertList(&graph[id].fin,fid); InsertList(&graph[fid].fot,id); break; } //end case bzero(line,strlen(line)); fgets(line,Mlin,fisc); } // end while return mid; }//end of ReadIsc
// ---------------------------------------------------------------------------- bool CGffRecord::SetRecord( const CSeq_annot& annot, const CSeq_feat& feature ) // ---------------------------------------------------------------------------- { if ( ! AssignType( feature ) ) { return false; } if ( ! AssignSeqId( feature ) ) { return false; } if ( ! AssignSource( feature ) ) { return false; } if ( ! AssignStart( feature ) ) { return false; } if ( ! AssignStop( feature ) ) { return false; } if ( ! AssignScore( feature ) ) { return false; } if ( ! AssignStrand( feature ) ) { return false; } if ( ! AssignPhase( feature ) ) { return false; } if ( ! AssignAttributesCore( annot, feature ) ) { return false; } if ( ! AssignAttributesExtended( feature ) ) { return false; } return true; }