1 #ifndef __BINARY_FILE_H__
2 #define __BINARY_FILE_H__
31 #include "boost/shared_ptr.hpp"
51 READ_WRITE_TRUNCATE = 7
55 BinaryFile(
const AString& filename,
const OpenMode& fileMode = READ);
56 void open(
const AString& filename,
const OpenMode& opmode = READ);
58 AString getFilename()
const;
59 bool getOpenForRead();
60 bool getOpenForWrite();
61 void seek(
const int64_t& position);
63 void read(
void* dataOut,
const int64_t& count, int64_t* numRead = NULL);
64 void write(
const void* dataIn,
const int64_t& count);
71 virtual void open(
const AString& filename,
const OpenMode& opmode) = 0;
72 virtual void close() = 0;
73 const AString& getFilename()
const {
return m_fileName; }
74 virtual void seek(
const int64_t& position) = 0;
75 virtual int64_t pos() = 0;
76 virtual int64_t size() = 0;
77 virtual void read(
void* dataOut,
const int64_t& count, int64_t* numRead) = 0;
78 virtual void write(
const void* dataIn,
const int64_t& count) = 0;
82 boost::shared_ptr<ImplInterface> m_impl;
Definition: BinaryFile.h:67
Definition: BinaryFile.h:41
namespace for all CiftiLib functionality
Definition: CiftiBrainModelsMap.h:42