kraken: move 'Order' definition to 'book'
I think it makes more sense to centralise these important types in the `book` library.
This commit is contained in:
parent
7c9b61b654
commit
21ff896730
|
@ -1,6 +1,7 @@
|
|||
add_executable(kraken kraken.cc)
|
||||
target_link_libraries(kraken PRIVATE common_options)
|
||||
|
||||
add_subdirectory(book)
|
||||
add_subdirectory(csv)
|
||||
add_subdirectory(parse)
|
||||
add_subdirectory(utils)
|
||||
|
@ -8,6 +9,7 @@ add_subdirectory(utils)
|
|||
configure_file(config.h.in config.h)
|
||||
|
||||
target_link_libraries(kraken PRIVATE
|
||||
book
|
||||
csv
|
||||
parse
|
||||
)
|
||||
|
|
10
src/book/CMakeLists.txt
Normal file
10
src/book/CMakeLists.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
add_library(book STATIC
|
||||
order.cc
|
||||
order.hh
|
||||
)
|
||||
|
||||
target_link_libraries(book PRIVATE
|
||||
utils
|
||||
)
|
||||
|
||||
target_link_libraries(book PRIVATE common_options)
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "utils/strong-type.hh"
|
||||
|
||||
namespace kraken::parse {
|
||||
namespace kraken {
|
||||
|
||||
/// Which side the order is on.
|
||||
enum class Side {
|
||||
|
@ -68,4 +68,4 @@ struct FlushOrder {
|
|||
|
||||
using Order = std::variant<TradeOrder, CancelOrder, FlushOrder>;
|
||||
|
||||
} // namespace kraken::parse
|
||||
} // namespace kraken
|
|
@ -1,11 +1,10 @@
|
|||
add_library(parse STATIC
|
||||
order.cc
|
||||
order.hh
|
||||
parse.cc
|
||||
parse.hh
|
||||
)
|
||||
|
||||
target_link_libraries(parse PRIVATE
|
||||
book
|
||||
csv
|
||||
utils
|
||||
)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
#include "order.hh"
|
||||
#include "book/order.hh"
|
||||
|
||||
namespace kraken::parse {
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "parse/parse.hh"
|
||||
|
||||
// Allow namespace pollution in tests for convenience
|
||||
using namespace kraken;
|
||||
using namespace kraken::parse;
|
||||
|
||||
namespace {
|
||||
|
|
Loading…
Reference in a new issue