-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
42 lines (36 loc) · 819 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* File: main.cpp
* Author: allada
*
* Created on December 6, 2013, 4:33 PM
*/
#include <iostream>
#include <string>
#include <map>
#include <stdint.h>
#include "classes/Currency.h"
#include "classes/Order.h"
#include "classes/Market.h"
#include "classes/Transaction.h"
#include "classes/SocketServer.h"
#include "classes/DB.h"
HashTable Order::orders;
std::map<uint8_t, Market *> Market::markets;
std::map<uint8_t, Currency *> Currency::currencies;
uint64_t Order::next_id = 1;
pthread_mutex_t Order::mutex;
uint64_t Transaction::next_id = 1;
using namespace std;
/*
* Main Entry function
*/
int main(int argc, char** argv) {
Order::init();
DB::loadCurrencies();
DB::loadMarkets();
DB::loadOrders();
SocketServer *server = new SocketServer(1197);
server->start();
Order::unInit();
return 0;
}