Isomet Modular Synthesiser (iMS) API  v1.4.2
iMS API
List of all members
iMS::UserFileReader Class Reference

Provides a mechanism for retrieving User File data from the Synthesiser FileSystem. More...

#include <include\FileSystem.h>

Public Member Functions

Constructor & Destructor
 UserFileReader (const IMSSystem &ims, const FileSystemIndex index)
 Constructor for UserFileReader Object. More...
 
 UserFileReader (const IMSSystem &ims, const std::string &FileName)
 Constructor for UserFileReader Object (referenced by File Name) More...
 
 ~UserFileReader ()
 UserFileReader destructor.
 
Readback Core Function
bool Readback (std::vector< std::uint8_t > &data)
 Retrieves User File data into a byte array. More...
 

Detailed Description

Provides a mechanism for retrieving User File data from the Synthesiser FileSystem.

Author
Dave Cowan
Date
2016-01-21
Since
1.1

Constructor & Destructor Documentation

iMS::UserFileReader::UserFileReader ( const IMSSystem ims,
const FileSystemIndex  index 
)

Constructor for UserFileReader Object.

The UserFileReader object requires an IMSSystem object, which will have had its FileSystemTable read back during initialisation. It must therefore exist before the UserFileReader object, and must remain valid (not destroyed) until the UserFileReader object itself is destroyed. The UserFileReader object is tied to a single FileSystemTableEntry and can only be used for reading back that object. If multiple files need to be read back, new UFRs should be created for each one.

Once constructed, the object can neither be copied or assigned to another instance.

Parameters
[in]imsA const reference to the iMS System whose FileSystemTable should be used for reading back data
[in]indexthe Entry in the FileSystemTable containing USER_DATA file data to readback
Since
1.1
iMS::UserFileReader::UserFileReader ( const IMSSystem ims,
const std::string &  FileName 
)

Constructor for UserFileReader Object (referenced by File Name)

Parameters
[in]imsA const reference to the iMS System whose FileSystemTable should be used for reading back data
[in]FileNamea string representing the name of the entry containing USER_DATA file data to readback
Since
1.1

Member Function Documentation

bool iMS::UserFileReader::Readback ( std::vector< std::uint8_t > &  data)

Retrieves User File data into a byte array.

Call this function to initiate readback of data from the Synthesiser FileSystem into a byte array allocated by the application

Parameters
[out]dataA reference to a vector to store the unformatted byte data representing the user file. Any existing contents are overwritten.
Returns
true if the operation was successful
Since
1.1

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