CppTrader  1.0.4.0
C++ Trader
symbol.inl
Go to the documentation of this file.
1 
9 namespace CppTrader {
10 namespace Matching {
11 
12 inline Symbol::Symbol(uint32_t id, const char name[8]) noexcept
13  : Id(id)
14 {
15  std::memcpy(Name, name, sizeof(Name));
16 }
17 
18 template <class TOutputStream>
19 inline TOutputStream& operator<<(TOutputStream& stream, const Symbol& symbol)
20 {
21  stream << "Symbol(Id=" << symbol.Id
22  << "; Name=" << CppCommon::WriteString(symbol.Name)
23  << ")";
24  return stream;
25 }
26 
27 } // namespace Matching
28 } // namespace CppTrader
TOutputStream & operator<<(TOutputStream &stream, ErrorCode error)
Definition: errors.inl:13
C++ Trader project definitions.
Definition: errors.h:16
uint32_t Id
Symbol Id.
Definition: symbol.h:24
Symbol() noexcept=default
char Name[8]
Symbol name.
Definition: symbol.h:26