-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
193 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,47 @@ | ||
#pragma once | ||
#include <filesystem> | ||
#include <fstream> | ||
#include <filesystem> | ||
#include <vector> | ||
|
||
//############################################## Data ##############################################// | ||
|
||
class Data | ||
namespace Data | ||
{ | ||
public: | ||
std::string* Content; | ||
std::filesystem::path Path; | ||
int Size = 0; | ||
//############################################## Array Format ##############################################// | ||
class Array { | ||
public: | ||
std::string* Content; | ||
std::filesystem::path Path; | ||
int Size = 0; | ||
|
||
public: | ||
Array(const std::string FilePath = "Data/", const int FileSize = 0); | ||
std::vector<std::filesystem::path> List(); | ||
void Read(const std::string FileName); | ||
void Save(const std::string FileName); | ||
void Remove(const std::string FileName); | ||
bool Exist(const std::string FileName); | ||
~Array(); | ||
}; | ||
|
||
//############################################## Vector Format ##############################################// | ||
|
||
class Vector { | ||
public: | ||
std::vector<std::string> Content; | ||
std::filesystem::path Path; | ||
|
||
public: | ||
Data(const int FileSize, const std::string FileName, const std::string FilePath = "Data/"); | ||
void Save(); | ||
void Add(const int Slot, const std::string Element); | ||
bool Exist(); | ||
~Data(); | ||
public: | ||
Vector(const std::string FilePath = "Data/", const int FileSize = 0); | ||
std::vector<std::filesystem::path> List(); | ||
void Read(const std::string FileName); | ||
void Save(const std::string FileName); | ||
std::string Get(const int Slot); | ||
void Add(const std::string Element); | ||
void Change(const int Slot, const std::string Element); | ||
void Clear(); | ||
void Remove(const std::string FileName); | ||
bool Exist(const std::string FileName); | ||
}; | ||
|
||
}; |