fix8  version 1.4.0
Open Source C++ FIX Framework
MyMenu Class Reference

Simple menu system that will work with most term types. More...

#include <hftest.hpp>

Classes

struct  MenuItem
 Individual menu item. More...
 

Public Member Functions

 MyMenu (FIX8::Session &session, int infd, std::ostream &ostr)
 
virtual ~MyMenu ()
 
std::istream & get_istr ()
 
std::ostream & get_ostr ()
 
bool process (char ch)
 
bool new_order_single ()
 
bool preload_new_order_single ()
 
bool batch_preload_new_order_single ()
 
bool multi_new_order_single ()
 
bool send_all_preloaded ()
 
bool send_all_preloaded (coroutine &coro, FIX8::Session *ses)
 
bool help ()
 
bool do_exit ()
 
bool do_logout ()
 
FIX8::tty_save_stateget_tty ()
 
 MyMenu (FIX8::Session &session, int infd, std::ostream &ostr, FIX8::ConsoleMenu *cm=nullptr)
 
virtual ~MyMenu ()
 
std::istream & get_istr ()
 
std::ostream & get_ostr ()
 
bool process (char ch)
 
bool new_order_single ()
 
bool new_order_single_50 ()
 
bool new_order_single_1000 ()
 
bool resend_request ()
 
bool help ()
 
bool do_exit ()
 
bool do_logout ()
 
bool create_msgs ()
 
bool version_info ()
 
bool edit_msgs ()
 
bool delete_msg ()
 
bool delete_msgs ()
 
bool print_msgs ()
 
bool send_msgs ()
 
bool send_msg ()
 
bool write_msgs ()
 
bool read_msgs ()
 
bool set_lpp ()
 
bool toggle_heartbeats ()
 
bool static_probe ()
 
bool new_order_single_alternate ()
 
bool new_order_single_recycled ()
 
bool load_msgs (const std::string &fname)
 
FIX8::Messagegenerate_new_order_single ()
 
FIX8::Messagegenerate_new_order_single_alternate ()
 
void send_lst ()
 
bool save_msg (const std::string &fname, FIX8::Message *msg)
 
unsigned get_msg_cnt () const
 
FIX8::tty_save_stateget_tty ()
 
FIX8::f8Stringget_string (FIX8::f8String &to)
 

Private Types

using Handlers = std::map< const MenuItem, bool(MyMenu::*)(), MenuItem >
 
using Handlers = std::map< const MenuItem, bool(MyMenu::*)(), MenuItem >
 

Private Attributes

FIX8::tty_save_state _tty
 
hf_session_client_session
 
std::istream _istr
 
std::ostream & _ostr
 
FIX8::MsgList _lst
 
FIX8::ConsoleMenu_cm
 
myfix_session_client_session
 

Static Private Attributes

static const Handlers _handlers
 

Detailed Description

Simple menu system that will work with most term types.

Definition at line 151 of file hftest.hpp.

Member Typedef Documentation

using MyMenu::Handlers = std::map<const MenuItem, bool (MyMenu::*)(), MenuItem>
private

Definition at line 170 of file hftest.hpp.

using MyMenu::Handlers = std::map<const MenuItem, bool (MyMenu::*)(), MenuItem>
private

Definition at line 171 of file myfix.hpp.

Constructor & Destructor Documentation

MyMenu::MyMenu ( FIX8::Session session,
int  infd,
std::ostream &  ostr 
)
inline

Definition at line 174 of file hftest.hpp.

175  : _tty(infd), _session(static_cast<hf_session_client&>(session)),
176  _istr(new FIX8::fdinbuf(infd)), _ostr(ostr) {}
std::ostream & _ostr
Definition: hftest.hpp:168
Create a streambuf from an open file descriptor.
Definition: f8utils.hpp:1136
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
hf_session_client & _session
Definition: hftest.hpp:166
std::istream _istr
Definition: hftest.hpp:167
virtual MyMenu::~MyMenu ( )
inlinevirtual

Definition at line 177 of file hftest.hpp.

177 {}
MyMenu::MyMenu ( FIX8::Session session,
int  infd,
std::ostream &  ostr,
FIX8::ConsoleMenu cm = nullptr 
)
inline

Definition at line 175 of file myfix.hpp.

176  : _tty(infd), _cm(cm), _session(static_cast<myfix_session_client&>(session)),
177  _istr(new FIX8::fdinbuf(infd)), _ostr(ostr) {}
std::ostream & _ostr
Definition: hftest.hpp:168
Create a streambuf from an open file descriptor.
Definition: f8utils.hpp:1136
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
hf_session_client & _session
Definition: hftest.hpp:166
FIX8::ConsoleMenu * _cm
Definition: myfix.hpp:154
std::istream _istr
Definition: hftest.hpp:167
virtual MyMenu::~MyMenu ( )
inlinevirtual

Definition at line 178 of file myfix.hpp.

178 {}

Member Function Documentation

bool MyMenu::batch_preload_new_order_single ( )

Definition at line 358 of file hftest.cpp.

References batch_size(), RandDev::getrandom(), FIX8::TEX::HandlInst_AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION(), FIX8::TEX::OrdType_LIMIT(), preload_count(), FIX8::TEX::Side_BUY(), and FIX8::TEX::TimeInForce_FILL_OR_KILL().

359 {
360  unsigned num(preload_count);
361  if (!num)
362  {
363  cout << "Enter number of NewOrderSingle msgs to batch preload:";
364  cout.flush();
366  cin >> num;
367  _tty.set_raw_mode();
368  }
369  while (num > 0)
370  {
371  unsigned cnt(0);
372  for (; cnt < num && cnt < batch_size; ++cnt)
373  {
374  static unsigned oid(10000);
375  ostringstream oistr;
376  oistr << "ord" << ++oid << '-' << num;
377 
379  *ptr << new FIX8::TEX::Symbol("BHP")
385  << new FIX8::TEX::ClOrdID(oistr.str())
386  << new FIX8::TEX::Price(1. + RandDev::getrandom(500.), 3)
387  << new FIX8::TEX::OrderQty(1 + RandDev::getrandom(10000));
388 
389 #if defined FIX8_PREENCODE_MSG_SUPPORT
390  ptr->preencode();
391 #endif
392  _session.push(ptr);
393  }
394  cout << _session.cached() << " NewOrderSingle msgs preloaded." << endl;
395  num -= cnt;
397  }
398 
399  return true;
400 }
Field< char, 54 > Side
const char HandlInst_AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION('1')
unsigned preload_count(0)
const char TimeInForce_FILL_OR_KILL('4')
Field< char, 59 > TimeInForce
static T getrandom(const T range=0)
Definition: hftest.hpp:219
bool send_all_preloaded()
Definition: hftest.cpp:442
const char Side_BUY('1')
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
Field< char, 40 > OrdType
NewOrderSingle (D), application, 243 fields, 11 groups.
Field< char, 21 > HandlInst
hf_session_client & _session
Definition: hftest.hpp:166
const char OrdType_LIMIT('2')
Field< f8String, 11 > ClOrdID
Definition: Myfix_types.hpp:93
Field template. There will ONLY be partial template specialisations of this template.
Definition: field.hpp:256
Field< f8String, 55 > Symbol
unsigned batch_size(1000)
bool cached() const
Definition: hftest.hpp:98
void push(FIX8::TEX::NewOrderSingle *nos)
Definition: hftest.hpp:88
bool MyMenu::create_msgs ( )

Definition at line 410 of file harness.cpp.

411 {
412  _cm->CreateMsgs(_tty, _lst);
413  return true;
414 }
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
FIX8::MsgList _lst
Definition: myfix.hpp:153
virtual F8API int CreateMsgs(tty_save_state &tty, MsgList &lst) const
FIX8::ConsoleMenu * _cm
Definition: myfix.hpp:154
bool MyMenu::delete_msg ( )

Definition at line 433 of file harness.cpp.

434 {
435  _cm->DeleteMsgs(_tty, _lst);
436  return true;
437 }
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
FIX8::MsgList _lst
Definition: myfix.hpp:153
FIX8::ConsoleMenu * _cm
Definition: myfix.hpp:154
virtual F8API int DeleteMsgs(tty_save_state &tty, MsgList &lst) const
bool MyMenu::delete_msgs ( )

Definition at line 440 of file harness.cpp.

441 {
443  return true;
444 }
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
FIX8::MsgList _lst
Definition: myfix.hpp:153
FIX8::ConsoleMenu * _cm
Definition: myfix.hpp:154
virtual F8API int DeleteAllMsgs(tty_save_state &tty, MsgList &lst) const
bool MyMenu::do_exit ( )
inline

Definition at line 194 of file hftest.hpp.

194 { return false; }
bool MyMenu::do_exit ( )
inline

Definition at line 198 of file myfix.hpp.

198 { return false; }
bool MyMenu::do_logout ( )

Definition at line 367 of file harness.cpp.

References FIX8::hypersleep< h_seconds >().

368 {
369  if (!_session.is_shutdown())
370  {
372  get_ostr() << "logout..." << endl;
373  }
375  return false; // will exit
376 }
Logout (5), admin, 3 fields, 0 groups.
virtual F8API bool send(Message *msg, bool destroy=true, const unsigned custom_seqnum=0, const bool no_increment=false)
Definition: session.cpp:978
hf_session_client & _session
Definition: hftest.hpp:166
int hypersleep< h_seconds >(unsigned amt)
Definition: hypersleep.hpp:83
std::ostream & get_ostr()
Definition: hftest.hpp:180
bool is_shutdown()
Definition: session.hpp:778
bool MyMenu::do_logout ( )
bool MyMenu::edit_msgs ( )

Definition at line 426 of file harness.cpp.

427 {
428  _cm->EditMsgs(_tty, _lst);
429  return true;
430 }
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
virtual F8API int EditMsgs(tty_save_state &tty, MsgList &lst) const
FIX8::MsgList _lst
Definition: myfix.hpp:153
FIX8::ConsoleMenu * _cm
Definition: myfix.hpp:154
Message * MyMenu::generate_new_order_single ( )

Definition at line 527 of file myfix.cpp.

References FIX8::GroupBase::create_group(), FIX8::MessageBase::find_group(), RandDev::getrandom(), FIX8::TEX::OrdType_LIMIT(), FIX8::TEX::Side_BUY(), and FIX8::TEX::TimeInForce_FILL_OR_KILL().

528 {
529  static unsigned oid(0);
530  ostringstream oistr;
531  oistr << "ord" << ++oid;
533  *nos << new TEX::TransactTime
534  << new TEX::OrderQty(1 + RandDev::getrandom(9999))
535  << new TEX::Price(RandDev::getrandom(500.), 5) // 5 decimal places if necessary
536  << new TEX::ClOrdID(oistr.str())
537  << new TEX::Symbol("BHP")
539  << new TEX::Side(TEX::Side_BUY)
541 
542  *nos << new TEX::NoPartyIDs(unsigned(0));
543  *nos << new TEX::NoUnderlyings(3);
544  GroupBase *noul(nos->find_group<TEX::NewOrderSingle::NoUnderlyings>());
545 
546  // repeating groups
547  MessageBase *gr1(noul->create_group());
548  *gr1 << new TEX::UnderlyingSymbol("BLAH")
549  << new TEX::UnderlyingQty(1 + RandDev::getrandom(999));
550  *noul << gr1;
551 
552  MessageBase *gr2(noul->create_group());
553  // nested repeating groups
554  *gr2 << new TEX::UnderlyingSymbol("FOO")
556  *noul << gr2;
558  MessageBase *gr3(nosai->create_group());
559  *gr3 << new TEX::UnderlyingSecurityAltID("UnderBlah");
560  *nosai << gr3;
561  MessageBase *gr4(nosai->create_group());
562  *gr4 << new TEX::UnderlyingSecurityAltID("OverFoo");
563  *nosai << gr4;
564 
565  MessageBase *gr5(noul->create_group());
566  *gr5 << new TEX::UnderlyingSymbol("BOOM");
567  // nested repeating groups
569  static const char *secIDs[] { "Reverera", "Orlanda", "Withroon", "Longweed", "Blechnod" };
570  *gr5 << new TEX::NoUnderlyingStips(sizeof(secIDs)/sizeof(char *));
571  for (size_t ii(0); ii < sizeof(secIDs)/sizeof(char *); ++ii)
572  {
573  MessageBase *gr(nus->create_group());
574  *gr << new TEX::UnderlyingStipType(secIDs[ii]);
575  *nus << gr;
576  }
577  *noul << gr5;
578 
579  // multiply nested repeating groups
580  *nos << new TEX::NoAllocs(1);
581  GroupBase *noall(nos->find_group<TEX::NewOrderSingle::NoAllocs>());
582  MessageBase *gr9(noall->create_group());
583  *gr9 << new TEX::AllocAccount("Account1")
584  << new TEX::NoNestedPartyIDs(1);
585  *noall << gr9;
587  MessageBase *gr10(nonp->create_group());
588  *gr10 << new TEX::NestedPartyID("nestedpartyID1")
589  << new TEX::NoNestedPartySubIDs(1);
590  *nonp << gr10;
592  MessageBase *gr11(nonpsid->create_group());
593  *gr11 << new TEX::NestedPartySubID("subnestedpartyID1");
594  *nonpsid << gr11;
595 
596  return nos;
597 }
Field< NumInGroup, 453 > NoPartyIDs
Field< NumInGroup, 711 > NoUnderlyings
Field< char, 54 > Side
Field< f8String, 524 > NestedPartyID
Field< Qty, 879 > UnderlyingQty
NoAllocs (78), application, 6 fields, 1 group, shares static data, hash: 0x210f1ab6.
Field< f8String, 545 > NestedPartySubID
const char TimeInForce_FILL_OR_KILL('4')
Field< NumInGroup, 78 > NoAllocs
Field< char, 59 > TimeInForce
static T getrandom(const T range=0)
Definition: hftest.hpp:219
Field< NumInGroup, 804 > NoNestedPartySubIDs
const char Side_BUY('1')
Field< f8String, 79 > AllocAccount
Field< price, 44 > Price
Field< char, 40 > OrdType
Field< NumInGroup, 539 > NoNestedPartyIDs
Abstract base class for all repeating groups.
Definition: message.hpp:59
NewOrderSingle (D), application, 243 fields, 11 groups.
const char OrdType_LIMIT('2')
Field< f8String, 11 > ClOrdID
Definition: Myfix_types.hpp:93
Field< f8String, 458 > UnderlyingSecurityAltID
Field template. There will ONLY be partial template specialisations of this template.
Definition: field.hpp:256
Field< NumInGroup, 887 > NoUnderlyingStips
Field< Qty, 38 > OrderQty
Field< f8String, 311 > UnderlyingSymbol
NoUnderlyings (711), application, 72 fields, 3 groups, shares static data, hash: 0xb078f5a8.
Base class for all fix messages.
Definition: message.hpp:381
Field< NumInGroup, 457 > NoUnderlyingSecurityAltID
Field< f8String, 888 > UnderlyingStipType
Message * MyMenu::generate_new_order_single_alternate ( )

Definition at line 454 of file myfix.cpp.

References FIX8::GroupBase::create_group(), FIX8::MessageBase::find_add_group(), RandDev::getrandom(), FIX8::TEX::OrdType_LIMIT(), FIX8::TEX::Side_BUY(), and FIX8::TEX::TimeInForce_FILL_OR_KILL().

455 {
456  static unsigned oid(0);
457  ostringstream oistr;
458  oistr << "ord" << ++oid;
459  TEX::NewOrderSingle *nos(new TEX::NewOrderSingle(false)); // shallow construction
460  *nos << new TEX::TransactTime
461  << new TEX::OrderQty(1 + RandDev::getrandom(9999))
462  << new TEX::Price(RandDev::getrandom(500.), 5) // 5 decimal places if necessary
463  << new TEX::ClOrdID(oistr.str())
464  << new TEX::Symbol("BHP")
466  << new TEX::Side(TEX::Side_BUY)
468 
469  *nos << new TEX::NoPartyIDs(unsigned(0));
470  *nos << new TEX::NoUnderlyings(3);
471  GroupBase *noul(nos->find_add_group<TEX::NewOrderSingle::NoUnderlyings>(nullptr)); // no parent group
472 
473  // repeating groups
474  MessageBase *gr1(noul->create_group(false)); // shallow construction
475  *gr1 << new TEX::UnderlyingSymbol("BLAH")
476  << new TEX::UnderlyingQty(1 + RandDev::getrandom(999));
477  *noul << gr1;
478 
479  MessageBase *gr2(noul->create_group(false)); // shallow construction
480  // nested repeating groups
481  *gr2 << new TEX::UnderlyingSymbol("FOO")
483  *noul << gr2;
484  GroupBase *nosai(gr2->find_add_group<TEX::NewOrderSingle::NoUnderlyings::NoUnderlyingSecurityAltID>(noul)); // parent is noul
485  MessageBase *gr3(nosai->create_group(false)); // shallow construction
486  *gr3 << new TEX::UnderlyingSecurityAltID("UnderBlah");
487  *nosai << gr3;
488  MessageBase *gr4(nosai->create_group(false)); // shallow construction
489  *gr4 << new TEX::UnderlyingSecurityAltID("OverFoo");
490  *nosai << gr4;
491 
492  MessageBase *gr5(noul->create_group(false)); // shallow construction
493  *gr5 << new TEX::UnderlyingSymbol("BOOM");
494  // nested repeating groups
495  GroupBase *nus(gr5->find_add_group<TEX::NewOrderSingle::NoUnderlyings::NoUnderlyingStips>(noul)); // parent is noul
496  static const char *secIDs[] { "Reverera", "Orlanda", "Withroon", "Longweed", "Blechnod" };
497  *gr5 << new TEX::NoUnderlyingStips(sizeof(secIDs)/sizeof(char *));
498  for (size_t ii(0); ii < sizeof(secIDs)/sizeof(char *); ++ii)
499  {
500  MessageBase *gr(nus->create_group(false)); // shallow construction
501  *gr << new TEX::UnderlyingStipType(secIDs[ii]);
502  *nus << gr;
503  }
504  *noul << gr5;
505 
506  // multiply nested repeating groups
507  *nos << new TEX::NoAllocs(1);
508  GroupBase *noall(nos->find_add_group<TEX::NewOrderSingle::NoAllocs>(nullptr)); // no parent group
509  MessageBase *gr9(noall->create_group(false)); // shallow construction
510  *gr9 << new TEX::AllocAccount("Account1")
511  << new TEX::NoNestedPartyIDs(1);
512  *noall << gr9;
513  GroupBase *nonp(gr9->find_add_group<TEX::NewOrderSingle::NoAllocs::NoNestedPartyIDs>(noall)); // parent is noall
514  MessageBase *gr10(nonp->create_group(false)); // shallow construction
515  *gr10 << new TEX::NestedPartyID("nestedpartyID1")
516  << new TEX::NoNestedPartySubIDs(1);
517  *nonp << gr10;
518  GroupBase *nonpsid(gr10->find_add_group<TEX::NewOrderSingle::NoAllocs::NoNestedPartyIDs::NoNestedPartySubIDs>(nonp)); // parent is nonp
519  MessageBase *gr11(nonpsid->create_group(false)); // shallow construction
520  *gr11 << new TEX::NestedPartySubID("subnestedpartyID1");
521  *nonpsid << gr11;
522 
523  return nos;
524 }
Field< NumInGroup, 453 > NoPartyIDs
Field< NumInGroup, 711 > NoUnderlyings
Field< char, 54 > Side
Field< f8String, 524 > NestedPartyID
Field< Qty, 879 > UnderlyingQty
NoAllocs (78), application, 6 fields, 1 group, shares static data, hash: 0x210f1ab6.
Field< f8String, 545 > NestedPartySubID
const char TimeInForce_FILL_OR_KILL('4')
Field< NumInGroup, 78 > NoAllocs
Field< char, 59 > TimeInForce
static T getrandom(const T range=0)
Definition: hftest.hpp:219
Field< NumInGroup, 804 > NoNestedPartySubIDs
const char Side_BUY('1')
Field< f8String, 79 > AllocAccount
Field< price, 44 > Price
Field< char, 40 > OrdType
Field< NumInGroup, 539 > NoNestedPartyIDs
Abstract base class for all repeating groups.
Definition: message.hpp:59
NewOrderSingle (D), application, 243 fields, 11 groups.
const char OrdType_LIMIT('2')
Field< f8String, 11 > ClOrdID
Definition: Myfix_types.hpp:93
Field< f8String, 458 > UnderlyingSecurityAltID
Field template. There will ONLY be partial template specialisations of this template.
Definition: field.hpp:256
Field< NumInGroup, 887 > NoUnderlyingStips
Field< Qty, 38 > OrderQty
Field< f8String, 311 > UnderlyingSymbol
NoUnderlyings (711), application, 72 fields, 3 groups, shares static data, hash: 0xb078f5a8.
Base class for all fix messages.
Definition: message.hpp:381
Field< NumInGroup, 457 > NoUnderlyingSecurityAltID
Field< f8String, 888 > UnderlyingStipType
std::istream& MyMenu::get_istr ( )
inline

Definition at line 179 of file hftest.hpp.

References _istr.

179 { return _istr; }
std::istream _istr
Definition: hftest.hpp:167
std::istream& MyMenu::get_istr ( )
inline

Definition at line 180 of file myfix.hpp.

References _istr.

180 { return _istr; }
std::istream _istr
Definition: hftest.hpp:167
unsigned MyMenu::get_msg_cnt ( ) const
inline

Definition at line 221 of file myfix.hpp.

221 { return _lst.size(); }
FIX8::MsgList _lst
Definition: myfix.hpp:153
std::ostream& MyMenu::get_ostr ( )
inline

Definition at line 180 of file hftest.hpp.

References _ostr.

180 { return _ostr; }
std::ostream & _ostr
Definition: hftest.hpp:168
std::ostream& MyMenu::get_ostr ( )
inline

Definition at line 181 of file myfix.hpp.

References _ostr.

181 { return _ostr; }
std::ostream & _ostr
Definition: hftest.hpp:168
FIX8::f8String& MyMenu::get_string ( FIX8::f8String to)
inline

Definition at line 225 of file myfix.hpp.

References FIX8::tty_save_state::set_raw_mode(), and FIX8::tty_save_state::unset_raw_mode().

226  {
227  char buff[128] {};
229  _istr.getline(buff, sizeof(buff));
230  _tty.set_raw_mode();
231  return to = buff;
232  }
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
std::istream _istr
Definition: hftest.hpp:167
FIX8::tty_save_state& MyMenu::get_tty ( )
inline

Definition at line 197 of file hftest.hpp.

References _tty.

Referenced by main().

197 { return _tty; }
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
FIX8::tty_save_state& MyMenu::get_tty ( )
inline

Definition at line 223 of file myfix.hpp.

References _tty.

223 { return _tty; }
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
bool MyMenu::help ( )

Definition at line 345 of file harness.cpp.

346 {
347  get_ostr() << endl;
348  get_ostr() << "Key\tCommand" << endl;
349  get_ostr() << "===\t=======" << endl;
350  for (const auto& pp : _handlers)
351  get_ostr() << pp.first._key << '\t' << pp.first._help << endl;
352  get_ostr() << endl;
353  return true;
354 }
static const Handlers _handlers
Definition: hftest.hpp:171
std::ostream & get_ostr()
Definition: hftest.hpp:180
bool MyMenu::help ( )
bool MyMenu::load_msgs ( const std::string &  fname)

Definition at line 533 of file harness.cpp.

References FIX8::Common_SendingTime(), FIX8::TEX::ctx(), FIX8_MAX_MSG_LENGTH, FIX8::MessageBase::get(), FIX8::Message::Header(), FIX8::Message::is_admin(), FIX8::MessageBase::remove(), FIX8::Message::setup_reuse(), and FIX8::Str_error().

534 {
535  ifstream ifs(fname.c_str());
536  if (!ifs)
537  {
538  cerr << Str_error(errno, "Could not open file");
539  return false;
540  }
541 
542  char buffer[FIX8_MAX_MSG_LENGTH];
543  unsigned loaded(0), skipped(0);
544  while (!ifs.eof())
545  {
546  ifs.getline(buffer, FIX8_MAX_MSG_LENGTH - 1);
547  if (!buffer[0])
548  continue;
549  Message *msg(Message::factory(TEX::ctx(), buffer));
550  if (msg->is_admin())
551  {
552  ++skipped;
553  continue;
554  }
555  sender_comp_id sci;
556  msg->Header()->get(sci);
557  target_comp_id tci;
558  msg->Header()->get(tci);
560  {
561  ++loaded;
562  delete msg->Header()->remove(Common_SendingTime); // will re-add on send
563  msg->setup_reuse();
564  _lst.push_back(msg);
565  }
566  else
567  ++skipped;
568  }
569 
570  _ostr << loaded << " msgs loaded, " << skipped << " msgs skipped" << endl;
571 
572  return true;
573 }
std::ostream & _ostr
Definition: hftest.hpp:168
F8API std::string Str_error(const int err, const char *str=0)
Definition: f8utils.cpp:165
bool same_side_target_comp_id(const target_comp_id &targetCompID) const
Definition: session.hpp:124
const SessionID & get_sid() const
Definition: session.hpp:746
const F8MetaCntx & ctx()
Compiler generated metadata object, accessed through this function.
hf_session_client & _session
Definition: hftest.hpp:166
#define FIX8_MAX_MSG_LENGTH
Definition: f8config.h:576
const unsigned short Common_SendingTime(52)
A complete Fix message with header, body and trailer.
Definition: message.hpp:1058
bool same_side_sender_comp_id(const sender_comp_id &senderCompID) const
Definition: session.hpp:129
FIX8::MsgList _lst
Definition: myfix.hpp:153
bool MyMenu::multi_new_order_single ( )

Definition at line 403 of file hftest.cpp.

404 {
405  cout << "Enter number of NewOrderSingle msgs to send:";
406  cout.flush();
407  unsigned num(0);
409  cin >> num;
410  _tty.set_raw_mode();
411  for (unsigned ii(0); ii < num; ++ii)
413  cout << endl << num << " NewOrderSingle msgs sent" << endl;
414 
415  return true;
416 }
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
bool new_order_single()
Definition: hftest.cpp:419
bool MyMenu::new_order_single ( )

Definition at line 419 of file hftest.cpp.

References RandDev::getrandom(), FIX8::TEX::HandlInst_AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION(), FIX8::TEX::OrdType_LIMIT(), FIX8::TEX::Side_BUY(), and FIX8::TEX::TimeInForce_FILL_OR_KILL().

420 {
421  static unsigned oid(0);
422  ostringstream oistr;
423  oistr << "ord" << ++oid;
424 
426  *nos << new FIX8::TEX::TransactTime
427  << new FIX8::TEX::OrderQty(1 + RandDev::getrandom(10000))
428  << new FIX8::TEX::Price(1. + RandDev::getrandom(500.))
429  << new FIX8::TEX::ClOrdID(oistr.str())
430  << new FIX8::TEX::Symbol("BHP")
435 
436  _session.send(nos);
437 
438  return true;
439 }
Field< char, 54 > Side
const char HandlInst_AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION('1')
const char TimeInForce_FILL_OR_KILL('4')
Field< char, 59 > TimeInForce
static T getrandom(const T range=0)
Definition: hftest.hpp:219
const char Side_BUY('1')
Field< price, 44 > Price
Field< char, 40 > OrdType
virtual F8API bool send(Message *msg, bool destroy=true, const unsigned custom_seqnum=0, const bool no_increment=false)
Definition: session.cpp:978
NewOrderSingle (D), application, 243 fields, 11 groups.
Field< char, 21 > HandlInst
hf_session_client & _session
Definition: hftest.hpp:166
const char OrdType_LIMIT('2')
Field< f8String, 11 > ClOrdID
Definition: Myfix_types.hpp:93
Field template. There will ONLY be partial template specialisations of this template.
Definition: field.hpp:256
Field< Qty, 38 > OrderQty
bool MyMenu::new_order_single ( )
bool MyMenu::new_order_single_1000 ( )

Definition at line 692 of file myfix.cpp.

693 {
694  vector<Message *> msgs;
695  for (auto ii(0); ii < 1000; ++ii)
696  msgs.push_back(generate_new_order_single());
697 
698  _session.send_batch(msgs);
699  return true;
700 }
FIX8::Message * generate_new_order_single()
Definition: myfix.cpp:527
hf_session_client & _session
Definition: hftest.hpp:166
virtual F8API size_t send_batch(const std::vector< Message * > &msgs, bool destroy=true)
Definition: session.cpp:997
bool MyMenu::new_order_single_50 ( )

Definition at line 681 of file myfix.cpp.

682 {
683  vector<Message *> msgs;
684  for (auto ii(0); ii < 50; ++ii)
685  msgs.push_back(generate_new_order_single());
686 
687  _session.send_batch(msgs);
688  return true;
689 }
FIX8::Message * generate_new_order_single()
Definition: myfix.cpp:527
hf_session_client & _session
Definition: hftest.hpp:166
virtual F8API size_t send_batch(const std::vector< Message * > &msgs, bool destroy=true)
Definition: session.cpp:997
bool MyMenu::new_order_single_alternate ( )

Definition at line 600 of file myfix.cpp.

601 {
603  return true;
604 }
FIX8::Message * generate_new_order_single_alternate()
Definition: myfix.cpp:454
virtual F8API bool send(Message *msg, bool destroy=true, const unsigned custom_seqnum=0, const bool no_increment=false)
Definition: session.cpp:978
hf_session_client & _session
Definition: hftest.hpp:166
bool MyMenu::new_order_single_recycled ( )

Definition at line 614 of file myfix.cpp.

References FIX8::Message::setup_reuse().

615 {
616  // create a message; first time through we just send it as normal. Note the we pass the no-destroy flag;
617  // second and subsequent times we just recyle the old message
618 
619  static bool first(true);
620  static Message *msg(0);
621  if (first)
622  {
623  cout << "Sending new new_order_single" << endl;
624  _session.send(msg = generate_new_order_single(), first = false);
625  }
626  else
627  {
628  msg->setup_reuse();
629  cout << "Sending recycled new_order_single" << endl;
630  _session.send(msg, false);
631  }
632 #if defined FIX8_RAW_MSG_SUPPORT
633  // demonstrate access to outbound raw fix message and payload
634  cout << msg->get_rawmsg() << endl;
635  copy(msg->begin_payload(), msg->end_payload(), ostream_iterator<char>(cout, ""));
636  cout << endl;
637  cout << "payload begin=" << msg->get_payload_begin() << " payload len=" << msg->get_payload_len() << endl;
638 #endif
639  return true;
640 }
FIX8::Message * generate_new_order_single()
Definition: myfix.cpp:527
virtual F8API bool send(Message *msg, bool destroy=true, const unsigned custom_seqnum=0, const bool no_increment=false)
Definition: session.cpp:978
hf_session_client & _session
Definition: hftest.hpp:166
A complete Fix message with header, body and trailer.
Definition: message.hpp:1058
bool MyMenu::preload_new_order_single ( )

Definition at line 491 of file hftest.cpp.

References RandDev::getrandom(), FIX8::TEX::HandlInst_AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION(), FIX8::TEX::OrdType_LIMIT(), preload_count(), FIX8::TEX::Side_BUY(), FIX8::MessageBase::size(), and FIX8::TEX::TimeInForce_FILL_OR_KILL().

Referenced by main().

492 {
493  cout << endl;
494  if (_session.size())
495  cout << _session.size() << " NewOrderSingle msgs currently preloaded." << endl;
496  unsigned num(preload_count);
497  if (!num)
498  {
499  cout << "Enter number of NewOrderSingle msgs to preload:";
500  cout.flush();
502  cin >> num;
503  _tty.set_raw_mode();
504  }
505  else
506  cout << "loading..." << endl;
507  for (unsigned ii(0); ii < num; ++ii)
508  {
509  static unsigned oid(10000);
510  ostringstream oistr;
511  oistr << "ord" << ++oid << '-' << num;
512 
514 
515  *ptr << new FIX8::TEX::Symbol("BHP")
521  << new FIX8::TEX::Price(1. + RandDev::getrandom(500.), 3) // precision=3
522  << new FIX8::TEX::ClOrdID(oistr.str())
523  << new FIX8::TEX::OrderQty(1 + RandDev::getrandom(10000));
524 #if defined FIX8_PREENCODE_MSG_SUPPORT
525  ptr->preencode(); // pre-encode message payload (not header or trailer)
526 #endif
527  _session.push(ptr);
528  }
529 
530  cout << _session.size() << " NewOrderSingle msgs preloaded." << endl;
531 
532  return true;
533 }
Field< char, 54 > Side
const char HandlInst_AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION('1')
unsigned preload_count(0)
const char TimeInForce_FILL_OR_KILL('4')
Field< char, 59 > TimeInForce
static T getrandom(const T range=0)
Definition: hftest.hpp:219
const char Side_BUY('1')
Field< price, 44 > Price
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
Field< char, 40 > OrdType
NewOrderSingle (D), application, 243 fields, 11 groups.
Field< char, 21 > HandlInst
int size() const
Definition: hftest.hpp:99
hf_session_client & _session
Definition: hftest.hpp:166
const char OrdType_LIMIT('2')
Field< f8String, 11 > ClOrdID
Definition: Myfix_types.hpp:93
Field template. There will ONLY be partial template specialisations of this template.
Definition: field.hpp:256
Field< f8String, 55 > Symbol
void push(FIX8::TEX::NewOrderSingle *nos)
Definition: hftest.hpp:88
bool MyMenu::print_msgs ( )

Definition at line 463 of file harness.cpp.

464 {
465  for (const auto *pp : _lst)
466  _ostr << *pp << endl;
467  return true;
468 }
std::ostream & _ostr
Definition: hftest.hpp:168
FIX8::MsgList _lst
Definition: myfix.hpp:153
bool MyMenu::process ( char  ch)
inline

Definition at line 181 of file hftest.hpp.

182  {
183  auto itr(_handlers.find({ch}));
184  return itr == _handlers.end() ? true : (this->*itr->second)();
185  }
static const Handlers _handlers
Definition: hftest.hpp:171
bool MyMenu::process ( char  ch)
inline

Definition at line 182 of file myfix.hpp.

183  {
184  auto itr(_handlers.find({ch}));
185  if (itr == _handlers.end())
186  {
187  _ostr << "Command not found";
188  return true;
189  }
190  return (this->*itr->second)();
191  }
std::ostream & _ostr
Definition: hftest.hpp:168
static const Handlers _handlers
Definition: hftest.hpp:171
bool MyMenu::read_msgs ( )

Definition at line 576 of file harness.cpp.

References FIX8_MAX_FLD_LENGTH.

577 {
578  char cwd[FIX8_MAX_FLD_LENGTH];
579  _ostr << "Playback (*.playback) files in ";
580 #ifdef _MSC_VER
581  _ostr << _getcwd(cwd, sizeof(cwd)) << endl;
582  if (system("dir *.playback"));
583 #else
584  _ostr << getcwd(cwd, sizeof(cwd)) << endl;
585  if (system("ls -l *.playback"));
586 #endif
587  _ostr << endl;
588  _ostr << "Enter filename: " << flush;
589  string fname;
590  if (!_cm->GetString(_tty, fname).empty())
591  load_msgs(fname);
592  return true;
593 }
std::ostream & _ostr
Definition: hftest.hpp:168
F8API f8String & GetString(tty_save_state &tty, f8String &to) const
#define FIX8_MAX_FLD_LENGTH
Definition: f8config.h:571
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
bool load_msgs(const std::string &fname)
Definition: harness.cpp:533
FIX8::ConsoleMenu * _cm
Definition: myfix.hpp:154
bool MyMenu::resend_request ( )

Definition at line 727 of file myfix.cpp.

728 {
729  if (!_session.is_shutdown())
730  {
731  unsigned bnum(0), bend(0);
732  cout << "Enter BeginSeqNo:" << flush;
734  cin >> bnum;
735  cout << "Enter EndSeqNo(0=all):" << flush;
736  cin >> bend;
737  _tty.set_raw_mode();
739  }
740  return true;
741 }
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
virtual F8API bool send(Message *msg, bool destroy=true, const unsigned custom_seqnum=0, const bool no_increment=false)
Definition: session.cpp:978
hf_session_client & _session
Definition: hftest.hpp:166
virtual F8API Message * generate_resend_request(const unsigned begin, const unsigned end=0)
Definition: session.cpp:957
bool is_shutdown()
Definition: session.hpp:778
bool MyMenu::save_msg ( const std::string &  fname,
FIX8::Message msg 
)

Definition at line 496 of file harness.cpp.

References FIX8::exist(), and FIX8::Str_error().

497 {
498 #if !defined FIX8_RAW_MSG_SUPPORT
499  cerr << endl << "RAW_MSG_SUPPORT support not enabled. Run configure with --enable-rawmsgsupport" << endl;
500 #else
501  if (exist(fname))
502  _ostr << endl << fname << " exists, will append message" << endl;
503  ofstream ofs(fname.c_str(), ios::app);
504  if (!ofs)
505  {
506  cerr << Str_error(errno, "Could not open file");
507  return false;
508  }
509  ofs << msg->get_rawmsg() << endl; // requires fix8 built with --enable-rawmsgsupport
510 #endif
511  return true;
512 }
std::ostream & _ostr
Definition: hftest.hpp:168
F8API std::string Str_error(const int err, const char *str=0)
Definition: f8utils.cpp:165
bool exist(const std::string &fname)
Definition: f8utils.hpp:1068
bool MyMenu::send_all_preloaded ( )

Definition at line 442 of file hftest.cpp.

References update_count().

443 {
444  const unsigned tosend(_session.size());
445  cout << "Sending " << tosend << " NewOrderSingle msgs ..." << flush;
446  unsigned snt(0);
447  while (_session.cached())
448  {
450  if (!ptr)
451  break;
452  _session.send(ptr);
453  if (++snt % update_count == 0)
454  {
455  cout << '\r' << snt << " NewOrderSingle msgs sent ";
456  cout.flush();
457  }
458  }
459  cout << endl << snt << " NewOrderSingle msgs sent." << endl;
460  return true;
461 }
virtual F8API bool send(Message *msg, bool destroy=true, const unsigned custom_seqnum=0, const bool no_increment=false)
Definition: session.cpp:978
NewOrderSingle (D), application, 243 fields, 11 groups.
int size() const
Definition: hftest.hpp:99
hf_session_client & _session
Definition: hftest.hpp:166
FIX8::TEX::NewOrderSingle * pop()
Definition: hftest.hpp:89
unsigned update_count(5000)
bool cached() const
Definition: hftest.hpp:98
bool MyMenu::send_all_preloaded ( coroutine coro,
FIX8::Session ses 
)

Definition at line 464 of file hftest.cpp.

References batch_size(), coro_yield, FIX8::Session::get_connection(), reenter, FIX8::Connection::set_tcp_cork_flag(), and FIX8::Connection::writer_poll().

465 {
466  unsigned snt(0);
468 
469  reenter(coro)
470  {
471  ses->get_connection()->set_tcp_cork_flag(true);
472  while (_session.cached())
473  {
474  if (ses->get_connection()->writer_poll())
475  {
476  if (!(ptr = _session.pop()))
477  break;
478  _session.send(ptr);
479  if (++snt % batch_size)
480  continue;
481  }
482  ses->get_connection()->set_tcp_cork_flag(false);
483  coro_yield;
484  }
485  }
486  ses->get_connection()->set_tcp_cork_flag(false);
487  return _session.cached();
488 }
Connection * get_connection()
Definition: session.hpp:665
virtual F8API bool send(Message *msg, bool destroy=true, const unsigned custom_seqnum=0, const bool no_increment=false)
Definition: session.cpp:978
NewOrderSingle (D), application, 243 fields, 11 groups.
hf_session_client & _session
Definition: hftest.hpp:166
#define reenter(c)
Definition: yield.hpp:12
FIX8::TEX::NewOrderSingle * pop()
Definition: hftest.hpp:89
void set_tcp_cork_flag(bool way) const
Definition: connection.hpp:661
bool writer_poll(const Poco::Timespan &ts=Poco::Timespan()) const
Definition: connection.hpp:688
#define coro_yield
Definition: yield.hpp:16
unsigned batch_size(1000)
bool cached() const
Definition: hftest.hpp:98
void MyMenu::send_lst ( )

Definition at line 447 of file harness.cpp.

448 {
449  for (auto *pp : _lst)
450  _session.send(pp);
451  _lst.clear();
452 }
virtual F8API bool send(Message *msg, bool destroy=true, const unsigned custom_seqnum=0, const bool no_increment=false)
Definition: session.cpp:978
hf_session_client & _session
Definition: hftest.hpp:166
FIX8::MsgList _lst
Definition: myfix.hpp:153
bool MyMenu::send_msg ( )

Definition at line 471 of file harness.cpp.

472 {
473  unique_ptr<Message> msg(_cm->RemoveMsg(_tty, _lst));
474  if (msg.get())
475  {
476  string fname;
477  _ostr << endl;
478  bool save(_cm->get_yn("Save message after send? (y/n):", true));
479  _ostr << endl;
480  if (save)
481  {
482  _ostr << "Enter filename: " << flush;
483  _cm->GetString(_tty, fname);
484  }
485  if (_cm->get_yn("Send message? (y/n):", true))
486  {
487  _session.send(msg.get(), false);
488  if (save && !fname.empty())
489  save_msg(fname, msg.get());
490  }
491  }
492  return true;
493 }
std::ostream & _ostr
Definition: hftest.hpp:168
F8API f8String & GetString(tty_save_state &tty, f8String &to) const
F8API Message * RemoveMsg(tty_save_state &tty, MsgList &lst) const
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
bool save_msg(const std::string &fname, FIX8::Message *msg)
Definition: harness.cpp:496
virtual F8API bool send(Message *msg, bool destroy=true, const unsigned custom_seqnum=0, const bool no_increment=false)
Definition: session.cpp:978
hf_session_client & _session
Definition: hftest.hpp:166
FIX8::MsgList _lst
Definition: myfix.hpp:153
FIX8::ConsoleMenu * _cm
Definition: myfix.hpp:154
bool get_yn(const f8String &prompt, bool echo=false) const
Definition: consolemenu.hpp:83
bool MyMenu::send_msgs ( )

Definition at line 455 of file harness.cpp.

456 {
457  if (_lst.size() && _cm->get_yn("Send messages? (y/n):", true))
458  send_lst();
459  return true;
460 }
void send_lst()
Definition: harness.cpp:447
FIX8::MsgList _lst
Definition: myfix.hpp:153
FIX8::ConsoleMenu * _cm
Definition: myfix.hpp:154
bool get_yn(const f8String &prompt, bool echo=false) const
Definition: consolemenu.hpp:83
bool MyMenu::set_lpp ( )

Definition at line 357 of file harness.cpp.

358 {
359  _ostr << "Enter number of lines per page (currently=" << _cm->get_lpp() << "): " << flush;
360  f8String str;
361  if (!_cm->GetString(_tty, str).empty())
362  _cm->set_lpp(stoi(str));
363  return true;
364 }
std::ostream & _ostr
Definition: hftest.hpp:168
F8API f8String & GetString(tty_save_state &tty, f8String &to) const
FIX8::tty_save_state _tty
Definition: hftest.hpp:153
FIX8::ConsoleMenu * _cm
Definition: myfix.hpp:154
void set_lpp(int lpp)
Definition: consolemenu.hpp:81
int get_lpp() const
Definition: consolemenu.hpp:80
std::string f8String
Definition: f8types.hpp:47
bool MyMenu::static_probe ( )

Definition at line 643 of file myfix.cpp.

References FIX8::BaseMsgEntry::_create, FIX8::BaseMsgEntry::_name, FIX8::BaseEntry::_name, and spacer.

644 {
645 #if defined FIX8_HAVE_EXTENDED_METADATA
646  (cout << "Enter message tag:").flush();
647  f8String result;
648  const BaseMsgEntry *tbme;
649  if (!get_string(result).empty() && (tbme = _session.get_ctx()._bme.find_ptr(result.c_str())))
650  {
651  function<void( const TraitHelper&, int )> print_traits;
652  print_traits = ([&print_traits, this](const TraitHelper& tr, int depth)
653  {
654  const string spacer(depth * MessageBase::get_tabsize(), ' ');
655  for (F8MetaCntx::const_iterator itr(F8MetaCntx::begin(tr)); itr != F8MetaCntx::end(tr); ++itr)
656  {
657  const BaseEntry *be(_session.get_ctx().find_be(itr->_fnum));
658  cout << spacer << be->_name;
659  if (be->_rlm)
660  cout << " Realm:" << (be->_rlm->_dtype == RealmBase::dt_range ? "range" : "set")
661  << '(' << be->_rlm->_sz << ") ";
662  cout << *itr << endl;
663  if (itr->_field_traits.has(FieldTrait::group))
664  print_traits(itr->_group, depth + 1);
665  }
666  });
667 
668  cout << tbme->_name << endl;
669  print_traits(tbme->_create._get_traits(), 1);
670  }
671  else
672  cout << "Unknown message tag: " << result << endl;
673 #else
674  cout << "Extended metadata not available (try ./configure --enable-extended-metadata=yes)." << endl;
675 #endif
676 
677  return true;
678 }
const MsgTable & _bme
Framework generated lookup table to generate Fix messages.
Definition: message.hpp:216
Message instantiation table entry.
Definition: message.hpp:192
const F8MetaCntx & get_ctx() const
Definition: session.hpp:673
const char * _name
Definition: message.hpp:195
string spacer
Definition: f8c.cpp:96
hf_session_client & _session
Definition: hftest.hpp:166
const BaseEntry * find_be(const unsigned short fnum) const
Definition: message.hpp:267
FIX8::f8String & get_string(FIX8::f8String &to)
Definition: myfix.hpp:225
const Minst _create
Definition: message.hpp:194
const Val * find_ptr(const Key &key) const
Definition: f8types.hpp:154
std::string f8String
Definition: f8types.hpp:47
bool MyMenu::toggle_heartbeats ( )

Definition at line 515 of file harness.cpp.

516 {
517  if (_session.control() & Session::printnohb)
518  {
519  _session.control().clear(Session::printnohb);
520  _session.control().set(Session::print);
521  get_ostr() << "Heartbeat display on";
522  }
523  else
524  {
525  _session.control().clear(Session::print);
526  _session.control().set(Session::printnohb);
527  get_ostr() << "Heartbeat display off";
528  }
529  return true;
530 }
hf_session_client & _session
Definition: hftest.hpp:166
void set(const T sbit, bool on=true)
Definition: f8utils.hpp:985
void clear(const T sbit)
Definition: f8utils.hpp:1011
std::ostream & get_ostr()
Definition: hftest.hpp:180
Control & control()
Definition: session.hpp:774
bool MyMenu::version_info ( )

Definition at line 417 of file harness.cpp.

References FIX8::package_info().

418 {
419  _ostr << endl;
420  for (const auto& pp : package_info())
421  _ostr << pp.first << ": " << pp.second << endl;
422  return true;
423 }
std::ostream & _ostr
Definition: hftest.hpp:168
F8API const Package_info & package_info()
Definition: f8utils.cpp:247
bool MyMenu::write_msgs ( )

Member Data Documentation

FIX8::ConsoleMenu* MyMenu::_cm
private

Definition at line 154 of file myfix.hpp.

static const Handlers MyMenu::_handlers
staticprivate
Initial value:
{
{ { 'c', "Create messages" }, &MyMenu::create_msgs },
{ { 'e', "Edit messages" }, &MyMenu::edit_msgs },
{ { 'd', "Delete one message" }, &MyMenu::delete_msg },
{ { 'D', "Delete all messages" }, &MyMenu::delete_msgs },
{ { 'p', "Print messages" }, &MyMenu::print_msgs },
{ { 's', "Send messages" }, &MyMenu::send_msgs },
{ { 'r', "Read messages from disk" }, &MyMenu::read_msgs },
{ { 'S', "Send one message, optionally save before send" }, &MyMenu::send_msg },
{ { 't', "Toggle heartbeat message display" }, &MyMenu::toggle_heartbeats },
{ { '?', "Help" }, &MyMenu::help },
{ { 'l', "Logout" }, &MyMenu::do_logout },
{ { 'L', "Set Lines per page" }, &MyMenu::set_lpp },
{ { 'v', "Show version info" }, &MyMenu::version_info },
{ { 'x', "Exit" }, &MyMenu::do_exit },
}

Definition at line 171 of file hftest.hpp.

std::istream MyMenu::_istr
private

Definition at line 167 of file hftest.hpp.

Referenced by get_istr().

FIX8::MsgList MyMenu::_lst
private

Definition at line 153 of file myfix.hpp.

std::ostream & MyMenu::_ostr
private

Definition at line 168 of file hftest.hpp.

Referenced by get_ostr().

hf_session_client& MyMenu::_session
private

Definition at line 166 of file hftest.hpp.

myfix_session_client& MyMenu::_session
private

Definition at line 167 of file myfix.hpp.

FIX8::tty_save_state MyMenu::_tty
private

Definition at line 153 of file hftest.hpp.

Referenced by get_tty().


The documentation for this class was generated from the following files: