f8 ok
This commit is contained in:
parent
140f7cd0a6
commit
06a74ea172
33
third_party/f8/f8/CMakeLists.txt
vendored
Normal file
33
third_party/f8/f8/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
cmake_minimum_required (VERSION 3.8)
|
||||||
|
project(f8)
|
||||||
|
|
||||||
|
if (${RELEASE})
|
||||||
|
set(CMAKE_BUILD_TYPE "Release")
|
||||||
|
message("release mode")
|
||||||
|
else()
|
||||||
|
set(CMAKE_BUILD_TYPE "Debug")
|
||||||
|
message("debug mode")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -g -std=c++17 ")
|
||||||
|
if (${ASAN})
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=c++17 -DMYDEBUG -fsanitize=address -fno-omit-frame-pointer")
|
||||||
|
else()
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=c++17 -DMYDEBUG ")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# include directories
|
||||||
|
include_directories(
|
||||||
|
AFTER
|
||||||
|
../../a8
|
||||||
|
../../f8
|
||||||
|
/usr/include/mysql
|
||||||
|
/usr/include/jsoncpp
|
||||||
|
/usr/include/glm
|
||||||
|
)
|
||||||
|
|
||||||
|
aux_source_directory(.
|
||||||
|
SRC_LIST
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(f8 STATIC ${SRC_LIST})
|
1
third_party/f8/f8/app.cc
vendored
1
third_party/f8/f8/app.cc
vendored
@ -16,6 +16,7 @@
|
|||||||
#include <f8/tglog.h>
|
#include <f8/tglog.h>
|
||||||
#include <f8/httpclientpool.h>
|
#include <f8/httpclientpool.h>
|
||||||
#include <a8/queue.h>
|
#include <a8/queue.h>
|
||||||
|
#include <f8/timer.h>
|
||||||
|
|
||||||
static const int MAX_ZONE_ID = 100;
|
static const int MAX_ZONE_ID = 100;
|
||||||
static const int MAX_NODE_ID = 8;
|
static const int MAX_NODE_ID = 8;
|
||||||
|
1
third_party/f8/f8/f8.h
vendored
1
third_party/f8/f8/f8.h
vendored
@ -2,4 +2,3 @@
|
|||||||
|
|
||||||
#include <a8/a8.h>
|
#include <a8/a8.h>
|
||||||
#include <f8/types.h>
|
#include <f8/types.h>
|
||||||
#include <f8/timer.h>
|
|
||||||
|
22
third_party/f8/f8/timer.h
vendored
22
third_party/f8/f8/timer.h
vendored
@ -2,28 +2,6 @@
|
|||||||
|
|
||||||
namespace f8
|
namespace f8
|
||||||
{
|
{
|
||||||
class TimerWp
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
TimerWp(a8::XTimerWp wp): real_obj_(wp) {};
|
|
||||||
TimerWp() {};
|
|
||||||
bool expired() { return real_obj_.expired();};
|
|
||||||
|
|
||||||
private:
|
|
||||||
a8::XTimerWp real_obj_;
|
|
||||||
friend class Timer;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Attacher
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Attacher();
|
|
||||||
void ClearTimerList();
|
|
||||||
|
|
||||||
private:
|
|
||||||
a8::Attacher real_obj_;
|
|
||||||
friend class Timer;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Timer : public a8::Singleton<Timer>
|
class Timer : public a8::Singleton<Timer>
|
||||||
{
|
{
|
||||||
|
23
third_party/f8/f8/types.h
vendored
23
third_party/f8/f8/types.h
vendored
@ -20,4 +20,27 @@ namespace f8
|
|||||||
IM_SysEnd = 99,
|
IM_SysEnd = 99,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class TimerWp
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TimerWp(a8::XTimerWp wp): real_obj_(wp) {};
|
||||||
|
TimerWp() {};
|
||||||
|
bool expired() { return real_obj_.expired();};
|
||||||
|
|
||||||
|
private:
|
||||||
|
a8::XTimerWp real_obj_;
|
||||||
|
friend class Timer;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Attacher
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Attacher();
|
||||||
|
void ClearTimerList();
|
||||||
|
|
||||||
|
private:
|
||||||
|
a8::Attacher real_obj_;
|
||||||
|
friend class Timer;
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user