/* This defines a generic device that provides event-handling functions for responses from the human, and also provides some basic output functions to help providing stimuli to the simulated human. The default event handling functions defined in this device simply echo the supplied input and generate no output. */ #ifndef DEVICE_PROCESSOR_H #define DEVICE_PROCESSOR_H #include "Processor.h" #include "Device_Event_types.h" #include // forward declarations class Symbol; class Output_tee; class Coordinator; class Human_processor; class Device_processor : public Processor { public: // construct with id label and output destination Device_processor(const std::string& id, Output_tee& ot); virtual ~Device_processor() {} // standard interface for EPIC application virtual void initialize(); virtual void display() const; virtual std::string processor_info() const; virtual void set_parameter_string(const std::string&) {} virtual std::string get_parameter_string() const {return std::string();} // connection functions void connect(Human_processor * human_ptr_) {human_ptr = human_ptr_;} // event acceptance virtual void accept_event(Smart_Pointer); virtual void accept_event(Smart_Pointer); virtual void accept_event(Smart_Pointer); // event handling virtual void handle_event(Smart_Pointer); virtual void handle_event(Smart_Pointer); virtual void handle_event(Smart_Pointer); virtual void handle_event(Smart_Pointer); virtual void handle_event(Smart_Pointer); virtual void handle_event(Smart_Pointer); virtual void handle_event(Smart_Pointer); virtual void handle_event(Smart_Pointer); virtual void handle_event(Smart_Pointer); virtual void handle_event(Smart_Pointer); virtual void handle_event(Smart_Pointer); protected: // create a Device_Delay_event to arrive at this device after a delay void do_device_delay_event(long delay); void do_device_delay_event(long delay, const Symbol& delay_type, const Symbol& delay_datum); void do_device_delay_event(long delay, const Symbol& delay_type, const Symbol& object_name, const Symbol& property_name, const Symbol& property_value); Human_processor * human_ptr; // destination for visual and auditory output Output_tee& device_out; // destination for output for the modeler }; // provide a definition for this function to create a specific subclass of device Device_processor * create_specific_device(); #endif