diff --git a/html/Algo_8cc.html b/html/Algo_8cc.html deleted file mode 100644 index 8a6d2df..0000000 --- a/html/Algo_8cc.html +++ /dev/null @@ -1,182 +0,0 @@ - - -
- - - - -#include <sstream>
#include <Algo.hh>
#include <readers/JSONReader.hh>
#include <nlohmann/json.hpp>
#include <memory>
#include <queue>
#include <atomic>
#include <thread>
#include <future>
#include "Publisher.hh"
#include "utils/ThreadSafeQueue.hh"
#include "utils/ThreadPool.hh"
Go to the source code of this file.
--Classes | |
class | Algo |
#include "Controller.hh"
#include "Algo.hh"
Go to the source code of this file.
--Classes | |
class | Controller |
#include <fstream>
#include <iostream>
#include "readers/JSONReader.hh"
#include <Algo.hh>
#include "trading.pb.h"
-Namespaces | |
namespace | readers |
namespace | readers::json |
-Functions | |
OrderQueue | readers::json::read_orders_from_json (const std::string &filename) |
#include <queue>
#include <string>
#include <memory>
#include "trading.pb.h"
#include <nlohmann/json.hpp>
Go to the source code of this file.
--Namespaces | |
namespace | readers |
namespace | readers::json |
-Typedefs | |
using | readers::json::JSON = nlohmann::json |
using | readers::json::OrderQueue = std::queue<trading::Order> |
-Functions | |
OrderQueue | readers::json::read_orders_from_json (const std::string &filename) |
#include "trading.grpc.pb.h"
#include <grpcpp/grpcpp.h>
#include <memory>
Go to the source code of this file.
--Classes | |
class | Publisher |
#include <vector>
#include <queue>
#include <thread>
#include <functional>
#include <condition_variable>
#include <mutex>
#include <future>
#include "utils/ThreadPool.hh"
-Namespaces | |
namespace | utils |
#include <vector>
#include <queue>
#include <thread>
#include <functional>
#include <condition_variable>
#include <mutex>
#include <future>
Go to the source code of this file.
--Classes | |
class | utils::ThreadPool |
-Namespaces | |
namespace | utils |
#include <queue>
#include <thread>
#include <functional>
#include <mutex>
#include <condition_variable>
Go to the source code of this file.
--Classes | |
class | utils::ThreadSafeQueue< T > |
-Namespaces | |
namespace | utils |
▼Nutils | |
CThreadPool | |
CThreadSafeQueue | |
CAlgo | |
CController | |
CPublisher | |
CTraderClient | |
CTradingServiceImpl |
This is the complete list of members for Algo, including all inherited members.
-_futures | Algo | private |
_initialized | Algo | private |
_order_queue | Algo | private |
_orders | Algo | private |
_pub | Algo | private |
_reader_thread | Algo | private |
_running | Algo | private |
_send_mutex | Algo | private |
_thread_pool | Algo | private |
_worker_threads | Algo | private |
Algo() | Algo | |
generate_orders() | Algo | |
initialize() | Algo | |
initialized() | Algo | |
process() | Algo | |
send(trading::Order &) | Algo | |
stop() | Algo |
#include <Algo.hh>
-Public Member Functions | |
Algo () | |
void | initialize () |
void | generate_orders () |
void | process () |
void | send (trading::Order &) |
bool | initialized () |
void | stop () |
-Private Attributes | |
std::queue< trading::Order > | _orders |
std::atomic< bool > | _initialized {false} |
std::atomic< bool > | _running {false} |
std::shared_ptr< Publisher > | _pub |
utils::ThreadSafeQueue< trading::Order > | _order_queue |
utils::ThreadPool | _thread_pool |
std::mutex | _send_mutex |
std::jthread | _reader_thread |
std::vector< std::jthread > | _worker_threads |
std::vector< std::future< bool > > | _futures |
Algo::Algo | -( | -) | -- |
void Algo::generate_orders | -( | -) | -- |
References _orders, and readers::json::read_orders_from_json().
-void Algo::initialize | -( | -) | -- |
References _initialized, and _pub.
- -bool Algo::initialized | -( | -) | -- |
References _initialized.
- -void Algo::process | -( | -) | -- |
References _futures, _order_queue, _pub, _reader_thread, _send_mutex, _thread_pool, _worker_threads, and readers::json::read_orders_from_json().
-void Algo::send | -( | -trading::Order & | order | ) | -- |
References _pub.
- -void Algo::stop | -( | -) | -- |
References _futures, _reader_thread, and _worker_threads.
- -
-
|
- -private | -
-
|
- -private | -
Referenced by initialize(), and initialized().
- -
-
|
- -private | -
Referenced by process().
- -
-
|
- -private | -
Referenced by generate_orders().
- -
-
|
- -private | -
Referenced by initialize(), process(), and send().
- -
-
|
- -private | -
-
|
- -private | -
-
|
- -private | -
Referenced by process().
- -
-
|
- -private | -
Referenced by process().
- -
-
|
- -private | -
This is the complete list of members for Controller, including all inherited members.
-_algo | Controller | private |
Controller(int, char *[]) | Controller | explicit |
start() | Controller |
#include <Controller.hh>
-Public Member Functions | |
Controller (int, char *[]) | |
void | start () |
-Private Attributes | |
std::unique_ptr< Algo > | _algo |
-
|
- -explicit | -
References _algo.
- -void Controller::start | -( | -) | -- |
References _algo.
- -
-
|
- -private | -
Referenced by Controller(), and start().
- -#include <Publisher.hh>
-Public Member Functions | |
Publisher (std::shared_ptr< grpc::Channel > channel) | |
grpc::Status | send_order (const trading::Order &order) |
-Private Attributes | |
std::unique_ptr< trading::TradingService::Stub > | _stub |
-
|
- -explicit | -
References _stub.
- -grpc::Status Publisher::send_order | -( | -const trading::Order & | order | ) | -- |
References _stub.
- -
-
|
- -private | -
Referenced by Publisher(), and send_order().
- -This is the complete list of members for TraderClient, including all inherited members.
-stub_ | TraderClient | private |
TraderClient(std::shared_ptr< Channel > channel) | TraderClient | inline |
-Public Member Functions | |
TraderClient (std::shared_ptr< Channel > channel) | |
-Private Attributes | |
std::unique_ptr< TradingService::Stub > | stub_ |
-
|
- -inline | -
References stub_.
- -
-
|
- -private | -
Referenced by TraderClient().
- -This is the complete list of members for TradingServiceImpl, including all inherited members.
-SendOrder(ServerContext *ctx, const Order *req, OrderAck *res) override | TradingServiceImpl | inlineprivate |
StreamMarketData(ServerContext *ctx, const MarketRequest *req, grpc::ServerWriter< MarketData > *writer) override | TradingServiceImpl | inlineprivate |
-Private Member Functions | |
Status | SendOrder (ServerContext *ctx, const Order *req, OrderAck *res) override |
Status | StreamMarketData (ServerContext *ctx, const MarketRequest *req, grpc::ServerWriter< MarketData > *writer) override |
-
|
- -inlineoverrideprivate | -
-
|
- -inlineoverrideprivate | -
This is the complete list of members for utils::ThreadPool, including all inherited members.
-_cv | utils::ThreadPool | private |
_queue_mutex | utils::ThreadPool | private |
_stop | utils::ThreadPool | private |
_tasks | utils::ThreadPool | private |
_workers | utils::ThreadPool | private |
enqueue(F &&f, Args &&... args) -> std::future< std::invoke_result_t< F, Args... > > | utils::ThreadPool | inline |
ThreadPool(std::size_t threads=std::thread::hardware_concurrency()) | utils::ThreadPool | explicit |
~ThreadPool() | utils::ThreadPool |
#include <ThreadPool.hh>
-Public Member Functions | |
ThreadPool (std::size_t threads=std::thread::hardware_concurrency()) | |
~ThreadPool () | |
template<class F, class... Args> | |
auto | enqueue (F &&f, Args &&... args) -> std::future< std::invoke_result_t< F, Args... > > |
-Private Attributes | |
std::vector< std::thread > | _workers |
std::queue< std::function< void()> > | _tasks |
std::mutex | _queue_mutex |
std::condition_variable | _cv |
bool | _stop {false} |
-
|
- -explicit | -
References _cv, _queue_mutex, _stop, _tasks, and _workers.
- -utils::ThreadPool::~ThreadPool | -( | -) | -- |
References _cv, _queue_mutex, _stop, and _workers.
- -
-
|
- -inline | -
References _cv, _queue_mutex, _stop, and _tasks.
- -
-
|
- -private | -
Referenced by enqueue(), ThreadPool(), and ~ThreadPool().
- -
-
|
- -private | -
Referenced by enqueue(), ThreadPool(), and ~ThreadPool().
- -
-
|
- -private | -
Referenced by enqueue(), ThreadPool(), and ~ThreadPool().
- -
-
|
- -private | -
Referenced by enqueue(), and ThreadPool().
- -
-
|
- -private | -
Referenced by ThreadPool(), and ~ThreadPool().
- -This is the complete list of members for utils::ThreadSafeQueue< T >, including all inherited members.
-_cv | utils::ThreadSafeQueue< T > | private |
_mutex | utils::ThreadSafeQueue< T > | private |
_queue | utils::ThreadSafeQueue< T > | private |
push(T value) | utils::ThreadSafeQueue< T > | inline |
wait_and_pop() | utils::ThreadSafeQueue< T > | inline |
#include <ThreadSafeQueue.hh>
-Public Member Functions | |
void | push (T value) |
T | wait_and_pop () |
-Private Attributes | |
std::queue< T > | _queue |
std::mutex | _mutex |
std::condition_variable | _cv |
-
|
- -inline | -
-
|
- -inline | -
-
|
- -private | -
Referenced by push(), and wait_and_pop().
- -
-
|
- -private | -
Referenced by push(), and wait_and_pop().
- -
-
|
- -private | -
Referenced by push(), and wait_and_pop().
- -File in include | Includes file in include/utils |
---|---|
Algo.hh | ThreadPool.hh |
Algo.hh | ThreadSafeQueue.hh |
File in src | Includes file in include |
---|---|
Algo.cc | Algo.hh |
Controller.cc | Controller.hh |
Publisher.cc | Publisher.hh |
File in src/readers | Includes file in include |
---|---|
JSONReader.cc | Algo.hh |
JSONReader.cc | readers / JSONReader.hh |
File in src | Includes file in include |
---|---|
Algo.cc | Algo.hh |
Algo.cc | readers / JSONReader.hh |
Controller.cc | Controller.hh |
readers / JSONReader.cc | Algo.hh |
readers / JSONReader.cc | readers / JSONReader.hh |
Publisher.cc | Publisher.hh |
utils / ThreadPool.cc | utils / ThreadPool.hh |
File in src/utils | Includes file in include |
---|---|
ThreadPool.cc | utils / ThreadPool.hh |
-Files | |
ThreadPool.cc | |
ThreadSafeQueue.cc | |
-Directories | |
readers | |
utils | |
-Files | |
Algo.cc | |
Controller.cc | |
grpc_client.cc | |
grpc_server.cc | |
Publisher.cc | |
-Files | |
ThreadPool.hh | |
ThreadSafeQueue.hh | |
-Directories | |
readers | |
utils | |
-Files | |
Algo.hh | |
Controller.hh | |
Publisher.hh | |
▼ include | |
▼ readers | |
JSONReader.hh | |
▼ utils | |
ThreadPool.hh | |
ThreadSafeQueue.hh | |
Algo.hh | |
Controller.hh | |
Publisher.hh | |
▼ src | |
▼ readers | |
JSONReader.cc | |
▼ utils | |
ThreadPool.cc | |
ThreadSafeQueue.cc | |
Algo.cc | |
Controller.cc | |
grpc_client.cc | |
grpc_server.cc | |
Publisher.cc |
This page explains how to interpret the graphs that are generated by doxygen.
-Consider the following example:
This will result in the following graph:
-The boxes in the above graph have the following meaning:
-The arrows have the following meaning:
-#include "trading.grpc.pb.h"
#include <grpcpp/grpcpp.h>
#include <iostream>
-Classes | |
class | TraderClient |
#include "trading.grpc.pb.h"
#include <grpcpp/grpcpp.h>
#include <iostream>
#include <thread>
-Classes | |
class | TradingServiceImpl |
-Functions | |
void | RunServer () |
void RunServer | -( | -) | -- |
CAlgo | |
CController | |
CPublisher | |
▼CTradingService::Service | |
CTradingServiceImpl | |
Cutils::ThreadPool | |
Cutils::ThreadSafeQueue< T > | |
Cutils::ThreadSafeQueue< trading::Order > | |
CTraderClient |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |