mirror of
https://github.com/Ed94/gencpp.git
synced 2024-12-22 15:54:45 -08:00
initial setup for generating a library compatible for usage as an Unreal thirdyparty module.
This commit is contained in:
parent
b8e1aa6eb7
commit
40a256f6c3
4
unreal_engine/Readme.md
Normal file
4
unreal_engine/Readme.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Unreal Engine Version Generator
|
||||||
|
|
||||||
|
This generates a variant of gencpp thats compatiable with use as a thirdparty module within a plugin or module of an Unreal Project or the Engine itself.
|
||||||
|
|
0
unreal_engine/components/header_start.hpp
Normal file
0
unreal_engine/components/header_start.hpp
Normal file
0
unreal_engine/components/source_start.cpp
Normal file
0
unreal_engine/components/source_start.cpp
Normal file
3
unreal_engine/enums/AttributeTokens.csv
Normal file
3
unreal_engine/enums/AttributeTokens.csv
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// TODO(Ed): The Attribute tokens need to be expanded and regenerated on a per-project/installation of this library for a specific codebase of Unreal.
|
||||||
|
// We can support an arbitrary set of modules or plugin apis for parsing
|
||||||
|
// but its up to the user to define them all (This will just provide whats be used in previous usages with Unreal).
|
|
60
unreal_engine/unreal.cpp
Normal file
60
unreal_engine/unreal.cpp
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#define GEN_DEFINE_LIBRARY_CODE_CONSTANTS
|
||||||
|
#define GEN_ENFORCE_STRONG_CODE_TYPES
|
||||||
|
#define GEN_EXPOSE_BACKEDN
|
||||||
|
#include "gen.cpp"
|
||||||
|
|
||||||
|
#include "helpers/push_ignores.inline.hpp"
|
||||||
|
|
||||||
|
GEN_NS_BEGIN
|
||||||
|
#include "dependencies/parsing.cpp"
|
||||||
|
GEN_NS_END
|
||||||
|
|
||||||
|
#include "auxillary/builder.hpp"
|
||||||
|
#include "auxillary/builder.cpp"
|
||||||
|
#include "auxillary/scanner.hpp"
|
||||||
|
|
||||||
|
using namespace gen;
|
||||||
|
|
||||||
|
constexpr char const* generation_notice =
|
||||||
|
"// This file was generated automatially by gencpp's unreal.cpp"
|
||||||
|
"(See: https://github.com/Ed94/gencpp)\n\n";
|
||||||
|
|
||||||
|
constexpr StrC implementation_guard_start = txt(R"(
|
||||||
|
#pragma region GENCPP IMPLEMENTATION GUARD
|
||||||
|
#if defined(GEN_IMPLEMENTATION) && ! defined(GEN_IMPLEMENTED)
|
||||||
|
# define GEN_IMPLEMENTED
|
||||||
|
)");
|
||||||
|
|
||||||
|
constexpr StrC implementation_guard_end = txt(R"(
|
||||||
|
#endif
|
||||||
|
#pragma endregion GENCPP IMPLEMENTATION GUARD
|
||||||
|
)");
|
||||||
|
|
||||||
|
constexpr StrC roll_own_dependencies_guard_start = txt(R"(
|
||||||
|
//! If its desired to roll your own dependencies, define GEN_ROLL_OWN_DEPENDENCIES before including this file.
|
||||||
|
// Dependencies are derived from the c-zpl library: https://github.com/zpl-c/zpl
|
||||||
|
#ifndef GEN_ROLL_OWN_DEPENDENCIES
|
||||||
|
|
||||||
|
)");
|
||||||
|
|
||||||
|
constexpr StrC roll_own_dependencies_guard_end = txt(R"(
|
||||||
|
// GEN_ROLL_OWN_DEPENDENCIES
|
||||||
|
#endif
|
||||||
|
)");
|
||||||
|
|
||||||
|
global bool generate_gen_dep = true;
|
||||||
|
global bool generate_builder = true;
|
||||||
|
global bool generate_editor = true;
|
||||||
|
global bool generate_scanner = true;
|
||||||
|
|
||||||
|
int gen_main()
|
||||||
|
{
|
||||||
|
#define project_dir "../project/"
|
||||||
|
gen::init();
|
||||||
|
|
||||||
|
Code push_ignores = scan_file( project_dir "helpers/push_ignores.inline.hpp" );
|
||||||
|
Code pop_ignores = scan_file( project_dir "helpers/pop_ignores.inline.hpp" );
|
||||||
|
|
||||||
|
Code ue_forceinline = code_str(FORCEINLINE);
|
||||||
|
// Code
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user