www.pudn.com > Genecircus20070919.rar > BlackBoard.h


#pragma once 
#include "wx_pch.h" 
#include "Gene_Simulate.h" 
#include "Random.h" 
#include "Grid.h" 
// 
typedef std::vector Genes; 
typedef std::vector othertfs; 
typedef std::vector control; 
typedef std::vector linec; 
typedef std::vector Genes_bl; 
struct grid_cpu{ 
	   int number_cpu; 
	   string addr;//记录来自那个基因的蛋白 
}; 
typedef std::vector ipaddrcpu; 
struct protein_con{ 
	   int number; 
	   int index;//记录来自那个基因的蛋白 
}; 
struct core{ 
	   wxPoint p1; 
	   int wid; 
	   int high; 
	   int ridus; 
}; 
typedef std::vector pro_c; 
struct A_Delay_Reaction{ 
	  double time; 
	  double time_old; 
	  //A_Reaction rc; 
}; 
struct protein_complex{ 
      int number; 
	  Genes_bl reaction_gene; 
      othertfs reaction_other_porneit; 
	  Genes_bl gene_protein; 
	  int index;//是那个反应产生的 
}; 
typedef std::vector pro_complex; 
typedef std::queuedelays; 
struct A_Reaction{ 
	   int if_31;//1 : 该反应是结合到promotor上的反应,且在site one上;2 : 该反应是结合到promotor上的反应,且在site two上; 
	   Genes_bl reaction_gene; 
       othertfs reaction_other_porneit; 
	   Genes_bl gene_protein; 
	   control ct; 
	   int number;//蛋白复合体需要 
	   pro_complex p_c; 
	   double c; 
	   double function; 
	   int flag; 
	   int index_for_blackboard_9998; 
       pro_c pc; 
       delays ds;  
	   string name; 
}; 
typedef std::vector Ipaddr1; 
typedef std::vector reaction; 
typedef boost::shared_ptr FooPtr; 
typedef std::vector ave_gene; 
typedef std::vector ave_all_cell; 
class BlackBoard 
{ 
public: 
	bool if_can_grid; 
	double simulate_time;//min 
	int scale_t; 
	int scale_t_mrna; 
	int scale_t_pro; 
	BlackBoard(void); 
	bool activation(bool if_count,int number); 
	bool finderror(); 
	void buildmodel(); 
	bool ifiscomplexpart(int a,int b); 
	bool recuise(stack s,int b); 
	double adapter(string first,string second,string model,int index); 
	void tempsave(int number); 
	void tempload(); 
	Genes genes; 
	othertfs otf; 
	control ct; 
	linec lc;  
	Genes genes1; 
	othertfs otf1; 
	control ct1; 
	linec lc1;  
    reaction rc_bl; 
	pro_complex pc_b; 
	CRandom rd; 
	std::vector foo_vector; 
	ave_all_cell ave; 
	core cr; 
public: 
	~BlackBoard(void); 
	bool if_can_write_result; 
	wxWindow* parent; 
	Grid grid; 
	void report(string msg); 
    ipaddrcpu addr; 
	string filedir; 
	bool if_grid; 
	Ipaddr1 add_received; 
	string result_for_grid; 
	int thread_number; 
};