2019-03-29 07:34:14 +00:00
|
|
|
/**
|
|
|
|
*
|
2019-04-25 06:36:42 +00:00
|
|
|
* [[filename]].h
|
2019-03-29 07:34:14 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <drogon/plugins/Plugin.h>
|
|
|
|
<%c++
|
|
|
|
auto namespaceVector=@@.get<std::vector<std::string>>("namespaceVector");
|
|
|
|
if(namespaceVector.empty())
|
|
|
|
$$<<"\n";
|
|
|
|
for(auto &namespaceName:namespaceVector){%>
|
|
|
|
namespace {%namespaceName%}
|
|
|
|
|
|
|
|
{
|
|
|
|
<%c++}
|
|
|
|
$$<<"\n";%>
|
2019-05-05 07:43:17 +00:00
|
|
|
class [[className]] : public drogon::Plugin<[[className]]>
|
2019-03-29 07:34:14 +00:00
|
|
|
{
|
|
|
|
public:
|
2019-04-25 06:36:42 +00:00
|
|
|
[[className]]() {}
|
2019-03-29 07:34:14 +00:00
|
|
|
/// This method must be called by drogon to initialize and start the plugin.
|
|
|
|
/// It must be implemented by the user.
|
|
|
|
virtual void initAndStart(const Json::Value &config) override;
|
|
|
|
|
|
|
|
/// This method must be called by drogon to shutdown the plugin.
|
|
|
|
/// It must be implemented by the user.
|
|
|
|
virtual void shutdown() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
<%c++for(size_t i=0;i<namespaceVector.size();i++){%>
|
|
|
|
}
|
|
|
|
<%c++}%>
|