#include <File.hpp>
|
| File () |
|
| File (const std::string &_filename) |
|
| File (const std::string &_mineType, std::vector< uint8_t > _data, int32_t _fileSize=-1) |
|
| File (const std::string &_mineType, int32_t _size) |
|
int32_t | getTheoricFileSize () const |
|
void | storeIn (const std::string &_filename) const |
|
const std::string & | getMineType () const |
|
void | setMineType (const std::string &_type) |
|
void | preSetDataSize (uint64_t _size) |
|
const std::vector< uint8_t > & | getData () const |
|
void | setData (uint64_t _offset, const std::vector< uint8_t > &_data) |
|
void | setData (uint64_t _offset, const uint8_t *_data, uint32_t _size) |
|
§ File() [1/4]
Contructor of an empty file.
§ File() [2/4]
zeus::File::File |
( |
const std::string & |
_filename | ) |
|
Contructor with the name of a file (load all data)
- Parameters
-
[in] | _filename | path of the file |
§ File() [3/4]
zeus::File::File |
( |
const std::string & |
_mineType, |
|
|
std::vector< uint8_t > |
_data, |
|
|
int32_t |
_fileSize = -1 |
|
) |
| |
Constructor of a typed file.
- Parameters
-
[in] | _mineType | mine type of the file |
[in] | _data | data of the file |
[in] | _fileSize | theoric file size |
§ File() [4/4]
zeus::File::File |
( |
const std::string & |
_mineType, |
|
|
int32_t |
_size |
|
) |
| |
Constructor of a typed file.
- Parameters
-
[in] | _mineType | mine type of the file |
[in] | _fileSize | preallocation size (data will be set after ...) |
§ getData()
const std::vector<uint8_t>& zeus::File::getData |
( |
| ) |
const |
|
inline |
get a rérérence of the data
- Returns
- requested data
§ getMineType()
const std::string& zeus::File::getMineType |
( |
| ) |
const |
|
inline |
Get the mine type of the file.
- Returns
- generic mine type
§ getTheoricFileSize()
int32_t zeus::File::getTheoricFileSize |
( |
| ) |
const |
|
inline |
get the théoric file size
- Returns
- size of the file
§ preSetDataSize()
void zeus::File::preSetDataSize |
( |
uint64_t |
_size | ) |
|
|
inline |
préallocate the data
- Parameters
-
[in] | _size | New size of the buffer |
§ setData() [1/2]
void zeus::File::setData |
( |
uint64_t |
_offset, |
|
|
const std::vector< uint8_t > & |
_data |
|
) |
| |
Set data on the buffer.
- Parameters
-
[in] | _offset | offset of the write data |
[in] | _data | data to write |
§ setData() [2/2]
void zeus::File::setData |
( |
uint64_t |
_offset, |
|
|
const uint8_t * |
_data, |
|
|
uint32_t |
_size |
|
) |
| |
Set data on the buffer.
- Parameters
-
[in] | _offset | offset of the write data |
[in] | _data | pointer on the data to write |
[in] | _size | Number of Octet to write |
§ setMineType()
void zeus::File::setMineType |
( |
const std::string & |
_type | ) |
|
|
inline |
Set the mine type of the file.
- Parameters
-
[in] | _type | New type of the file |
§ storeIn()
void zeus::File::storeIn |
( |
const std::string & |
_filename | ) |
const |
Store data in the specify file.
- Parameters
-
[in] | _filename | name of the file |
The documentation for this class was generated from the following file: