CppTrader  1.0.4.0
C++ Trader
errors.inl
Go to the documentation of this file.
1 
9 namespace CppTrader {
10 namespace Matching {
11 
12 template <class TOutputStream>
13 inline TOutputStream& operator<<(TOutputStream& stream, ErrorCode error)
14 {
15  switch (error)
16  {
17  case ErrorCode::OK:
18  stream << "OK";
19  break;
21  stream << "SYMBOL_DUPLICATE";
22  break;
24  stream << "SYMBOL_NOT_FOUND";
25  break;
27  stream << "ORDER_BOOK_DUPLICATE";
28  break;
30  stream << "ORDER_BOOK_NOT_FOUND";
31  break;
33  stream << "ORDER_DUPLICATE";
34  break;
36  stream << "ORDER_NOT_FOUND";
37  break;
39  stream << "ORDER_ID_INVALID";
40  break;
42  stream << "ORDER_TYPE_INVALID";
43  break;
45  stream << "ORDER_PARAMETER_INVALID";
46  break;
48  stream << "ORDER_QUANTITY_INVALID";
49  break;
50  default:
51  stream << "<unknown>";
52  break;
53  }
54  return stream;
55 }
56 
57 } // namespace Matching
58 } // namespace CppTrader
ErrorCode
Error code.
Definition: errors.h:21
TOutputStream & operator<<(TOutputStream &stream, ErrorCode error)
Definition: errors.inl:13
C++ Trader project definitions.
Definition: errors.h:16