67 virtual int read(
void *buffer,
int size) = 0;
78 virtual char *
gets(
char *buffer,
int size) = 0;
89 virtual int read(
void *buffer,
int size);
91 virtual char *
gets(
char *buffer,
int size);
135 virtual int write(
const void *buffer,
int size) = 0;
144 virtual bool puts(
const char *s);
147 inline bool puts(
const std::string &s)
149 return puts(s.c_str());
181 const std::string &dfltPrefix = std::string(
""));
virtual bool puts(const char *s)
Write a string to the file (like fputs).
bool puts(const std::string &s)
Convenience method: just a 'puts(s.c_str())'.
virtual ~CoinFileOutput()
Destructor.
Base class for FileIO classes.
const char * getFileName() const
Return the name of the file used by this object.
CoinFileOutput(const std::string &fileName)
Constructor (don't use this, use the create method instead).
Abstract base class for file output classes.
Compression
The compression method.
virtual int write(const void *buffer, int size)=0
Write a block of data to the file, similar to fwrite.
static bool compressionSupported(Compression compression)
Returns whether the specified compression method is supported (i.e.
static CoinFileOutput * create(const std::string &fileName, Compression compression)
Factory method, that creates a CoinFileOutput (more precisely a subclass of it) for the file specifie...
~CoinFileIOBase()
Destructor.
std::string getReadType() const
Return the method of reading being used.