#ifndef __DataNodeThread_h_ #define __DataNodeThread_h_ #include #include "../../shared/ThreadClass.h" #include "../misc_framework/DataNodes.h" #include "ReportAlertsThread.h" #include "WestonDatabaseMonitor.h" #include "TclThread.h" /* This was heavily inspired by AlertMainControl. This thread is where our * data nodes, i.e. the bulk of our market data, live. This object is also * responsible for creating one or more Tcl environments. Each of these has * it's own thread, but needs to be created in this thread. * * This class also creates the ReportAlertsThread. */ class DataNodeThread : private ThreadClass, private DataNodeListener { private: enum { mtTclCommand, mtDataNodeEvent, mtInitAlerts, mtQuit }; RequestQueue _incoming; std::vector< TclThread * > _tclThreads; DataNodeManager _dataNodeManager; ReportAlertsThread _reportAlertsThread; WestonDatabaseMonitor _westonDatabaseMonitor; void onWakeup(int msgId); protected: void threadFunction(); public: DataNodeThread(); ~DataNodeThread(); void initAlerts(); }; #endif