...
Code Block | ||
---|---|---|
| ||
// Releasing virtual void release() const = 0; // ID virtual std::string getId() const = 0; // Subscribing / unsubscribing virtual bool subscribed() const = 0; // Subscribes to thean instrument. // instrumentListener should stay alive until unsubscribe() is called. virtual void subscribe(InstrumentListener* instrumentListener) = 0; // Unsubscribes from thean instrument. // Should only be called if subscribe() succeeded. virtual void unsubscribe() = 0; // Returns instrument statistics snapshot. virtual void getStatistics(InstrumentStatistics& statistics) = 0; |
...
Code Block | ||
---|---|---|
| ||
// Messages // Called on an instrument reset. The client should reset all its message derived data. virtual void onReset(Instrument* instrument, ResetReason resetReason) = 0; // Called on a FIX message. virtual void onFixMessage(Instrument* instrument, Engine::FIXMessage* message, PerformanceIndicator* performanceIndicator) = 0; |
...
Code Block | ||
---|---|---|
| ||
// Data
// Returns the size of data to receive and pass to onDataReceived() or 0.
virtual size_t getDataSize(UdpConnection* connection, const void* data, size_t size) = 0;
// Called on data received.
virtual void onDataReceived(UdpConnection* connection, const void* data, size_t size) = 0;
// Called to notify that no more data is available.
virtual void onNoData(UdpConnection* connection) = 0; |
...