37 #ifndef FIX8_HFTEST_HPP_
38 #define FIX8_HFTEST_HPP_
67 using Nos_queue = std::queue<FIX8::TEX::NewOrderSingle *>;
91 if (_nos_queue.empty())
98 bool cached()
const {
return !_nos_queue.empty(); }
99 int size()
const {
return static_cast<int>(_nos_queue.size()); }
170 using Handlers = std::map<const MenuItem, bool (MyMenu::*)(), MenuItem>;
176 _istr(new
FIX8::fdinbuf(infd)), _ostr(ostr) {}
183 auto itr(_handlers.find({ch}));
184 return itr == _handlers.end() ?
true : (this->*itr->second)();
208 srand (static_cast<unsigned>(time(0) % _getpid()));
210 srandom (static_cast<unsigned>(time(0) % getpid()));
226 return range ? target / (RAND_MAX / range + 1) : target;
230 #endif // FIX8_HFTEST_HPP_
static void init()
Initialise the random number generator.
bool handle_application(const unsigned seqnum, const FIX8::Message *&msg)
f8_thread delegated async logging class
virtual bool operator()(const FIX8::TEX::ExecutionReport *msg)
Fix8 Base Session. User sessions are derived from this class.
Example server session. Derives from FIX8::Session.
static T getrandom(const T range=0)
Example server message router. Derives from fix8 generated router class.
std::queue< FIX8::TEX::NewOrderSingle * > Nos_queue
Base (ABC) Persister class.
ExecutionReport (8), application, 326 fields, 16 groups.
Quickfix style sessionid.
A random number generator wrapper.
bool handle_application(const unsigned seqnum, const FIX8::Message *&msg)
hf_session_server & _session
const F8MetaCntx & ctx()
Compiler generated metadata object, accessed through this function.
NewOrderSingle (D), application, 243 fields, 11 groups.
virtual bool operator()(const FIX8::TEX::NewOrderSingle *msg)
hf_session_client & _session
A complete Fix message with header, body and trailer.
FIX8::TEX::NewOrderSingle * pop()
F8API Session(const F8MetaCntx &ctx, const SessionID &sid, Persister *persist=nullptr, Logger *logger=nullptr, Logger *plogger=nullptr)
tex_router_server _router
Example client session. Derives from FIX8::Session.
tex_router_server(hf_session_server &session)
hf_session_server(const FIX8::F8MetaCntx &ctx, const FIX8::sender_comp_id &sci, FIX8::Persister *persist=nullptr, FIX8::Logger *logger=nullptr, FIX8::Logger *plogger=nullptr)
Example client message router. Derives from fix8 generated router class.
void push(FIX8::TEX::NewOrderSingle *nos)
tex_router_client _router
tex_router_client(hf_session_client &session)
hf_session_client(const FIX8::F8MetaCntx &ctx, const FIX8::SessionID &sid, FIX8::Persister *persist=nullptr, FIX8::Logger *logger=nullptr, FIX8::Logger *plogger=nullptr)