#ifndef __VF_h_ #define __VF_h_ #include "../misc_framework/DataNodes.h" struct VFDataFields { DataNode::Integer buyVolume; DataNode::Integer sellVolume; DataNode::Integer expectedVelocity; }; class VFDataNode : public DataNode { private: enum { bmValue, bmDebug }; const std::string _symbol; VFDataFields _data; bool _valid; virtual void onBroadcast(BroadcastMessage &message, int msgId); VFDataNode(DataNodeArgument const &args); ~VFDataNode(); friend class DataNode; public: bool getValid() const { return _valid; } VFDataFields const &getData() const { return _data; } static DataNodeLink *find(DataNodeListener *listener, int msgId, VFDataNode *&node, std::string const &symbol); static DataNodeLink *find(VFDataNode *&node, std::string const &symbol) { return find(NULL, 0, node, symbol); } // This is only required to make the debugger available sooner. If you // don't need the debugger, or you can wait until at least one of these // has been created, you don't need to call this. Call this only in the // data node thread. static void init(); }; #endif