Organize the format of files

This commit is contained in:
antao 2018-11-16 13:26:14 +08:00
parent 5514bfd32a
commit 13d13ed240
115 changed files with 145 additions and 145 deletions

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -26,4 +26,4 @@ class CommandHandler : public virtual drogon::DrObjectBase
virtual std::string script() { return ""; }
virtual std::string detail() { return ""; }
virtual ~CommandHandler() {}
};
};

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -49,4 +49,4 @@ void exeCommand(std::vector<std::string> &parameters)
{
std::cout << "command error!use help command to get usage!" << std::endl;
}
}
}

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -44,4 +44,4 @@ void create::handleCommand(std::vector<std::string> &parameters)
createObjName = std::string("create_") + createObjName;
parameters[0] = createObjName;
exeCommand(parameters);
}
}

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -7,7 +7,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -49,4 +49,4 @@ void create_filter::handleCommand(std::vector<std::string> &parameters)
auto className = parameters[0];
createFilterHeaderFile(className);
createFilterSourceFile(className);
}
}

View File

@ -31,4 +31,4 @@ class create_filter : public DrObject<create_filter>, public CommandHandler
void newViewHeaderFile(std::ofstream &file, const std::string &className);
void newViewSourceFile(std::ofstream &file, const std::string &className, std::ifstream &infile);
};
} // namespace drogon_ctl
} // namespace drogon_ctl

View File

@ -7,7 +7,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -7,7 +7,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
#pragma once
@ -28,4 +28,4 @@ class create_project : public DrObject<create_project>, public CommandHandler
std::string _outputPath = ".";
void createProject(const std::string &projectName);
};
} // namespace drogon_ctl
} // namespace drogon_ctl

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -32,4 +32,4 @@ class create_view : public DrObject<create_view>, public CommandHandler
void newViewHeaderFile(std::ofstream &file, const std::string &className);
void newViewSourceFile(std::ofstream &file, const std::string &className, std::ifstream &infile);
};
} // namespace drogon_ctl
} // namespace drogon_ctl

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -60,4 +60,4 @@ void help::handleCommand(std::vector<std::string> &parameters)
}
}
}
}
}

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
* this is a drogon lib tool program
* run drogon_ctl help to get usage
*/
@ -36,4 +36,4 @@ int main(int argc, char *argv[])
exeCommand(args);
return 0;
}
}

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -32,4 +32,4 @@ void version::handleCommand(std::vector<std::string> &parameters)
std::cout << "version:" << VERSION << std::endl;
std::cout << "git commit:" << VERSION_MD5 << std::endl;
std::cout << "compile config:" << compileFlags <<" "<< includeDirs << std::endl;
}
}

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -16,4 +16,4 @@ void JsonTestController::asyncHandleHttpRequest(const HttpRequestPtr &req, const
json["rows"] = array;
auto resp = HttpResponse::newHttpJsonResponse(json);
callback(resp);
}
}

View File

@ -12,4 +12,4 @@ class JsonTestController : public drogon::HttpSimpleController<JsonTestControlle
PATH_LIST_BEGIN
PATH_ADD("/json", "drogon::GetFilter", "drogon::LocalHostFilter");
PATH_LIST_END
};
};

View File

@ -7,4 +7,4 @@ void ListParaCtl::asyncHandleHttpRequest(const HttpRequestPtr &req, const std::f
data.insert("parameters", req->getParameters());
auto res = drogon::HttpResponse::newHttpViewResponse("ListParaView.csp", data);
callback(res);
}
}

View File

@ -7,4 +7,4 @@ void TestController::asyncHandleHttpRequest(const HttpRequestPtr &req, const std
resp->setBody("<p>Hello, world!</p>");
resp->setExpiredTime(0);
callback(resp);
}
}

View File

@ -6,4 +6,4 @@ void TestViewCtl::asyncHandleHttpRequest(const HttpRequestPtr &req, const std::f
data.insert("title", std::string("TestView"));
auto res = drogon::HttpResponse::newHttpViewResponse("TestView", data);
callback(res);
}
}

View File

@ -13,4 +13,4 @@ void WebSocketTest::handleNewConnection(const HttpRequestPtr &,
const WebSocketConnectionPtr &)
{
LOG_TRACE << "new websocket connection!";
}
}

View File

@ -28,4 +28,4 @@ void Attachment::upload(const HttpRequestPtr &req,
auto resp = HttpResponse::newHttpResponse();
resp->setStatusCode(HttpResponse::k200OK);
callback(resp);
}
}

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
#pragma once
@ -44,4 +44,4 @@ class Cookie
std::string _key;
std::string _value;
};
} // namespace drogon
} // namespace drogon

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -26,4 +26,4 @@ class DeleteFilter : public HttpFilter<DeleteFilter>
const FilterCallback &fcb,
const FilterChainCallback &fccb) override;
};
} // namespace drogon
} // namespace drogon

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -26,4 +26,4 @@ class GetFilter : public HttpFilter<GetFilter>
const FilterCallback &fcb,
const FilterChainCallback &fccb) override;
};
} // namespace drogon
} // namespace drogon

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -73,4 +73,4 @@ public:
protected:
HttpClient() = default;
};
} // namespace drogon
} // namespace drogon

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -37,4 +37,4 @@ class HttpFilter : public DrObject<T>, public HttpFilterBase
public:
virtual ~HttpFilter() {}
};
} // namespace drogon
} // namespace drogon

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -70,4 +70,4 @@ class HttpRequest
static HttpRequestPtr newHttpRequest();
};
} // namespace drogon
} // namespace drogon

View File

@ -18,7 +18,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -26,4 +26,4 @@ class InnerIpFilter : public HttpFilter<InnerIpFilter>
const FilterCallback &fcb,
const FilterChainCallback &fccb) override;
};
} // namespace drogon
} // namespace drogon

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -26,4 +26,4 @@ class LocalHostFilter : public HttpFilter<LocalHostFilter>
const FilterCallback &fcb,
const FilterChainCallback &fccb) override;
};
} // namespace drogon
} // namespace drogon

View File

@ -7,4 +7,4 @@ class NotFound : public DrTemplate<NotFound>
NotFound(){};
virtual ~NotFound(){};
virtual std::string genText(const HttpViewData &) override;
};
};

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -26,4 +26,4 @@ class PostFilter : public HttpFilter<PostFilter>
const FilterCallback &fcb,
const FilterChainCallback &fccb) override;
};
} // namespace drogon
} // namespace drogon

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -26,4 +26,4 @@ class PutFilter : public HttpFilter<PutFilter>
const FilterCallback &fcb,
const FilterChainCallback &fccb) override;
};
} // namespace drogon
} // namespace drogon

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -43,4 +43,4 @@ class WebSocketConnection
virtual any *getMutableContext() = 0;
};
typedef std::shared_ptr<WebSocketConnection> WebSocketConnectionPtr;
} // namespace drogon
} // namespace drogon

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -7,7 +7,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -28,4 +28,4 @@
#include <drogon/HttpClient.h>
#include <drogon/utils/Utilities.h>
#endif
#endif

View File

@ -7,7 +7,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -31,4 +31,4 @@ class ConfigLoader : public trantor::NonCopyable
std::string _configFile;
Json::Value _configJsonRoot;
};
} // namespace drogon
} // namespace drogon

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -50,4 +50,4 @@ const std::string Cookie::cookieString() const
ret.resize(ret.length() - 2); //delete last semicolon
ret.append("\r\n");
return ret;
}
}

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -46,4 +46,4 @@ std::unordered_map<std::string, DrAllocFunc> &DrClassMap::getMap()
{
static std::unordered_map<std::string, DrAllocFunc> map;
return map;
}
}

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
#include <drogon/DrTemplateBase.h>

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
#include "HttpAppFrameworkImpl.h"

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
#pragma once

View File

@ -19,7 +19,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -20,7 +20,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
#pragma once

View File

@ -240,4 +240,4 @@ HttpClientPtr HttpClient::newHttpClient(const std::string &ip, uint16_t port, bo
HttpClientPtr HttpClient::newHttpClient(const std::string &hostString)
{
return std::make_shared<HttpClientImpl>(((HttpAppFrameworkImpl &)(HttpAppFramework::instance())).loop(), hostString);
}
}

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
#pragma once
@ -39,4 +39,4 @@ class HttpClientImpl : public HttpClient, public std::enable_shared_from_this<Ht
void onRecvMessage(const trantor::TcpConnectionPtr &, trantor::MsgBuffer *);
std::string _domain;
};
} // namespace drogon
} // namespace drogon

View File

@ -19,7 +19,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -19,7 +19,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -16,7 +16,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -20,7 +20,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -18,7 +18,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -19,7 +19,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -20,7 +20,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
#pragma once

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
#include <drogon/HttpViewBase.h>

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -26,4 +26,4 @@ void InnerIpFilter::doFilter(const HttpRequestPtr &req,
}
auto res = drogon::HttpResponse::newNotFoundResponse();
fcb(res);
}
}

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -26,4 +26,4 @@ void LocalHostFilter::doFilter(const HttpRequestPtr &req,
}
auto res = drogon::HttpResponse::newNotFoundResponse();
fcb(res);
}
}

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -8,7 +8,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
#pragma once
@ -38,4 +38,4 @@ class SharedLibManager : public trantor::NonCopyable
void *loadLibs(const std::string &sourceFile, void *oldHld);
trantor::TimerId _timeId;
};
} // namespace drogon
} // namespace drogon

View File

@ -7,7 +7,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -118,4 +118,4 @@ const any &WebSocketConnectionImpl::WebSocketConnectionImpl::getContext() const
any *WebSocketConnectionImpl::WebSocketConnectionImpl::getMutableContext()
{
return &_context;
}
}

View File

@ -41,4 +41,4 @@ class WebSocketConnectionImpl : public WebSocketConnection
WebSocketControllerBasePtr _ctrlPtr;
any _context;
};
} // namespace drogon
} // namespace drogon

View File

@ -249,4 +249,4 @@ std::string Md5Encode::Encode(std::string src_info)
result.append(GetHexStr(param.uc_));
result.append(GetHexStr(param.ud_));
return result;
}
}

View File

@ -70,4 +70,4 @@ class Md5Encode
static const unsigned long long k_ti_num_integer;
};
#endif
#endif

View File

@ -163,4 +163,4 @@ const Criteria operator||(Criteria cond1, Criteria cond2)
}
} // namespace orm
} // namespace drogon
} // namespace drogon

View File

@ -125,4 +125,4 @@ class Transaction : public DbClient
};
} // namespace orm
} // namespace drogon
} // namespace drogon

View File

@ -7,7 +7,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -124,4 +124,4 @@ struct FunctionTraits<
};
} // namespace internal
} // namespace orm
} // namespace drogon
} // namespace drogon

View File

@ -7,7 +7,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/

View File

@ -7,7 +7,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -102,4 +102,4 @@ class Result
Result() {}
};
} // namespace orm
} // namespace drogon
} // namespace drogon

View File

@ -7,7 +7,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -165,4 +165,4 @@ class ConstReverseResultIterator : private ConstResultIterator
};
} // namespace orm
} // namespace drogon
} // namespace drogon

View File

@ -7,7 +7,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -70,4 +70,4 @@ class Row
};
} // namespace orm
} // namespace drogon
} // namespace drogon

View File

@ -7,7 +7,7 @@
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* Drogon
*
*/
@ -164,4 +164,4 @@ class ConstReverseRowIterator : private ConstRowIterator
};
} // namespace orm
} // namespace drogon
} // namespace drogon

View File

@ -20,4 +20,4 @@ namespace orm
{
} // namespace orm
} // namespace drogon
} // namespace drogon

Some files were not shown because too many files have changed in this diff Show More