37 #ifndef FIX8_MYFIX_HPP_
38 #define FIX8_MYFIX_HPP_
160 const std::string
_help;
171 using Handlers = std::map<const MenuItem, bool (MyMenu::*)(), MenuItem>;
177 _istr(new
FIX8::fdinbuf(infd)), _ostr(ostr) {}
184 auto itr(_handlers.find({ch}));
185 if (itr == _handlers.end())
187 _ostr <<
"Command not found";
190 return (this->*itr->second)();
216 bool load_msgs(
const std::string& fname);
229 _istr.getline(buff,
sizeof(buff));
241 time_t tval(time(0));
243 srand (static_cast<unsigned>(((tval % _getpid()) * tval)));
245 srandom (static_cast<unsigned>(((tval % getpid()) * tval)));
257 return range ? target / (RAND_MAX / range + 1) : target;
261 #endif // FIX8_MYFIX_HPP_
myfix_session_server & _session
f8_thread delegated async logging class
virtual bool operator()(const FIX8::TEX::ExecutionReport *msg)
Fix8 Base Session. User sessions are derived from this class.
tex_router_client(myfix_session_client &session)
static T getrandom(const T range=0)
Example server message router. Derives from fix8 generated router class.
Base (ABC) Persister class.
ExecutionReport (8), application, 326 fields, 16 groups.
Quickfix style sessionid.
Example server session. Derives from FIX8::Session.
std::deque< FIX8::Message * > MsgList
void state_change(const FIX8::States::SessionStates before, const FIX8::States::SessionStates after)
A random number generator wrapper.
tex_router_server _router
tex_router_client _router
const F8MetaCntx & ctx()
Compiler generated metadata object, accessed through this function.
NewOrderSingle (D), application, 243 fields, 11 groups.
bool handle_application(const unsigned seqnum, const FIX8::Message *&msg)
virtual bool operator()(const FIX8::TEX::NewOrderSingle *msg)
Example client session. Derives from FIX8::Session.
tex_router_server(myfix_session_server &session)
A complete Fix message with header, body and trailer.
void state_change(const FIX8::States::SessionStates before, const FIX8::States::SessionStates after)
F8API Session(const F8MetaCntx &ctx, const SessionID &sid, Persister *persist=nullptr, Logger *logger=nullptr, Logger *plogger=nullptr)
myfix_session_client(const FIX8::F8MetaCntx &ctx, const FIX8::SessionID &sid, FIX8::Persister *persist=nullptr, FIX8::Logger *logger=nullptr, FIX8::Logger *plogger=nullptr)
bool handle_application(const unsigned seqnum, const FIX8::Message *&msg)
myfix_session_client & _session
Example client message router. Derives from fix8 generated router class.
myfix_session_server(const FIX8::F8MetaCntx &ctx, const FIX8::sender_comp_id &sci, FIX8::Persister *persist=nullptr, FIX8::Logger *logger=nullptr, FIX8::Logger *plogger=nullptr)
bool sample_scheduler_callback()