Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Search  

/home/mrm/Simex/src/se_simulation.h

Go to the documentation of this file.
00001 #ifndef Se_Simulation_Included
00002 #define Se_Simulation_Included
00003 
00004 #include <iostream>
00005 #include <gtk/gtk.h>
00006 
00007 #include "se_string.h"
00008 #include "se_object.h"
00009 #include "se_gtk_message.h"
00010 #include "se_gtk_data.h"
00011 #include "se_gtk_data_vector.h"
00012 
00013 namespace Se{
00014 
00015 class Simulation:public Object{
00016 
00017   //Information on the simulation
00018   int slave_process_id;
00019   bool simulation_started;
00020   int slave_mailbox_key;
00021   int slave_mailbox_id;
00022   Gtk_Message *message_out;
00023   String my_executable;
00024   String my_dir;
00025   
00026 
00027   //Widgets
00028   GtkWidget *toolbar;
00029   GtkWidget *step_n_input;
00030   GtkWidget *file_selection;
00031 
00032   //Data associated to widgets
00033   int n;
00034 
00035  public:
00036   //Exception
00037   class Invalid_File{};
00038 
00039   //constructors
00040   Simulation(int id,Object *parent);
00041 
00042   //Set
00043   void set_slave_mailbox_key(int the_slave_mailbox_key);
00044 
00045   //Miscellaneous
00046   /*TODO: rename to send_order*/
00047   void order(Gtk_Message::Type);
00048   void open_simulation(String filename);
00049   void send_order_change_double_data(String name,double value);
00050  
00051 
00052   //Interface
00053   void build();
00054 
00055   //callbacks
00056    void step_n_input_function();
00057 
00058 
00059   static void exec_button_callback(GtkWidget *widget,gpointer data);
00060   static void start_button_callback(GtkWidget *widget,gpointer data);
00061   static void stop_button_callback(GtkWidget *widget,gpointer data);
00062   static void reset_button_callback(GtkWidget *widget,gpointer data);
00063   static void step_button_callback(GtkWidget *widget,gpointer data);
00064   static void hide_button_callback(GtkWidget *widget,gpointer data);
00065   static void show_button_callback(GtkWidget *widget,gpointer data);
00066   static void open_button_callback(GtkWidget *widget,gpointer data);
00067   static void file_selection_callback(GtkWidget *widget,gpointer data);
00068   static void step_n_button_callback(GtkWidget *widget,gpointer data);
00069   static void step_n_input_callback(GtkWidget *widget,gpointer data);
00070 };
00071 
00072 }
00073 #endif
00074 
00075   

Generated on Sat Jul 19 04:01:29 2003 for SIMEX by doxygen1.2.18