Trading System API  3.0
Library for Simulating and Deploying Trading and Investment Strategies
tsa::out_stream_adaptor Class Referenceabstract

Abstract base class for delegates of class out_stream. More...

#include <TSAStreams.h>

Inheritance diagram for tsa::out_stream_adaptor:
tsa::component tsa::fast::table tsa::mem_table

Public Member Functions

virtual ~out_stream_adaptor (void)
 Destructor.
 
virtual void cmp__finalize (void) override
 Override this member in any derived class. It will be invoked when the strategy is finalized. Use it to deallocate memory or close any streams.
 
virtual void osa__append (const date_time &time_stamp, std::vector< variant > &record)=0
 Implement this member in any derived class and to append a new record and time_stamp. More...
 
virtual void osa__prepare_stream (const std::string &stream_name, const column_defs &field_list)=0
 Implement this member in any derived class. This member is called before any records are passed. Use it for initialization purposes, such as creating a new table in a series_base. More...
 
- Public Member Functions inherited from tsa::component
virtual void cmp__evaluate_bar (const date_time &)
 
virtual void cmp__post_evaluate_bar (const date_time &)
 
bool is_registered_with_strategy (void) const
 
void register_with_strategy (strategy *)
 

Detailed Description

Abstract base class for delegates of class out_stream.

Derive new classes if you need a strategy to output data to a target that is not currently supported.

Member Function Documentation

virtual void tsa::out_stream_adaptor::osa__append ( const date_time time_stamp,
std::vector< variant > &  record 
)
pure virtual

Implement this member in any derived class and to append a new record and time_stamp.

Parameters
time_stampThe time stamp.
[in,out]recordThe record.

Implemented in tsa::mem_table, and tsa::fast::table.

virtual void tsa::out_stream_adaptor::osa__prepare_stream ( const std::string stream_name,
const column_defs field_list 
)
pure virtual

Implement this member in any derived class. This member is called before any records are passed. Use it for initialization purposes, such as creating a new table in a series_base.

Parameters
stream_nameName of the stream.
field_listList of fields.

Implemented in tsa::mem_table, and tsa::fast::table.