11 #ifndef BSCRIPT_BOBJECT_H 12 #include "../bscript/bobject.h" 18 #include "../clib/compilerspecifics.h" 19 #include "../clib/rawtypes.h" 37 BinFile(
const std::string& filename, std::ios::openmode mode );
42 bool Open(
const std::string& filename, std::ios::openmode mode );
48 return ReadBuffer( &val,
sizeof( T ) );
52 bool Read( T* arr,
size_t count )
54 return ReadBuffer( arr,
sizeof( T ) * count );
60 return WriteBuffer( &val,
sizeof( T ) );
63 bool WriteString(
const char* chr,
unsigned len );
64 bool Seek( std::fstream::pos_type abs_offset, std::ios::seekdir origin );
66 std::fstream::pos_type Tell();
73 bool ReadBuffer(
void*
buffer, std::streamsize length );
74 bool WriteBuffer(
void* buffer, std::streamsize length );
83 BBinaryfile( std::string filename,
unsigned short mode,
bool _bigendian );
94 virtual const char*
typeOf() const POL_OVERRIDE {
return "BinaryFile"; }
95 virtual u8 typeOfInt() const POL_OVERRIDE {
return OTBinaryFile; }
virtual u8 typeOfInt() const POL_OVERRIDE
bool operator==(T *ptr, const ref_ptr< T > &rptr)
bool Read(T *arr, size_t count)
std::ios::openmode openmode
virtual const char * typeOf() const POL_OVERRIDE