mirror of
https://github.com/oatpp/oatpp.git
synced 2025-01-18 16:43:57 +08:00
Merge pull request #230 from oatpp/custom_codegen
Codegen. Add the possibility to add custom codegen.
This commit is contained in:
commit
041ce85e06
@ -11,12 +11,12 @@ add_library(oatpp
|
||||
oatpp/codegen/api_controller/auth_undef.hpp
|
||||
oatpp/codegen/api_controller/cors_define.hpp
|
||||
oatpp/codegen/api_controller/cors_undef.hpp
|
||||
oatpp/codegen/codegen_define_ApiClient_.hpp
|
||||
oatpp/codegen/codegen_define_ApiController_.hpp
|
||||
oatpp/codegen/codegen_define_DTO_.hpp
|
||||
oatpp/codegen/codegen_undef_ApiClient_.hpp
|
||||
oatpp/codegen/codegen_undef_ApiController_.hpp
|
||||
oatpp/codegen/codegen_undef_DTO_.hpp
|
||||
oatpp/codegen/ApiController_define.hpp
|
||||
oatpp/codegen/ApiController_undef.hpp
|
||||
oatpp/codegen/ApiClient_define.hpp
|
||||
oatpp/codegen/ApiClient_undef.hpp
|
||||
oatpp/codegen/DTO_define.hpp
|
||||
oatpp/codegen/DTO_undef.hpp
|
||||
oatpp/core/Types.hpp
|
||||
oatpp/core/async/Coroutine.cpp
|
||||
oatpp/core/async/Coroutine.hpp
|
||||
|
@ -26,8 +26,8 @@
|
||||
* This file contains source code for basic helper macros used for code-generator.
|
||||
*/
|
||||
|
||||
#ifndef oatpp_macro_ForEach_hpp
|
||||
#define oatpp_macro_ForEach_hpp
|
||||
#ifndef oatpp_macro_basic_hpp
|
||||
#define oatpp_macro_basic_hpp
|
||||
|
||||
#define OATPP_MACRO_FOREACH_EXAMPLE_FUNC(INDEX, COUNT, X) \
|
||||
ENV::log("macro", "param: %d/%d: '%s'", INDEX, COUNT, #X);
|
||||
@ -498,4 +498,4 @@ OATPP_MACRO_EXPAND(OATPP_MACRO_FOREACH_CALL(N - 99, N, M, OATPP_MACRO_FIRSTARG_E
|
||||
OATPP_MACRO_FOREACH_98(N, M, OATPP_MACRO_RESTARGS(__VA_ARGS__))
|
||||
|
||||
|
||||
#endif /* oatpp_macro_ForEach_hpp */
|
||||
#endif /* oatpp_macro_basic_hpp */
|
||||
|
@ -35,14 +35,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef codegen_hpp
|
||||
#define codegen_hpp
|
||||
#ifndef oatpp_macro_codegen_hpp
|
||||
#define oatpp_macro_codegen_hpp
|
||||
|
||||
#include "./basic.hpp"
|
||||
|
||||
#define OATPP_MACRO_CODEGEN_EXPAND(X) OATPP_MACRO_STR(X)
|
||||
#define OATPP_CODEGEN_DEFINE_ApiController "oatpp/codegen/ApiController_define.hpp"
|
||||
#define OATPP_CODEGEN_UNDEF_ApiController "oatpp/codegen/ApiController_undef.hpp"
|
||||
|
||||
#define OATPP_CODEGEN_BEGIN(NAME) OATPP_MACRO_CODEGEN_EXPAND(OATPP_MACRO_CONCAT2(oatpp/codegen/codegen_define_, NAME##_.hpp))
|
||||
#define OATPP_CODEGEN_END(NAME) OATPP_MACRO_CODEGEN_EXPAND(OATPP_MACRO_CONCAT2(oatpp/codegen/codegen_undef_, NAME##_.hpp))
|
||||
#define OATPP_CODEGEN_DEFINE_ApiClient "oatpp/codegen/ApiClient_define.hpp"
|
||||
#define OATPP_CODEGEN_UNDEF_ApiClient "oatpp/codegen/ApiClient_undef.hpp"
|
||||
|
||||
#endif /* codegen_hpp */
|
||||
#define OATPP_CODEGEN_DEFINE_DTO "oatpp/codegen/DTO_define.hpp"
|
||||
#define OATPP_CODEGEN_UNDEF_DTO "oatpp/codegen/DTO_undef.hpp"
|
||||
|
||||
#define OATPP_CODEGEN_BEGIN(NAME) OATPP_MACRO_EXPAND(OATPP_CODEGEN_DEFINE_ ## NAME)
|
||||
#define OATPP_CODEGEN_END(NAME) OATPP_MACRO_EXPAND(OATPP_CODEGEN_UNDEF_ ## NAME)
|
||||
|
||||
#endif /* oatpp_macro_codegen_hpp */
|
||||
|
Loading…
Reference in New Issue
Block a user