Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::IO::FileManager< DATA, Binary > Class Template Referenceabstract

#include <IO/deprecated/FileManager.hpp>

+ Inheritance diagram for Ra::IO::FileManager< DATA, Binary >:
+ Collaboration diagram for Ra::IO::FileManager< DATA, Binary >:

Public Types

enum  LogEntryType { LogEntry_Normal , LogEntry_Warning , LogEntry_Error }
 ENUM. More...
 

Public Member Functions

 FileManager ()=default
 CONSTRUCTOR.
 
virtual ~FileManager ()=default
 DESTRUCTOR.
 
bool load (const std::string &filename, DATA &data, const bool SAVE_LOG_FILE=false)
 INTERFACE.
 
bool save (const std::string &filename, const DATA &data, const bool SAVE_LOG_FILE=false)
 
std::string log () const
 LOG.
 

Protected Member Functions

void addLogEntry (const std::string &text)
 LOG.
 
void addLogWarningEntry (const std::string &text)
 
void addLogErrorEntry (const std::string &text)
 
void addLogEntry (const std::string &text, const LogEntryType type)
 
virtual std::string fileExtension () const =0
 INTERFACE.
 
virtual bool importData (std::istream &file, DATA &data)=0
 
virtual bool exportData (std::ostream &file, const DATA &data)=0
 

Detailed Description

template<typename DATA, bool Binary = false>
class Ra::IO::FileManager< DATA, Binary >

The class FileManager gives the base common interface for handling loading/storing data from/to files.

Warning
will be removed once integration of file saving is done in new IO, see https://github.com/STORM-IRIT/Radium-Engine/issues/362
Todo
reimplement in IO
Deprecated
see https://github.com/STORM-IRIT/Radium-Engine/issues/362

Definition at line 18 of file FileManager.hpp.

Member Enumeration Documentation

◆ LogEntryType

template<typename DATA , bool Binary = false>
enum Ra::IO::FileManager::LogEntryType

ENUM.

Definition at line 22 of file FileManager.hpp.

Member Function Documentation

◆ addLogEntry() [1/2]

template<typename DATA , bool Binary>
void Ra::IO::FileManager< DATA, Binary >::addLogEntry ( const std::string & text)
inlineprotected

LOG.

Definition at line 151 of file FileManager.hpp.

◆ addLogEntry() [2/2]

template<typename DATA , bool Binary>
void Ra::IO::FileManager< DATA, Binary >::addLogEntry ( const std::string & text,
const LogEntryType type )
inlineprotected

Definition at line 166 of file FileManager.hpp.

◆ addLogErrorEntry()

template<typename DATA , bool Binary>
void Ra::IO::FileManager< DATA, Binary >::addLogErrorEntry ( const std::string & text)
inlineprotected

Definition at line 161 of file FileManager.hpp.

◆ addLogWarningEntry()

template<typename DATA , bool Binary>
void Ra::IO::FileManager< DATA, Binary >::addLogWarningEntry ( const std::string & text)
inlineprotected

Definition at line 156 of file FileManager.hpp.

◆ fileExtension()

template<typename DATA , bool Binary = false>
virtual std::string Ra::IO::FileManager< DATA, Binary >::fileExtension ( ) const
protectedpure virtual

INTERFACE.

Implemented in Ra::IO::OBJFileManager, and Ra::IO::OFFFileManager.

◆ load()

template<typename DATA , bool Binary>
bool Ra::IO::FileManager< DATA, Binary >::load ( const std::string & filename,
DATA & data,
const bool SAVE_LOG_FILE = false )
inline

INTERFACE.

Definition at line 78 of file FileManager.hpp.

+ Here is the call graph for this function:

◆ log()

template<typename DATA , bool Binary>
std::string Ra::IO::FileManager< DATA, Binary >::log ( ) const
inline

LOG.

Definition at line 146 of file FileManager.hpp.

◆ save()

template<typename DATA , bool Binary>
bool Ra::IO::FileManager< DATA, Binary >::save ( const std::string & filename,
const DATA & data,
const bool SAVE_LOG_FILE = false )
inline

Definition at line 113 of file FileManager.hpp.


The documentation for this class was generated from the following file: