#ifndef __TosData_h_ #define __TosData_h_ #include #include #include "../../shared/MiscSupport.h" /* This is the data that can be shared between a lot of different programs. * This used to be part of GenericTosData.h, but that file includes a lot of * references to the application framework used in the realtime_alerts program. * Not all programs want that framework, so other programs will just include * this file. */ struct TosData { double price; time_t time; int64_t size; // This comes in an internal format dictated by the data feed. Look at // SimpleMarketData to translate this into something human readable or // the simple format we use for our database. std::string exchange; // Trade Condition is very complicated in general. These seem to be the only // two things we care about. bool formT; bool updatesLast; // When we first connect to the datafeed, we will get the most recent price // and notify the listeners. It may happen at other times, such as a price // correction. This was formerly called EventType. bool newPrint; // Last official print if not closed yet. // There is no way to really know for certain what the official closing // print will be until long after trading has stopped. double todaysClose; // Total for the day. int64_t volume; double open; double high; double low; void clear(); TclList dump() const; }; #endif