From c6b122f517fbde9a400ecb46c4fff44629f7677c Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 9 Jun 2022 21:23:15 -0700 Subject: Changeset: 65 Add enum name prefix manipulation support to codegen --- source/20-codegen-compiler/CodegenDecl.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/20-codegen-compiler/CodegenDecl.hpp') diff --git a/source/20-codegen-compiler/CodegenDecl.hpp b/source/20-codegen-compiler/CodegenDecl.hpp index 0728c08..60d5a13 100644 --- a/source/20-codegen-compiler/CodegenDecl.hpp +++ b/source/20-codegen-compiler/CodegenDecl.hpp @@ -80,6 +80,16 @@ struct DeclEnum { // Start with invalid value, calculate on demand mutable EnumValuePattern pattern = EVP_COUNT; + // TODO replace this with a regex? + std::string generateRemovingPrefix; + std::string generatingAddingPrefix; + // NOTE: this flag acts as a gate for every specific generating option, must be enabled for them to work + bool generating : 1 = false; + bool generateToString : 1 = false; + bool generateFromString : 1 = false; + // NOTE: see GenerateForEnum() for the exact heuristics + bool generateExcludeUseHeuristics : 1 = false; + EnumValuePattern CalcPattern() const; EnumValuePattern GetPattern() const; }; -- cgit v1.2.3-70-g09d2