zeus::File Class Reference

#include <File.hpp>

Public Member Functions

 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)
 

Detailed Description

File inetrface.

Constructor & Destructor Documentation

§ File() [1/4]

zeus::File::File ( )

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]_filenamepath 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]_mineTypemine type of the file
[in]_datadata of the file
[in]_fileSizetheoric file size

§ File() [4/4]

zeus::File::File ( const std::string &  _mineType,
int32_t  _size 
)

Constructor of a typed file.

Parameters
[in]_mineTypemine type of the file
[in]_fileSizepreallocation size (data will be set after ...)

Member Function Documentation

§ 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]_sizeNew 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]_offsetoffset of the write data
[in]_datadata 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]_offsetoffset of the write data
[in]_datapointer on the data to write
[in]_sizeNumber of Octet to write

§ setMineType()

void zeus::File::setMineType ( const std::string &  _type)
inline

Set the mine type of the file.

Parameters
[in]_typeNew type of the file

§ storeIn()

void zeus::File::storeIn ( const std::string &  _filename) const

Store data in the specify file.

Parameters
[in]_filenamename of the file

The documentation for this class was generated from the following file:
  • framework/atria-soft/zeus/zeus/File.hpp