commit
0f6d2e31ac
|
@ -7,7 +7,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <drogon/plugins/Plugin.h>
|
||||
using namespace drogon;
|
||||
<%c++
|
||||
auto namespaceVector=@@.get<std::vector<std::string>>("namespaceVector");
|
||||
if(namespaceVector.empty())
|
||||
|
@ -18,7 +17,7 @@ namespace {%namespaceName%}
|
|||
{
|
||||
<%c++}
|
||||
$$<<"\n";%>
|
||||
class [[className]] : public Plugin<[[className]]>
|
||||
class [[className]] : public drogon::Plugin<[[className]]>
|
||||
{
|
||||
public:
|
||||
[[className]]() {}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
GIT_VER=$(git log|grep ^commit|wc -l|sed -e "s/^ *//")
|
||||
MD5=$(git log|head -1|awk '{printf $2}')
|
||||
TMP_FILE=/tmp/version
|
||||
echo "#define VERSION \"0.9.32.$GIT_VER\"" > ${TMP_FILE}
|
||||
echo "#define VERSION \"0.9.33.$GIT_VER\"" > ${TMP_FILE}
|
||||
echo "#define VERSION_MD5 \"$MD5\"" >> ${TMP_FILE}
|
||||
if [ ! -f $1 ];then
|
||||
mv -f ${TMP_FILE} $1
|
||||
|
|
|
@ -122,7 +122,7 @@ public:
|
|||
///Get the plugin object registered in the framework
|
||||
/**
|
||||
* NOTE:
|
||||
* This method is usually called after the framework is run.
|
||||
* This method is usually called after the framework runs.
|
||||
* Calling this method in the initAndStart() method of plugins is also valid.
|
||||
*/
|
||||
template <typename T>
|
||||
|
@ -138,7 +138,7 @@ public:
|
|||
* @param name: is the class name of the plugin.
|
||||
*
|
||||
* NOTE:
|
||||
* This method is usually called after the framework is run.
|
||||
* This method is usually called after the framework runs.
|
||||
* Calling this method in the initAndStart() method of plugins is also valid.
|
||||
*/
|
||||
virtual PluginBase *getPlugin(const std::string &name) = 0;
|
||||
|
|
|
@ -57,7 +57,7 @@ class PluginBase : public virtual DrObjectBase, public trantor::NonCopyable
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_FATAL << "There are a loop-dependency within plugins.";
|
||||
LOG_FATAL << "There are a circular dependency within plugins.";
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
|
9
test.sh
9
test.sh
|
@ -71,6 +71,15 @@ if [ ! -f "Test_TestFilter.h" -o ! -f "Test_TestFilter.cc" ];then
|
|||
exit -1
|
||||
fi
|
||||
|
||||
cd ../plugins
|
||||
|
||||
drogon_ctl create plugin Test::TestPlugin
|
||||
|
||||
if [ ! -f "Test_TestPlugin.h" -o ! -f "Test_TestPlugin.cc" ];then
|
||||
echo "Failed to create plugins"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
cd ../build
|
||||
cmake ..
|
||||
|
||||
|
|
Loading…
Reference in New Issue