Restructure Storage Module -> Connection module
This commit is contained in:
parent
fa4d1d72dc
commit
e9dbee6667
24 changed files with 121 additions and 354 deletions
|
|
@ -10,7 +10,7 @@ file(GLOB SOURCES "./private/*.cpp")
|
|||
file(GLOB HEADERS "./public/*.hpp")
|
||||
add_library(${PROJECT_NAME} STATIC ${SOURCES} ${HEADERS})
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ./public/)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC Tokenizer Storage)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC Tokenizer Connection)
|
||||
|
||||
### -------------------------- Tests -------------------------- ###
|
||||
enable_testing()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
using namespace tp;
|
||||
|
||||
static ModuleManifest* sModuleDependencies[] = { &gModuleTokenizer, &gModuleStorage, nullptr };
|
||||
static ModuleManifest* sModuleDependencies[] = { &gModuleTokenizer, &gModuleConnection, nullptr };
|
||||
ModuleManifest tp::gModuleCommandLine = ModuleManifest("CommandLine", nullptr, nullptr, sModuleDependencies);
|
||||
|
||||
const char* regexSpace = "\n|\t| |\r";
|
||||
|
|
@ -219,7 +219,7 @@ alni CommandLine::getInt(const String& id) const { auto& arg = getArg(id, Arg::I
|
|||
alnf CommandLine::getFloat(const String& id) const { auto& arg = getArg(id, Arg::FLOAT); return arg.mFloat.mVal; }
|
||||
bool CommandLine::getBool(const String& id) const { auto& arg = getArg(id, Arg::BOOL); return arg.mBool.mFlag; }
|
||||
const String& CommandLine::getString(const String& id) const { auto& arg = getArg(id, Arg::STR); return arg.mStr.mStr; }
|
||||
const FileLocation& CommandLine::getFile(const String& id) const { auto& arg = getArg(id, Arg::FILE_IN); return arg.mFile.mFileLocation; }
|
||||
const LocalConnectionLocation& CommandLine::getFile(const String& id) const { auto& arg = getArg(id, Arg::FILE_IN); return arg.mFile.mFileLocation; }
|
||||
|
||||
|
||||
CommandLine::Arg& CommandLine::getArg(const String& id, Arg::Type type) {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "Tokenizer.hpp"
|
||||
#include "Map.hpp"
|
||||
#include "LocalStorage.hpp"
|
||||
#include "LocalConnection.hpp"
|
||||
#include "Tokenizer.hpp"
|
||||
|
||||
namespace tp {
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ namespace tp {
|
|||
};
|
||||
|
||||
struct FileInputArg {
|
||||
FileLocation mFileLocation;
|
||||
LocalConnectionLocation mFileLocation;
|
||||
};
|
||||
|
||||
struct Arg {
|
||||
|
|
@ -81,7 +81,7 @@ namespace tp {
|
|||
[[nodiscard]] alnf getFloat(const String& id) const;
|
||||
[[nodiscard]] bool getBool(const String& id) const;
|
||||
[[nodiscard]] const String& getString(const String& id) const;
|
||||
[[nodiscard]] const FileLocation& getFile(const String& id) const;
|
||||
[[nodiscard]] const LocalConnectionLocation& getFile(const String& id) const;
|
||||
|
||||
const CommandLine& operator=(const CommandLine&) = delete;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue