API Documentation
Loading...
Searching...
No Matches
BinaryFile Class Reference

Logic for reading or writing to a binary file including logic for. More...

#include <BinaryFile.h>

Collaboration diagram for BinaryFile:
[legend]

Public Member Functions

 BinaryFile (const File &file)
 
const Buffer< uint01, uint08 > & cachedData () const
 
void cachedOpen (bool read)
 
void close ()
 
BinaryCompressionObject createCompressionObject ()
 
uint08 fileSize () const
 
bool isFinished ()
 
void open (bool read, bool safe)
 
fltp04 percent ()
 
uint08 position ()
 
template<class t_type >
t_type read ()
 
template<class t_type , class t_index_type , class t_memory_allocator , class t_memory_manager >
void read (Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > &data)
 
template<class t_type , class t_index_type , class t_memory_allocator , class t_memory_manager >
std::enable_if< ObjectInfo< t_type >::Buffer >::type read (Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > &data, bool &allow_multithread)
 
template<class t_type , class t_index_type , class t_memory_allocator , class t_memory_manager >
std::enable_if<!ObjectInfo< t_type >::Buffer >::type read (Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > &data, bool &allow_multithread)
 
uint04 readData (char *string, uint04 max_size)
 
String readData (uint04 max_size)
 
template<class t_type , class t_index_type , class t_memory_allocator , class t_memory_manager >
void readNow (Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > &data)
 
uint04 readString (char *string, char terminator='\0')
 
void readString (String &string, char terminator='\0')
 
template<class t_index_type , class t_memory_allocator , class t_memory_manager >
void readStringBuffer (Buffer< String, t_index_type, t_memory_allocator, t_memory_manager > &data, bool &allow_multithread)
 
void readStringData (bool has_reference_table)
 
void seek (uint08 location)
 
void setUseLargeCompression (bool use_large_compression)
 
void uncompressAll ()
 
void uncompressSections (uint04 start, uint04 count)
 
template<class t_type , class t_index_type , class t_memory_allocator , class t_memory_manager >
std::enable_if<!ObjectInfo< t_type >::Buffer >::type write (const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > &data, CompressionMode compression_mode)
 
template<class t_type , class t_index_type , class t_memory_allocator , class t_memory_manager >
std::enable_if< ObjectInfo< t_type >::Buffer >::type write (const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > &data, CompressionMode compression_mode)
 
template<class t_type >
void write (const t_type &data)
 
void writeCompression (BinaryCompressionObject &compression_object)
 
void writeRawData (const String &data, uint04 size, char fill_space='\0')
 
void writeStringData (CompressionMode compression_mode)
 
 ~BinaryFile ()
 

Protected Attributes

fltp08 fltp_error = Constant<fltp08>::Invalid
 
uint08 m_cache_location = Constant<uint08>::Invalid
 
Buffer< uint01, uint08m_cached_data
 
Buffer< uint01, uint08m_compressed_data
 
Buffer< BinaryCompressionObjectm_compressions
 
File m_file
 
uint08 m_file_size = Constant<uint08>::Invalid
 
bool m_is_read = false
 
bool m_large_compression = false
 
bool m_multitreaded_compression = true
 
Dictionary< String, uint04m_string_reference
 
Buffer< Bounds< 1, uint04 > > m_string_size_info
 
String m_strings
 
bool m_using_cache = false
 

Detailed Description

Logic for reading or writing to a binary file including logic for.


compressing or decompressing the file

Constructor & Destructor Documentation

◆ BinaryFile()

BinaryFile ( const File & file)
inlineexplicit

◆ ~BinaryFile()

~BinaryFile ( )
inline

Member Function Documentation

◆ cachedData()

const Buffer< uint01, uint08 > & cachedData ( ) const
inline

◆ cachedOpen()

void cachedOpen ( bool read)
inline

◆ close()

void close ( )
inline

◆ createCompressionObject()

BinaryCompressionObject createCompressionObject ( )

◆ fileSize()

uint08 fileSize ( ) const
inline

◆ isFinished()

bool isFinished ( )

◆ open()

void open ( bool read,
bool safe )
inline

◆ percent()

fltp04 percent ( )
inline

◆ position()

uint08 position ( )
inline

◆ read() [1/4]

template<class t_type >
t_type read ( )
inline

◆ read() [2/4]

template<class t_type , class t_index_type , class t_memory_allocator , class t_memory_manager >
void read ( Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & data)
inline

◆ read() [3/4]

template<class t_type , class t_index_type , class t_memory_allocator , class t_memory_manager >
std::enable_if< ObjectInfo< t_type >::Buffer >::type read ( Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & data,
bool & allow_multithread )
inline

◆ read() [4/4]

template<class t_type , class t_index_type , class t_memory_allocator , class t_memory_manager >
std::enable_if<!ObjectInfo< t_type >::Buffer >::type read ( Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & data,
bool & allow_multithread )
inline

◆ readData() [1/2]

uint04 readData ( char * string,
uint04 max_size )
inline

◆ readData() [2/2]

String readData ( uint04 max_size)
inline

◆ readNow()

template<class t_type , class t_index_type , class t_memory_allocator , class t_memory_manager >
void readNow ( Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & data)
inline

◆ readString() [1/2]

uint04 readString ( char * string,
char terminator = '\0' )
inline

◆ readString() [2/2]

void readString ( String & string,
char terminator = '\0' )
inline

◆ readStringBuffer()

template<class t_index_type , class t_memory_allocator , class t_memory_manager >
void readStringBuffer ( Buffer< String, t_index_type, t_memory_allocator, t_memory_manager > & data,
bool & allow_multithread )
inline

◆ readStringData()

void readStringData ( bool has_reference_table)

◆ seek()

void seek ( uint08 location)
inline

◆ setUseLargeCompression()

void setUseLargeCompression ( bool use_large_compression)
inline

◆ uncompressAll()

void uncompressAll ( )

◆ uncompressSections()

void uncompressSections ( uint04 start,
uint04 count )

◆ write() [1/3]

template<class t_type , class t_index_type , class t_memory_allocator , class t_memory_manager >
std::enable_if<!ObjectInfo< t_type >::Buffer >::type write ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & data,
CompressionMode compression_mode )
inline

◆ write() [2/3]

template<class t_type , class t_index_type , class t_memory_allocator , class t_memory_manager >
std::enable_if< ObjectInfo< t_type >::Buffer >::type write ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & data,
CompressionMode compression_mode )
inline

◆ write() [3/3]

template<class t_type >
void write ( const t_type & data)
inline

◆ writeCompression()

void writeCompression ( BinaryCompressionObject & compression_object)

◆ writeRawData()

void writeRawData ( const String & data,
uint04 size,
char fill_space = '\0' )
inline

◆ writeStringData()

void writeStringData ( CompressionMode compression_mode)

Member Data Documentation

◆ fltp_error

fltp08 fltp_error = Constant<fltp08>::Invalid
protected

◆ m_cache_location

uint08 m_cache_location = Constant<uint08>::Invalid
protected

◆ m_cached_data

Buffer<uint01, uint08> m_cached_data
protected

◆ m_compressed_data

Buffer<uint01, uint08> m_compressed_data
protected

◆ m_compressions

Buffer<BinaryCompressionObject> m_compressions
protected

◆ m_file

File m_file
protected

◆ m_file_size

uint08 m_file_size = Constant<uint08>::Invalid
mutableprotected

◆ m_is_read

bool m_is_read = false
protected

◆ m_large_compression

bool m_large_compression = false
protected

◆ m_multitreaded_compression

bool m_multitreaded_compression = true
protected

◆ m_string_reference

Dictionary<String, uint04> m_string_reference
protected

◆ m_string_size_info

Buffer<Bounds<1, uint04> > m_string_size_info
protected

◆ m_strings

String m_strings
protected

◆ m_using_cache

bool m_using_cache = false
protected

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