drogon/examples/static_link_example/main.cc

27 lines
908 B
C++
Raw Normal View History

2018-05-10 09:11:22 +00:00
#include <drogon/DrObject.h>
2018-05-04 09:51:22 +00:00
#include <iostream>
#include <drogon/HttpAppFramework.h>
#include <trantor/utils/Logger.h>
2018-05-04 09:51:22 +00:00
static const char banner[]=" _ \n"
" __| |_ __ ___ __ _ ___ _ __ \n"
" / _` | '__/ _ \\ / _` |/ _ \\| '_ \\ \n"
"| (_| | | | (_) | (_| | (_) | | | |\n"
" \\__,_|_| \\___/ \\__, |\\___/|_| |_|\n"
" |___/ \n";
2018-05-10 09:11:22 +00:00
class HHH:public drogon::DrObject<HHH>
{
public:
HHH(){std::cout<<"class HHH constr,name="<<className()<<std::endl;}
};
int main()
{
2018-05-10 09:11:22 +00:00
drogon::DrObjectBase *p=drogon::DrClassMap::newObject("HHH");
2018-05-10 09:43:32 +00:00
2018-05-04 09:51:22 +00:00
std::cout<<banner<<std::endl;
drogon::HttpAppFramework framework("0.0.0.0",12345);
2018-05-03 10:28:37 +00:00
trantor::Logger::setLogLevel(trantor::Logger::TRACE);
framework.run();
2018-05-04 09:51:22 +00:00
}