From 01b3d0b3fb71f9d98e2d22914b6920624657fa92 Mon Sep 17 00:00:00 2001 From: Christoph Hart Date: Sun, 3 Nov 2024 17:15:29 +0100 Subject: [PATCH] - added better logging when creating HTML files --- currentGitHash.txt | 2 +- hi_backend/backend/currentGit.h | 2 +- projects/standalone/Source/Main.cpp | 17 ++++- tools/snex_playground/test_files/map/test01.h | 70 +++++++++++++++++++ 4 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 tools/snex_playground/test_files/map/test01.h diff --git a/currentGitHash.txt b/currentGitHash.txt index b8abe5d8c6..89b0b6793f 100644 --- a/currentGitHash.txt +++ b/currentGitHash.txt @@ -1 +1 @@ -d0a9d71f5e94f7c7a68e4f88755e3e1351f1200e +821e22b4fb730e202a9440edea42bc3cd483d60b diff --git a/hi_backend/backend/currentGit.h b/hi_backend/backend/currentGit.h index df2eb65925..91a2f2b009 100644 --- a/hi_backend/backend/currentGit.h +++ b/hi_backend/backend/currentGit.h @@ -1 +1 @@ -#define PREVIOUS_HISE_COMMIT "d0a9d71f5e94f7c7a68e4f88755e3e1351f1200e" +#define PREVIOUS_HISE_COMMIT "821e22b4fb730e202a9440edea42bc3cd483d60b" diff --git a/projects/standalone/Source/Main.cpp b/projects/standalone/Source/Main.cpp index b8b8e1bcad..1b2e6a6b0c 100644 --- a/projects/standalone/Source/Main.cpp +++ b/projects/standalone/Source/Main.cpp @@ -523,6 +523,8 @@ class CommandLineActions if(htmlDir != File()) { + print("Creating HTML files"); + htmlDir.createDirectory(); String htmlBaseLink = "https://docs.hise.dev/"; @@ -537,8 +539,19 @@ class CommandLineActions headerContent = headerContent.replace("{BASE_URL}", htmlBaseLink); headerFile.replaceWithText(headerContent); - DatabaseCrawler::createImagesInHtmlFolder(htmlDir, *bp, nullptr, nullptr); - DatabaseCrawler::createHtmlFilesInHtmlFolder(htmlDir, *bp, nullptr, nullptr); + struct Logger: public DatabaseCrawler::Logger + { + void logMessage(const String& message) override + { + print(message); + } + }; + + double progress; + Logger l; + + DatabaseCrawler::createImagesInHtmlFolder(htmlDir, *bp, &l, &progress); + DatabaseCrawler::createHtmlFilesInHtmlFolder(htmlDir, *bp, &l, &progress); } } diff --git a/tools/snex_playground/test_files/map/test01.h b/tools/snex_playground/test_files/map/test01.h new file mode 100644 index 0000000000..21c485a5e9 --- /dev/null +++ b/tools/snex_playground/test_files/map/test01.h @@ -0,0 +1,70 @@ +/* +BEGIN_TEST_DATA + f: main + ret: int + args: int + input: 12 + output: 12 + error: "" + filename: "map/test01" +END_TEST_DATA +*/ + +struct ExternalFunctionMap +{ + int value = 9000; +}; + +struct ExternalFunction +{ + dyn m; + + void setMap(dyn map) + { + m.referTo(map, 0, 1); + } + + +}; + +struct Base +{ + + + int value = 90; + int value2 = 100; +}; + +span map; +dyn m; + +struct Derived: public Base +{ + ExternalFunction f1; + + void init(dyn m) + { + f1.setMap(m); + } + + void ping0(int input) + { + value = input; + } +}; + +int main(int input) +{ + m.referTo(map, 0, 1); + + + + Derived obj; + + obj.init(m); + + obj.ping0(input); + + return obj.value + obj.value2; +} +