Split 2025 into lang
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user