BARE2D
IOManager.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
#include <vector>
5
#include <fstream>
6
7
namespace
BARE2D
{
8
9
class
IOManager
10
{
11
public
:
12
/**
13
* @brief Loads a file into a buffer
14
* @param filepath The filepath to be read from
15
* @param buf The buffer to read to
16
* @return Returns false if there was a problem reading the file, true otherwise.
17
*/
18
template
<
typename
T>
19
static
bool
readFileToBuffer
(std::string& filepath, std::vector<T>& buf, std::ios_base::openmode mode = std::ios::binary);
20
21
22
23
static
bool
readFileToBuffer
(
const
char
* filepath, std::string& buf, std::ios_base::openmode mode = std::ios::binary);
24
25
// Other functions...
26
27
};
28
29
}
30
31
#include "
IOManager_impl.tcc
"
IOManager_impl.tcc
BARE2D
Definition:
App.cpp:13
BARE2D::IOManager
Definition:
IOManager.hpp:9
BARE2D::IOManager::readFileToBuffer
static bool readFileToBuffer(std::string &filepath, std::vector< T > &buf, std::ios_base::openmode mode=std::ios::binary)
Loads a file into a buffer.
Source
IOManager.hpp
Generated by
1.8.17