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

Provides a mechanism for viewing the ImageTable associated with an iMS System. More...

#include <include\ImageOps.h>

Public Member Functions

Constructor
 ImageTableViewer (const IMSSystem &ims)
 Constructor for ImageTableViewer Object. More...
 
Image Table Information
const int Entries () const
 
Array operator for random access to ImageTableEntry s
const ImageTableEntry operator[] (const std::size_t idx) const
 The ImageTable consists of a container of ImageTableEntry objects. Each object may be accessed by calling the viewer object through an array subscript. More...
 

Friends

LIBSPEC std::ostream & operator<< (std::ostream &stream, const ImageTableViewer &)
 Stream operator overload to simplify debugging. More...
 

Detailed Description

Provides a mechanism for viewing the ImageTable associated with an iMS System.

Author
Dave Cowan
Date
2016-01-21
Since
1.1

Constructor & Destructor Documentation

iMS::ImageTableViewer::ImageTableViewer ( const IMSSystem ims)
inline

Constructor for ImageTableViewer Object.

The ImageTableViewer object requires an IMSSystem object, which will have had its ImageTable read back during initialisation. It must therefore exist before the ImageTableViewer object, and must remain valid (not destroyed) until the ImageTableViewer object itself is destroyed.

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

Parameters
[in]imsA const reference to the iMS System whose ImageTable is to be viewed.
Since
1.2

Member Function Documentation

const int iMS::ImageTableViewer::Entries ( ) const
Returns
The current number of entries stored in the ImageTable
Since
1.2
const ImageTableEntry iMS::ImageTableViewer::operator[] ( const std::size_t  idx) const

The ImageTable consists of a container of ImageTableEntry objects. Each object may be accessed by calling the viewer object through an array subscript.

For example:

ImageTableViewer itv(myiMS);
int length = 0;
for (int i=0; i<itv.Entries(); i++) {
length += itv[i].Size();
}
std::cout << "Used space in Image Memory: " << length << " bytes" << std::endl;
Since
1.1

Friends And Related Function Documentation

LIBSPEC std::ostream& operator<< ( std::ostream &  stream,
const ImageTableViewer  
)
friend

Stream operator overload to simplify debugging.

Example usage:

ImageTableViewer itv(myiMS);
if (itv.Entries() > 0) std::cout << itv;

might produce the result:

Image[0] id : 0 Addr : 0x00400000 Points : 10001 ByteLength : 440044 Format Code : 0 UUID : b31bdf48 - 0902 - 4277 - 86e1 - a6f0756a6acb
Image[1] id : 1 Addr : 0x0046b6f0 Points : 08501 ByteLength : 374044 Format Code : 0 UUID : 5e03d558 - 46e8 - 49c4 - 80cf - d32fb51d8628
Image[2] id : 2 Addr : 0x004c6c10 Points : 12461 ByteLength : 548284 Format Code : 0 UUID : 7358b86c - 0e90 - 4664 - 8b2b - ee0ba24542da

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