33 lines
827 B
C++
33 lines
827 B
C++
#ifndef FileManager_H
|
|
#define FileManager_H
|
|
|
|
#include <Arduino.h>
|
|
#include "FS.h"
|
|
#include <LittleFS.h>
|
|
#include <GunProfile.h>
|
|
#include <ProjectileProfile.h>
|
|
#include <LinkedList.h>
|
|
|
|
class FileManager {
|
|
public:
|
|
static FileManager& getInstance();
|
|
|
|
void init();
|
|
void formatDisk();
|
|
void saveGunProfile(GunProfile& profile);
|
|
void removeGunProfile(GunProfile& profile);
|
|
void removeAllGunProfiles();
|
|
void loadGunProfiles(LinkedList<GunProfile>& profiles);
|
|
void saveProjectileProfile(ProjectileProfile& profile);
|
|
void removeProjectileProfile(ProjectileProfile& profile);
|
|
void loadProjectileProfiles(LinkedList<ProjectileProfile>& profiles);
|
|
|
|
|
|
private:
|
|
FileManager();
|
|
FileManager(const FileManager&) = delete;
|
|
FileManager& operator=(const FileManager&) = delete;
|
|
|
|
};
|
|
|
|
#endif |