Browse Source

new example reg. CRTP

sfreundel@gmx.de 7 tháng trước cách đây
mục cha
commit
f075393f8c
34 tập tin đã thay đổi với 479 bổ sung0 xóa
  1. BIN
      CRTP/.vs/CRTP/CopilotIndices/17.13.444.19527/CodeChunks.db
  2. BIN
      CRTP/.vs/CRTP/CopilotIndices/17.13.444.19527/CodeChunks.db-shm
  3. BIN
      CRTP/.vs/CRTP/CopilotIndices/17.13.444.19527/CodeChunks.db-wal
  4. BIN
      CRTP/.vs/CRTP/CopilotIndices/17.13.444.19527/SemanticSymbols.db
  5. BIN
      CRTP/.vs/CRTP/CopilotIndices/17.13.444.19527/SemanticSymbols.db-shm
  6. BIN
      CRTP/.vs/CRTP/CopilotIndices/17.13.444.19527/SemanticSymbols.db-wal
  7. BIN
      CRTP/.vs/CRTP/FileContentIndex/b22ce596-ab6b-429a-a49c-6a3b3b3b81f9.vsidx
  8. BIN
      CRTP/.vs/CRTP/copilot-chat/48988cf4/sessions/5c80f79e-50a2-48a7-9259-4d6510ea9f2c
  9. BIN
      CRTP/.vs/CRTP/v17/.suo
  10. BIN
      CRTP/.vs/CRTP/v17/Browse.VC.db
  11. 37 0
      CRTP/.vs/CRTP/v17/DocumentLayout.backup.json
  12. 37 0
      CRTP/.vs/CRTP/v17/DocumentLayout.json
  13. BIN
      CRTP/.vs/CRTP/v17/ipch/AutoPCH/9207c5a996c6e90f/CRTP.ipch
  14. 31 0
      CRTP/CRTP.sln
  15. 176 0
      CRTP/CRTP/CRTP.cpp
  16. 137 0
      CRTP/CRTP/CRTP.vcxproj
  17. 22 0
      CRTP/CRTP/CRTP.vcxproj.filters
  18. 4 0
      CRTP/CRTP/CRTP.vcxproj.user
  19. 11 0
      CRTP/CRTP/x64/Debug/CRTP.exe.recipe
  20. BIN
      CRTP/CRTP/x64/Debug/CRTP.ilk
  21. 18 0
      CRTP/CRTP/x64/Debug/CRTP.log
  22. 1 0
      CRTP/CRTP/x64/Debug/CRTP.tlog/CL.command.1.tlog
  23. 2 0
      CRTP/CRTP/x64/Debug/CRTP.tlog/CRTP.lastbuildstate
  24. 1 0
      CRTP/CRTP/x64/Debug/CRTP.tlog/Cl.items.tlog
  25. BIN
      CRTP/CRTP/x64/Debug/CRTP.tlog/link.command.1.tlog
  26. BIN
      CRTP/CRTP/x64/Debug/CRTP.tlog/link.read.1.tlog
  27. 2 0
      CRTP/CRTP/x64/Debug/CRTP.tlog/link.secondary.1.tlog
  28. BIN
      CRTP/CRTP/x64/Debug/CRTP.tlog/link.write.1.tlog
  29. 0 0
      CRTP/CRTP/x64/Debug/CRTP.tlog/unsuccessfulbuild
  30. BIN
      CRTP/CRTP/x64/Debug/crtp.obj.enc
  31. BIN
      CRTP/CRTP/x64/Debug/vc143.idb
  32. BIN
      CRTP/CRTP/x64/Debug/vc143.pdb
  33. BIN
      CRTP/x64/Debug/CRTP.exe
  34. BIN
      CRTP/x64/Debug/CRTP.pdb

BIN
CRTP/.vs/CRTP/CopilotIndices/17.13.444.19527/CodeChunks.db


BIN
CRTP/.vs/CRTP/CopilotIndices/17.13.444.19527/CodeChunks.db-shm


BIN
CRTP/.vs/CRTP/CopilotIndices/17.13.444.19527/CodeChunks.db-wal


BIN
CRTP/.vs/CRTP/CopilotIndices/17.13.444.19527/SemanticSymbols.db


BIN
CRTP/.vs/CRTP/CopilotIndices/17.13.444.19527/SemanticSymbols.db-shm


BIN
CRTP/.vs/CRTP/CopilotIndices/17.13.444.19527/SemanticSymbols.db-wal


BIN
CRTP/.vs/CRTP/FileContentIndex/b22ce596-ab6b-429a-a49c-6a3b3b3b81f9.vsidx


BIN
CRTP/.vs/CRTP/copilot-chat/48988cf4/sessions/5c80f79e-50a2-48a7-9259-4d6510ea9f2c


BIN
CRTP/.vs/CRTP/v17/.suo


BIN
CRTP/.vs/CRTP/v17/Browse.VC.db


+ 37 - 0
CRTP/.vs/CRTP/v17/DocumentLayout.backup.json

@@ -0,0 +1,37 @@
+{
+  "Version": 1,
+  "WorkspaceRootPath": "C:\\Users\\sfreunde\\source\\repos\\CRTP\\",
+  "Documents": [
+    {
+      "AbsoluteMoniker": "D:0:0:{44448F7E-30C3-4992-BAB5-396AD033D206}|CRTP\\CRTP.vcxproj|C:\\Users\\sfreunde\\source\\repos\\CRTP\\CRTP\\CRTP.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
+      "RelativeMoniker": "D:0:0:{44448F7E-30C3-4992-BAB5-396AD033D206}|CRTP\\CRTP.vcxproj|solutionrelative:CRTP\\CRTP.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
+    }
+  ],
+  "DocumentGroupContainers": [
+    {
+      "Orientation": 0,
+      "VerticalTabListWidth": 256,
+      "DocumentGroups": [
+        {
+          "DockedWidth": 155,
+          "SelectedChildIndex": 0,
+          "Children": [
+            {
+              "$type": "Document",
+              "DocumentIndex": 0,
+              "Title": "CRTP.cpp",
+              "DocumentMoniker": "C:\\Users\\sfreunde\\source\\repos\\CRTP\\CRTP\\CRTP.cpp",
+              "RelativeDocumentMoniker": "CRTP\\CRTP.cpp",
+              "ToolTip": "C:\\Users\\sfreunde\\source\\repos\\CRTP\\CRTP\\CRTP.cpp",
+              "RelativeToolTip": "CRTP\\CRTP.cpp",
+              "ViewState": "AgIAAIYAAAAAAAAAAAAAAKoAAAAPAAAAAAAAAA==",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
+              "WhenOpened": "2025-05-15T15:44:37.467Z",
+              "EditorCaption": ""
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}

+ 37 - 0
CRTP/.vs/CRTP/v17/DocumentLayout.json

@@ -0,0 +1,37 @@
+{
+  "Version": 1,
+  "WorkspaceRootPath": "C:\\Users\\sfreunde\\source\\repos\\CRTP\\",
+  "Documents": [
+    {
+      "AbsoluteMoniker": "D:0:0:{44448F7E-30C3-4992-BAB5-396AD033D206}|CRTP\\CRTP.vcxproj|C:\\Users\\sfreunde\\source\\repos\\CRTP\\CRTP\\CRTP.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
+      "RelativeMoniker": "D:0:0:{44448F7E-30C3-4992-BAB5-396AD033D206}|CRTP\\CRTP.vcxproj|solutionrelative:CRTP\\CRTP.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
+    }
+  ],
+  "DocumentGroupContainers": [
+    {
+      "Orientation": 0,
+      "VerticalTabListWidth": 256,
+      "DocumentGroups": [
+        {
+          "DockedWidth": 155,
+          "SelectedChildIndex": 0,
+          "Children": [
+            {
+              "$type": "Document",
+              "DocumentIndex": 0,
+              "Title": "CRTP.cpp",
+              "DocumentMoniker": "C:\\Users\\sfreunde\\source\\repos\\CRTP\\CRTP\\CRTP.cpp",
+              "RelativeDocumentMoniker": "CRTP\\CRTP.cpp",
+              "ToolTip": "C:\\Users\\sfreunde\\source\\repos\\CRTP\\CRTP\\CRTP.cpp",
+              "RelativeToolTip": "CRTP\\CRTP.cpp",
+              "ViewState": "AgIAAFEAAAAAAAAAAAAAAHoAAAAAAAAAAAAAAA==",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
+              "WhenOpened": "2025-05-15T15:44:37.467Z",
+              "EditorCaption": ""
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}

BIN
CRTP/.vs/CRTP/v17/ipch/AutoPCH/9207c5a996c6e90f/CRTP.ipch


+ 31 - 0
CRTP/CRTP.sln

@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.13.35931.197 d17.13
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CRTP", "CRTP\CRTP.vcxproj", "{44448F7E-30C3-4992-BAB5-396AD033D206}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{44448F7E-30C3-4992-BAB5-396AD033D206}.Debug|x64.ActiveCfg = Debug|x64
+		{44448F7E-30C3-4992-BAB5-396AD033D206}.Debug|x64.Build.0 = Debug|x64
+		{44448F7E-30C3-4992-BAB5-396AD033D206}.Debug|x86.ActiveCfg = Debug|Win32
+		{44448F7E-30C3-4992-BAB5-396AD033D206}.Debug|x86.Build.0 = Debug|Win32
+		{44448F7E-30C3-4992-BAB5-396AD033D206}.Release|x64.ActiveCfg = Release|x64
+		{44448F7E-30C3-4992-BAB5-396AD033D206}.Release|x64.Build.0 = Release|x64
+		{44448F7E-30C3-4992-BAB5-396AD033D206}.Release|x86.ActiveCfg = Release|Win32
+		{44448F7E-30C3-4992-BAB5-396AD033D206}.Release|x86.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {BDA0E4D4-B565-4357-A09F-9286595DD42F}
+	EndGlobalSection
+EndGlobal

+ 176 - 0
CRTP/CRTP/CRTP.cpp

@@ -0,0 +1,176 @@
+#include <iostream>
+
+
+typedef enum
+{
+    NORMAL = 0,
+    HIGHLIGHT = 1
+} t_DrawInvers;
+
+typedef enum
+{
+    LEFT = 0,
+    CENTER = 1,
+    RIGHT = 2
+} t_HorizontalPosition;
+
+typedef enum
+{
+    TOP = 0,
+    MIDDLE = 1,
+    BOTTOM = 2
+} t_VerticalPosition;
+
+// Mock graphics class
+class MockGfx {
+public:
+
+    /**********************************************************************************************
+ * @brief Constructor
+ *
+ * This is a blank constructor since the constructor is already defined in the base class.
+ * The constructor in the base class is used to initialize the u8g2 object.
+ * It is necessary to define a constructor in this class to avoid errors from the compiler.
+ */
+	MockGfx() {
+		std::cout << "MockGfx constructor\n";
+    }; // Initialize with specific display settings
+
+    void drawPixel(uint16_t x, uint16_t y, uint16_t color) { std::cout << "MockGfx::drawPixel()\n"; }
+    void drawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color) { std::cout << "MockGfx::drawLine()\n"; }
+    void drawRect(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color) { std::cout << "MockGfx::drawRect()\n"; }
+    void fillRect(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color) { std::cout << "MockGfx::fillRect()\n"; }
+    void drawCircle(uint16_t x, uint16_t y, uint16_t r, uint16_t color) { std::cout << "MockGfx::drawCircle()\n"; }
+	void fillCircle(uint16_t x, uint16_t y, uint16_t r, uint16_t color) { std::cout << "MockGfx::fillCircle()\n"; }
+	void drawText(uint16_t x, uint16_t y, const char* str, uint16_t color) { std::cout << "MockGfx::drawText()\n"; }
+	void setFont(uint16_t font) { std::cout << "MockGfx::setFont()\n"; }
+	void setTextColor(uint16_t color) { std::cout << "MockGfx::setTextColor()\n"; }
+	void setTextSize(uint16_t size) { std::cout << "MockGfx::setTextSize()\n"; }
+	void setCursor(uint16_t x, uint16_t y) { std::cout << "MockGfx::setCursor()\n"; }
+    void clearDisplay() { std::cout << "MockGfx::clearDisplay()\n"; }
+    void setRotation(uint16_t rotation) { std::cout << "MockGfx::setRotation(" << rotation << ")\n"; }
+	void sendBuffer() { std::cout << "MockGfx::sendBuffer()\n"; }
+};
+
+class u8g2Gfx {
+public:
+
+    u8g2Gfx() {
+        std::cout << "u8g2Gfx constructor\n";
+    }; // Initialize with specific display settings
+
+    void drawPixel(uint16_t x, uint16_t y, uint16_t color) { std::cout << "u8g2Gfx::drawPixel()\n"; }
+
+    void drawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color) { std::cout << "u8g2Gfx::drawLine()\n"; }
+
+    void drawRect(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color) {
+        std::cout << "u8g2Gfx::drawRect(" << x << ", " << y << ", " << w << ", " << h << ")\n";
+    }
+
+    void fillRect(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color) {
+        std::cout << "u8g2Gfx::fillRect(" << x << ", " << y << ", " << w << ", " << h << ")\n";
+    }
+
+    void drawCircle(uint16_t x, uint16_t y, uint16_t r, uint16_t color) { std::cout << "u8g2Gfx::drawCircle()\n"; }
+    void fillCircle(uint16_t x, uint16_t y, uint16_t r, uint16_t color) { std::cout << "u8g2Gfx::fillCircle()\n"; }
+    void drawText(uint16_t x, uint16_t y, const char* str, uint16_t color) { std::cout << "u8g2Gfx::drawText()\n"; }
+    void setFont(uint16_t font) { std::cout << "u8g2Gfx::setFont()\n"; }
+    void setTextColor(uint16_t color) { std::cout << "u8g2Gfx::setTextColor()\n"; }
+    void setTextSize(uint16_t size) { std::cout << "u8g2Gfx::setTextSize()\n"; }
+    void setCursor(uint16_t x, uint16_t y) { std::cout << "u8g2Gfx::setCursor()\n"; }
+    void clearDisplay() { std::cout << "u8g2Gfx::clearDisplay()\n"; }
+    void setRotation(uint16_t rotation) { std::cout << "u8g2Gfx::setRotation(" << rotation << ")\n"; }
+    void sendBuffer() { std::cout << "u8g2Gfx::sendBuffer()\n"; }
+};
+
+
+// For u8g2
+// u8g2_t gfx;
+
+// For TFT_eSPI
+// TFT_eSPI gfx;
+MockGfx gfx;
+u8g2Gfx u8g2gfx;
+
+
+
+// New: CRTP base class
+template<typename Derived>
+class cBaseGraphics {
+public:
+
+    void draw() {
+        static_cast<Derived*>(this)->drawImpl();
+    }
+    void setVisible(bool visible) {
+        static_cast<Derived*>(this)->setVisibleImpl(visible);
+    }
+    // ... repeat for other methods
+};
+
+
+template <typename Graphics>
+class Button : public cBaseGraphics<Button<Graphics>> {
+public:
+    Button(Graphics* gfx, uint16_t x, uint16_t y, uint16_t w, uint16_t h, const char* label)
+        : _gfx(gfx), x_(x), y_(y), w_(w), h_(h), label_(label) {
+    }
+
+    void setup() {
+        std::cout << "Button class - setup()" << std::endl;
+    }
+
+protected:
+    void drawImpl() {
+        // Pseudocode: Replace with actual drawing code for your library
+        _gfx->drawRect(x_, y_, w_, h_, 1);
+        _gfx->drawText(x_ + 2, y_ + h_ / 2, label_, 1);
+    }
+
+private:
+    Graphics* _gfx;
+    uint16_t x_, y_, w_, h_;
+    const char* label_;
+};
+
+template <typename Graphics>
+class ProgressBar : public cBaseGraphics<ProgressBar<Graphics>> {
+public:
+    ProgressBar(Graphics* gfx, uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t value)
+        : _gfx(gfx), x_(x), y_(y), w_(w), h_(h), value_(value) {
+    }
+
+    void setup() {
+        std::cout << "ProgressBar class - setup()" << std::endl;
+        _gfx->drawText(x_, y_ - 10, "ProgressBar setup", 1);
+    }
+
+protected:
+    void drawImpl() {
+        _gfx->drawRect(x_, y_, w_, h_, 1);
+        uint16_t fillWidth = (w_ * value_) / 100;
+        _gfx->fillRect(x_, y_, fillWidth, h_ , 1);
+    }
+
+private:
+    Graphics* _gfx;
+    uint16_t x_, y_, w_, h_, value_;
+};
+
+
+Button<MockGfx> btn(&gfx, 10, 10, 80, 30, "OK");
+ProgressBar<MockGfx> bar(&gfx, 10, 50, 100, 20, 75);
+
+Button<u8g2Gfx> btn1(&u8g2gfx, 10, 10, 80, 30, "OK");
+ProgressBar<u8g2Gfx> bar2(&u8g2gfx, 10, 50, 100, 20, 75);
+
+uint16_t main() {
+
+	btn.setup();
+    btn.draw();
+    bar.draw();
+
+    btn1.draw();
+    bar2.draw();
+    return 0;
+}

+ 137 - 0
CRTP/CRTP/CRTP.vcxproj

@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <VCProjectVersion>17.0</VCProjectVersion>
+    <Keyword>Win32Proj</Keyword>
+    <ProjectGuid>{44448f7e-30c3-4992-bab5-396ad033d206}</ProjectGuid>
+    <RootNamespace>CRTP</RootNamespace>
+    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="Shared">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+      <RuntimeTypeInfo>false</RuntimeTypeInfo>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+      <RuntimeTypeInfo>false</RuntimeTypeInfo>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="CRTP.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 22 - 0
CRTP/CRTP/CRTP.vcxproj.filters

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="CRTP.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 4 - 0
CRTP/CRTP/CRTP.vcxproj.user

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup />
+</Project>

+ 11 - 0
CRTP/CRTP/x64/Debug/CRTP.exe.recipe

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project>
+  <ProjectOutputs>
+    <ProjectOutput>
+      <FullPath>C:\Users\sfreunde\source\repos\CRTP\x64\Debug\CRTP.exe</FullPath>
+    </ProjectOutput>
+  </ProjectOutputs>
+  <ContentFiles />
+  <SatelliteDlls />
+  <NonRecipeFileRefs />
+</Project>

BIN
CRTP/CRTP/x64/Debug/CRTP.ilk


+ 18 - 0
CRTP/CRTP/x64/Debug/CRTP.log

@@ -0,0 +1,18 @@
+  CRTP.cpp
+C:\Users\sfreunde\source\repos\CRTP\CRTP\CRTP.cpp(167,10): warning C4326: return type of 'main' should be 'int' instead of 'uint16_t'
+C:\Users\sfreunde\source\repos\CRTP\CRTP\CRTP.cpp(103,38): error C2248: 'ProgressBar<u8g2Gfx>::drawImpl': cannot access protected member declared in class 'ProgressBar<u8g2Gfx>'
+      C:\Users\sfreunde\source\repos\CRTP\CRTP\CRTP.cpp(149,10):
+      see declaration of 'ProgressBar<u8g2Gfx>::drawImpl'
+      C:\Users\sfreunde\source\repos\CRTP\CRTP\CRTP.cpp(137,7):
+      see declaration of 'ProgressBar<u8g2Gfx>'
+      C:\Users\sfreunde\source\repos\CRTP\CRTP\CRTP.cpp(103,38):
+      the template instantiation context (the oldest one first) is
+          C:\Users\sfreunde\source\repos\CRTP\CRTP\CRTP.cpp(165,22):
+          see reference to class template instantiation 'ProgressBar<u8g2Gfx>' being compiled
+          C:\Users\sfreunde\source\repos\CRTP\CRTP\CRTP.cpp(137,28):
+          see reference to class template instantiation 'cBaseGraphics<ProgressBar<u8g2Gfx>>' being compiled
+          C:\Users\sfreunde\source\repos\CRTP\CRTP\CRTP.cpp(102,10):
+          while compiling class template member function 'void cBaseGraphics<ProgressBar<u8g2Gfx>>::draw(void)'
+              C:\Users\sfreunde\source\repos\CRTP\CRTP\CRTP.cpp(174,14):
+              see the first reference to 'cBaseGraphics<ProgressBar<u8g2Gfx>>::draw' in 'main'
+  

+ 1 - 0
CRTP/CRTP/x64/Debug/CRTP.tlog/CL.command.1.tlog

@@ -0,0 +1 @@
+��

+ 2 - 0
CRTP/CRTP/x64/Debug/CRTP.tlog/CRTP.lastbuildstate

@@ -0,0 +1,2 @@
+PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.43.34808:TargetPlatformVersion=10.0.26100.0:
+Debug|x64|C:\Users\sfreunde\source\repos\CRTP\|

+ 1 - 0
CRTP/CRTP/x64/Debug/CRTP.tlog/Cl.items.tlog

@@ -0,0 +1 @@
+C:\Users\sfreunde\source\repos\CRTP\CRTP\CRTP.cpp;C:\Users\sfreunde\source\repos\CRTP\CRTP\x64\Debug\CRTP.obj

BIN
CRTP/CRTP/x64/Debug/CRTP.tlog/link.command.1.tlog


BIN
CRTP/CRTP/x64/Debug/CRTP.tlog/link.read.1.tlog


+ 2 - 0
CRTP/CRTP/x64/Debug/CRTP.tlog/link.secondary.1.tlog

@@ -0,0 +1,2 @@
+^C:\USERS\SFREUNDE\SOURCE\REPOS\CRTP\CRTP\X64\DEBUG\CRTP.OBJ
+C:\Users\sfreunde\source\repos\CRTP\CRTP\x64\Debug\CRTP.ilk

BIN
CRTP/CRTP/x64/Debug/CRTP.tlog/link.write.1.tlog


+ 0 - 0
CRTP/CRTP/x64/Debug/CRTP.tlog/unsuccessfulbuild


BIN
CRTP/CRTP/x64/Debug/crtp.obj.enc


BIN
CRTP/CRTP/x64/Debug/vc143.idb


BIN
CRTP/CRTP/x64/Debug/vc143.pdb


BIN
CRTP/x64/Debug/CRTP.exe


BIN
CRTP/x64/Debug/CRTP.pdb