AuxPort 0.2
Modules for Audio Software Development
Loading...
Searching...
No Matches
AuxPort::BinaryFile Class Reference

This class provides an interface for working with binary files. More...

#include <AuxFile.h>

Inheritance diagram for AuxPort::BinaryFile:
AuxPort::File AuxPort::ILog

Public Member Functions

 BinaryFile (const BinaryFile &binaryFile)=default
 
bool open (const std::string &fileName, const Mode &mode=Mode::Read, bool log=false) override
 Opens the given file as a binary file.
 
bool close (bool log=false) override
 Closes current binary file stream.
 
- Public Member Functions inherited from AuxPort::File
 File (const File &file)=default
 
std::string getCurrentDirectory ()
 Returns the current directory, the program is running in.
 
std::vector< std::string > & getListOfFiles (const std::string &extension="")
 Returns list of files present in the current directory.
 
void Log () override
 Override this function to specify logging behavior.
 

Additional Inherited Members

- Public Types inherited from AuxPort::File
enum  Mode { Idle = 0 , Read = 1 , Write = 2 }
 Easy way to specify the Read/Write behavior of the File Stream. More...
 
- Protected Member Functions inherited from AuxPort::ILog
void setColour (const ColourType &colourType)
 This function allows you to set text colour for the text to be printed onto the console.
 
- Protected Attributes inherited from AuxPort::File
std::unique_ptr< std::ofstream > fileWriter
 
std::unique_ptr< std::ifstream > fileReader
 
std::string fileName
 
std::string fileExtension
 
std::string errorMessage
 
Mode mode
 

Detailed Description

This class provides an interface for working with binary files.

Definition at line 284 of file AuxFile.h.

Member Function Documentation

◆ close()

bool AuxPort::BinaryFile::close ( bool log = false)
overridevirtual

Closes current binary file stream.

Implements AuxPort::File.

Definition at line 234 of file AuxFile.cpp.

◆ open()

bool AuxPort::BinaryFile::open ( const std::string & fileName,
const Mode & mode = Mode::Read,
bool log = false )
overridevirtual

Opens the given file as a binary file.

Implements AuxPort::File.

Definition at line 229 of file AuxFile.cpp.


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