From 353480c75c97905407e1f40d52ee1dc33d7fdc01 Mon Sep 17 00:00:00 2001 From: Jose Caban <43381096+AssKoala@users.noreply.github.com> Date: Sun, 30 Nov 2025 21:34:14 -0500 Subject: [PATCH] Split 2025 into lang --- 2025/{ => Cpp}/.gitignore | 4 +- .../AdventHelpers/AdventHelpers.vcxproj | 332 +++++++++--------- .../AdventHelpers.vcxproj.filters | 64 ++-- .../AdventHelpers/AdventOfCodeSolution.h | 26 +- .../include/AdventHelpers/InputFileHelper.h | 70 ++-- .../AdventHelpers/source/InputFileHelper.cpp | 84 ++--- .../AdventHelpersTester.cpp | 70 ++-- .../AdventHelpersTester.vcxproj | 278 +++++++-------- .../AdventHelpersTester.vcxproj.filters | 42 +-- 2025/{ => Cpp}/AdventOfCode.slnx | 16 +- 10 files changed, 493 insertions(+), 493 deletions(-) rename 2025/{ => Cpp}/.gitignore (91%) rename 2025/{ => Cpp}/AdventHelpers/AdventHelpers.vcxproj (98%) rename 2025/{ => Cpp}/AdventHelpers/AdventHelpers.vcxproj.filters (97%) rename 2025/{ => Cpp}/AdventHelpers/include/AdventHelpers/AdventOfCodeSolution.h (96%) rename 2025/{ => Cpp}/AdventHelpers/include/AdventHelpers/InputFileHelper.h (95%) rename 2025/{ => Cpp}/AdventHelpers/source/InputFileHelper.cpp (95%) rename 2025/{ => Cpp}/AdventHelpersTester/AdventHelpersTester.cpp (96%) rename 2025/{ => Cpp}/AdventHelpersTester/AdventHelpersTester.vcxproj (97%) rename 2025/{ => Cpp}/AdventHelpersTester/AdventHelpersTester.vcxproj.filters (97%) rename 2025/{ => Cpp}/AdventOfCode.slnx (97%) diff --git a/2025/.gitignore b/2025/Cpp/.gitignore similarity index 91% rename from 2025/.gitignore rename to 2025/Cpp/.gitignore index 7b6d9fe..8bf8504 100644 --- a/2025/.gitignore +++ b/2025/Cpp/.gitignore @@ -1,3 +1,3 @@ -.vs -x64 +.vs +x64 *.vcxproj.user \ No newline at end of file diff --git a/2025/AdventHelpers/AdventHelpers.vcxproj b/2025/Cpp/AdventHelpers/AdventHelpers.vcxproj similarity index 98% rename from 2025/AdventHelpers/AdventHelpers.vcxproj rename to 2025/Cpp/AdventHelpers/AdventHelpers.vcxproj index a56cc5a..54223e4 100644 --- a/2025/AdventHelpers/AdventHelpers.vcxproj +++ b/2025/Cpp/AdventHelpers/AdventHelpers.vcxproj @@ -1,167 +1,167 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 18.0 - Win32Proj - {df572ffd-18c6-4b8d-8d35-4855f9a05376} - AdventHelpers - 10.0 - - - - StaticLibrary - true - v145 - Unicode - - - StaticLibrary - false - v145 - true - Unicode - - - StaticLibrary - true - v145 - Unicode - - - StaticLibrary - false - v145 - true - Unicode - - - - - - - - - - - - - - - - - - - - - $(ProjectDir)include;$(PublicIncludeDirectories) - - - $(ProjectDir)include;$(PublicIncludeDirectories) - - - $(ProjectDir)include;$(PublicIncludeDirectories) - - - $(ProjectDir)include;$(PublicIncludeDirectories) - - - - Level3 - true - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - stdcpplatest - NotUsing - pch.h - $(ProjectDir)include;%(AdditionalIncludeDirectories) - - - - - true - - - - - Level3 - true - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - stdcpplatest - NotUsing - pch.h - $(ProjectDir)include;%(AdditionalIncludeDirectories) - - - - - true - - - - - Level3 - true - _DEBUG;_LIB;%(PreprocessorDefinitions) - true - stdcpplatest - NotUsing - pch.h - $(ProjectDir)include;%(AdditionalIncludeDirectories) - - - - - true - - - - - Level3 - true - true - true - NDEBUG;_LIB;%(PreprocessorDefinitions) - true - stdcpplatest - NotUsing - pch.h - $(ProjectDir)include;%(AdditionalIncludeDirectories) - - - - - true - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 18.0 + Win32Proj + {df572ffd-18c6-4b8d-8d35-4855f9a05376} + AdventHelpers + 10.0 + + + + StaticLibrary + true + v145 + Unicode + + + StaticLibrary + false + v145 + true + Unicode + + + StaticLibrary + true + v145 + Unicode + + + StaticLibrary + false + v145 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(ProjectDir)include;$(PublicIncludeDirectories) + + + $(ProjectDir)include;$(PublicIncludeDirectories) + + + $(ProjectDir)include;$(PublicIncludeDirectories) + + + $(ProjectDir)include;$(PublicIncludeDirectories) + + + + Level3 + true + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpplatest + NotUsing + pch.h + $(ProjectDir)include;%(AdditionalIncludeDirectories) + + + + + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpplatest + NotUsing + pch.h + $(ProjectDir)include;%(AdditionalIncludeDirectories) + + + + + true + + + + + Level3 + true + _DEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpplatest + NotUsing + pch.h + $(ProjectDir)include;%(AdditionalIncludeDirectories) + + + + + true + + + + + Level3 + true + true + true + NDEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpplatest + NotUsing + pch.h + $(ProjectDir)include;%(AdditionalIncludeDirectories) + + + + + true + + + + + + + + + + + + \ No newline at end of file diff --git a/2025/AdventHelpers/AdventHelpers.vcxproj.filters b/2025/Cpp/AdventHelpers/AdventHelpers.vcxproj.filters similarity index 97% rename from 2025/AdventHelpers/AdventHelpers.vcxproj.filters rename to 2025/Cpp/AdventHelpers/AdventHelpers.vcxproj.filters index f66964e..2372d6b 100644 --- a/2025/AdventHelpers/AdventHelpers.vcxproj.filters +++ b/2025/Cpp/AdventHelpers/AdventHelpers.vcxproj.filters @@ -1,33 +1,33 @@ - - - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {2a803cbd-00cf-4f43-9bed-5bc9ef841e3f} - - - - - source - - - - - include\AdventHelpers - - - include\AdventHelpers - - + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {2a803cbd-00cf-4f43-9bed-5bc9ef841e3f} + + + + + source + + + + + include\AdventHelpers + + + include\AdventHelpers + + \ No newline at end of file diff --git a/2025/AdventHelpers/include/AdventHelpers/AdventOfCodeSolution.h b/2025/Cpp/AdventHelpers/include/AdventHelpers/AdventOfCodeSolution.h similarity index 96% rename from 2025/AdventHelpers/include/AdventHelpers/AdventOfCodeSolution.h rename to 2025/Cpp/AdventHelpers/include/AdventHelpers/AdventOfCodeSolution.h index 12787b1..acbbfcf 100644 --- a/2025/AdventHelpers/include/AdventHelpers/AdventOfCodeSolution.h +++ b/2025/Cpp/AdventHelpers/include/AdventHelpers/AdventOfCodeSolution.h @@ -1,13 +1,13 @@ -#pragma once - -#include "AdventHelpers/InputFileHelper.h" - -namespace AdventHelpers -{ - class IAdventOfCodeSolution { - public: - virtual void SolveExample(AdventHelper::InputFileHelper& inputFile) = 0; - virtual void SolveProblem01(AdventHelper::InputFileHelper& inputFile) = 0; - virtual void SolveProblem02(AdventHelper::InputFileHelper& inputFile) = 0; - }; -} +#pragma once + +#include "AdventHelpers/InputFileHelper.h" + +namespace AdventHelpers +{ + class IAdventOfCodeSolution { + public: + virtual void SolveExample(AdventHelper::InputFileHelper& inputFile) = 0; + virtual void SolveProblem01(AdventHelper::InputFileHelper& inputFile) = 0; + virtual void SolveProblem02(AdventHelper::InputFileHelper& inputFile) = 0; + }; +} diff --git a/2025/AdventHelpers/include/AdventHelpers/InputFileHelper.h b/2025/Cpp/AdventHelpers/include/AdventHelpers/InputFileHelper.h similarity index 95% rename from 2025/AdventHelpers/include/AdventHelpers/InputFileHelper.h rename to 2025/Cpp/AdventHelpers/include/AdventHelpers/InputFileHelper.h index 5028cca..9cc8e57 100644 --- a/2025/AdventHelpers/include/AdventHelpers/InputFileHelper.h +++ b/2025/Cpp/AdventHelpers/include/AdventHelpers/InputFileHelper.h @@ -1,35 +1,35 @@ -#pragma once - -#include -#include - -namespace AdventHelper { - // Interface - class InputFileHelper { - public: - using LinesType = std::vector; - - static InputFileHelper* create(const char* filename); - static void destroy(InputFileHelper* inputFileHelper); - - inline LinesType::const_iterator begin() const; - inline LinesType::const_iterator end() const; - private: - InputFileHelper() = default; - ~InputFileHelper() = default; - - const char* getLine(); - - LinesType mLines; - }; - - // Implementation - InputFileHelper::LinesType::const_iterator InputFileHelper::begin() const { - return mLines.cbegin(); - } - - InputFileHelper::LinesType::const_iterator InputFileHelper::end() const { - return mLines.cend(); - } -} - +#pragma once + +#include +#include + +namespace AdventHelper { + // Interface + class InputFileHelper { + public: + using LinesType = std::vector; + + static InputFileHelper* create(const char* filename); + static void destroy(InputFileHelper* inputFileHelper); + + inline LinesType::const_iterator begin() const; + inline LinesType::const_iterator end() const; + private: + InputFileHelper() = default; + ~InputFileHelper() = default; + + const char* getLine(); + + LinesType mLines; + }; + + // Implementation + InputFileHelper::LinesType::const_iterator InputFileHelper::begin() const { + return mLines.cbegin(); + } + + InputFileHelper::LinesType::const_iterator InputFileHelper::end() const { + return mLines.cend(); + } +} + diff --git a/2025/AdventHelpers/source/InputFileHelper.cpp b/2025/Cpp/AdventHelpers/source/InputFileHelper.cpp similarity index 95% rename from 2025/AdventHelpers/source/InputFileHelper.cpp rename to 2025/Cpp/AdventHelpers/source/InputFileHelper.cpp index 744e0b1..db7f6d9 100644 --- a/2025/AdventHelpers/source/InputFileHelper.cpp +++ b/2025/Cpp/AdventHelpers/source/InputFileHelper.cpp @@ -1,42 +1,42 @@ -#include "AdventHelpers/InputFileHelper.h" - -#include -#include -#include - -namespace AdventHelper { - // Opens file, reads each line into mLines vector. Returns null on error. - InputFileHelper* InputFileHelper::create(const char* filename) { - InputFileHelper* inputFileHelper = nullptr; - std::ifstream file(filename); - - if (file.is_open()) { - inputFileHelper = new InputFileHelper(); - - std::string line; - while (std::getline(file, line)) { - inputFileHelper->mLines.push_back(line); - } - - // Clean up - file.close(); - } - else { - std::cerr << "Error: Could not open file " << filename << std::endl; - } - - return inputFileHelper; - } - - const char* InputFileHelper::getLine() { - return nullptr; - } - - void InputFileHelper::destroy(InputFileHelper* inputFileHelper) { - if (inputFileHelper) { - delete inputFileHelper; - } else { - std::cerr << "Warning: Attempted to destroy a null InputFileHelper pointer." << std::endl; - } - } -} // namespace AdventHelper +#include "AdventHelpers/InputFileHelper.h" + +#include +#include +#include + +namespace AdventHelper { + // Opens file, reads each line into mLines vector. Returns null on error. + InputFileHelper* InputFileHelper::create(const char* filename) { + InputFileHelper* inputFileHelper = nullptr; + std::ifstream file(filename); + + if (file.is_open()) { + inputFileHelper = new InputFileHelper(); + + std::string line; + while (std::getline(file, line)) { + inputFileHelper->mLines.push_back(line); + } + + // Clean up + file.close(); + } + else { + std::cerr << "Error: Could not open file " << filename << std::endl; + } + + return inputFileHelper; + } + + const char* InputFileHelper::getLine() { + return nullptr; + } + + void InputFileHelper::destroy(InputFileHelper* inputFileHelper) { + if (inputFileHelper) { + delete inputFileHelper; + } else { + std::cerr << "Warning: Attempted to destroy a null InputFileHelper pointer." << std::endl; + } + } +} // namespace AdventHelper diff --git a/2025/AdventHelpersTester/AdventHelpersTester.cpp b/2025/Cpp/AdventHelpersTester/AdventHelpersTester.cpp similarity index 96% rename from 2025/AdventHelpersTester/AdventHelpersTester.cpp rename to 2025/Cpp/AdventHelpersTester/AdventHelpersTester.cpp index e583699..1882af3 100644 --- a/2025/AdventHelpersTester/AdventHelpersTester.cpp +++ b/2025/Cpp/AdventHelpersTester/AdventHelpersTester.cpp @@ -1,36 +1,36 @@ -#include "AdventHelpers/InputFileHelper.h" -#include "AdventHelpers/AdventOfCodeSolution.h" - -#include - -// Interface - -class ExampleSolution : public AdventHelpers::IAdventOfCodeSolution -{ -public: - virtual void SolveExample(AdventHelper::InputFileHelper& inputFile) override; - virtual void SolveProblem01(AdventHelper::InputFileHelper& inputFile) override; - virtual void SolveProblem02(AdventHelper::InputFileHelper& inputFile) override; -}; - -int main() -{ - auto* inputHelper = AdventHelper::InputFileHelper::create("input.txt"); - - std::cout << "Hello World!\n"; - - AdventHelper::InputFileHelper::destroy(inputHelper); -} - -// Implementation - -void ExampleSolution::SolveExample(AdventHelper::InputFileHelper& inputFile) { - -} - -void ExampleSolution::SolveProblem01(AdventHelper::InputFileHelper& inputFile) { - -} - -void ExampleSolution::SolveProblem02(AdventHelper::InputFileHelper& inputFile) { +#include "AdventHelpers/InputFileHelper.h" +#include "AdventHelpers/AdventOfCodeSolution.h" + +#include + +// Interface + +class ExampleSolution : public AdventHelpers::IAdventOfCodeSolution +{ +public: + virtual void SolveExample(AdventHelper::InputFileHelper& inputFile) override; + virtual void SolveProblem01(AdventHelper::InputFileHelper& inputFile) override; + virtual void SolveProblem02(AdventHelper::InputFileHelper& inputFile) override; +}; + +int main() +{ + auto* inputHelper = AdventHelper::InputFileHelper::create("input.txt"); + + std::cout << "Hello World!\n"; + + AdventHelper::InputFileHelper::destroy(inputHelper); +} + +// Implementation + +void ExampleSolution::SolveExample(AdventHelper::InputFileHelper& inputFile) { + +} + +void ExampleSolution::SolveProblem01(AdventHelper::InputFileHelper& inputFile) { + +} + +void ExampleSolution::SolveProblem02(AdventHelper::InputFileHelper& inputFile) { } \ No newline at end of file diff --git a/2025/AdventHelpersTester/AdventHelpersTester.vcxproj b/2025/Cpp/AdventHelpersTester/AdventHelpersTester.vcxproj similarity index 97% rename from 2025/AdventHelpersTester/AdventHelpersTester.vcxproj rename to 2025/Cpp/AdventHelpersTester/AdventHelpersTester.vcxproj index 4563198..b5b97a1 100644 --- a/2025/AdventHelpersTester/AdventHelpersTester.vcxproj +++ b/2025/Cpp/AdventHelpersTester/AdventHelpersTester.vcxproj @@ -1,140 +1,140 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 18.0 - Win32Proj - {8771a5e2-83fe-497e-8598-18dbf552d6b3} - AdventHelpersTester - 10.0 - - - - Application - true - v145 - Unicode - - - Application - false - v145 - true - Unicode - - - Application - true - v145 - Unicode - - - Application - false - v145 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - Level3 - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpplatest - - - Console - true - - - - - Level3 - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpplatest - - - Console - true - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpplatest - - - Console - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpplatest - - - Console - true - - - - - - - - {df572ffd-18c6-4b8d-8d35-4855f9a05376} - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 18.0 + Win32Proj + {8771a5e2-83fe-497e-8598-18dbf552d6b3} + AdventHelpersTester + 10.0 + + + + Application + true + v145 + Unicode + + + Application + false + v145 + true + Unicode + + + Application + true + v145 + Unicode + + + Application + false + v145 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + stdcpplatest + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + stdcpplatest + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + stdcpplatest + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + stdcpplatest + + + Console + true + + + + + + + + {df572ffd-18c6-4b8d-8d35-4855f9a05376} + + + + + \ No newline at end of file diff --git a/2025/AdventHelpersTester/AdventHelpersTester.vcxproj.filters b/2025/Cpp/AdventHelpersTester/AdventHelpersTester.vcxproj.filters similarity index 97% rename from 2025/AdventHelpersTester/AdventHelpersTester.vcxproj.filters rename to 2025/Cpp/AdventHelpersTester/AdventHelpersTester.vcxproj.filters index 61fafaa..f5b0add 100644 --- a/2025/AdventHelpersTester/AdventHelpersTester.vcxproj.filters +++ b/2025/Cpp/AdventHelpersTester/AdventHelpersTester.vcxproj.filters @@ -1,22 +1,22 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + \ No newline at end of file diff --git a/2025/AdventOfCode.slnx b/2025/Cpp/AdventOfCode.slnx similarity index 97% rename from 2025/AdventOfCode.slnx rename to 2025/Cpp/AdventOfCode.slnx index f458e09..1f3aa7a 100644 --- a/2025/AdventOfCode.slnx +++ b/2025/Cpp/AdventOfCode.slnx @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + +