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

#include <BinaryFile.h>

Collaboration diagram for BinaryFile:
[legend]

Public Member Functions

 BinaryFile (const File &file)
 
 ~BinaryFile ()
 
void open (bool read, bool safe)
 
void cachedOpen (bool read)
 
void close ()
 
const Buffer< uint01, uint08 > & cachedData () const
 
template<class t_type >
void write (const t_type &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 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)
 
void writeRawData (const String &data, uint04 size, char fill_space='\0')
 
template<class t_type >
t_type read ()
 
void readString (String &string, char terminator='\0')
 
uint04 readString (char *string, char terminator='\0')
 
String readData (uint04 max_size)
 
uint04 readData (char *string, uint04 max_size)
 
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 >
void readNow (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_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)
 
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)
 
uint08 position ()
 
fltp04 percent ()
 
void seek (uint08 location)
 
BinaryCompressionObject createCompressionObject ()
 
void setUseLargeCompression (bool use_large_compression)
 
bool isFinished ()
 
void writeCompression (BinaryCompressionObject &compression_object)
 
void writeStringData (CompressionMode compression_mode)
 
void readStringData (bool has_reference_table)
 
void uncompressAll ()
 
void uncompressSections (uint04 start, uint04 count)
 
uint08 fileSize () const
 

Protected Attributes

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

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>::NaN
protected

◆ m_cache_location

uint08 m_cache_location = Constant<uint08>::NaN
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>::NaN
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 files: