35 lines
784 B
Plaintext
35 lines
784 B
Plaintext
/**
|
|
*
|
|
* [[filename]].h
|
|
*
|
|
*/
|
|
|
|
#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";%>
|
|
class [[className]] : public drogon::Plugin<[[className]]>
|
|
{
|
|
public:
|
|
[[className]]() {}
|
|
/// This method must be called by drogon to initialize and start the plugin.
|
|
/// It must be implemented by the user.
|
|
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.
|
|
void shutdown() override;
|
|
};
|
|
|
|
<%c++for(size_t i=0;i<namespaceVector.size();i++){%>
|
|
}
|
|
<%c++}%> |