Split 2025 into lang

This commit is contained in:
Jose Caban
2025-11-30 21:34:14 -05:00
parent e9ac699e67
commit 353480c75c
10 changed files with 493 additions and 493 deletions

View File

@@ -0,0 +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;
};
}

View File

@@ -0,0 +1,35 @@
#pragma once
#include <vector>
#include <string>
namespace AdventHelper {
// Interface
class InputFileHelper {
public:
using LinesType = std::vector<std::string>;
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();
}
}