OpenCMISS-Zinc C++ API Documentation
Public Member Functions | Protected Attributes | List of all members
OpenCMISS::Zinc::Spectrummodule Class Reference

Module managing all spectrums. More...

#include <spectrum.hpp>

Public Member Functions

 Spectrummodule (cmzn_spectrummodule_id in_spectrummodule_id)
 
 Spectrummodule (const Spectrummodule &spectrummodule)
 
Spectrummoduleoperator= (const Spectrummodule &spectrummodule)
 
bool isValid () const
 
cmzn_spectrummodule_id getId () const
 
Spectrum createSpectrum ()
 
Spectrumiterator createSpectrumiterator ()
 
Spectrum findSpectrumByName (const char *name)
 
int beginChange ()
 
int endChange ()
 
Spectrum getDefaultSpectrum ()
 
int setDefaultSpectrum (const Spectrum &spectrum)
 
int readDescription (const char *description)
 
char * writeDescription ()
 
Spectrummodulenotifier createSpectrummodulenotifier ()
 

Protected Attributes

cmzn_spectrummodule_id id
 

Detailed Description

Module managing all spectrums.

Module managing all spectrums.

Member Function Documentation

int OpenCMISS::Zinc::Spectrummodule::beginChange ( )
inline

Begin caching or increment cache level for this spectrum module. Call this function before making multiple changes to minimise number of change messages sent to clients. Must remember to end_change after completing changes. Can be nested.

See also
Spectrummodule::endChange
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
Spectrum OpenCMISS::Zinc::Spectrummodule::createSpectrum ( )
inline

Create and return a new spectrum.

spectrum will belong to.

Returns
Handle to new spectrum, or NULL/invalid handle on failure.
Spectrumiterator OpenCMISS::Zinc::Spectrummodule::createSpectrumiterator ( )
inline

Create a spectrum iterator object for iterating through the spectrums in the spectrum module, in alphabetical order of name. The iterator initially points at the position before the first spectrum, so the first call to the iterator next() method returns the first spectrum and advances the iterator. The iterator becomes invalid if spectrums are added, removed or renamed while in use.

See also
Spectrumiterator::next

spectrums are to be iterated over.

Returns
Handle to spectrum iterator, or NULL/invalid handle on failure.
Spectrummodulenotifier OpenCMISS::Zinc::Spectrummodule::createSpectrummodulenotifier ( )
inline

Create a notifier for getting callbacks for changes to the spectrums in the spectrum module.

Returns
Handle to new spectrum module notifier, or NULL/invalid handle on failure.
int OpenCMISS::Zinc::Spectrummodule::endChange ( )
inline

Decrement cache level or end caching of changes for the spectrum module. Call spectrum module begin change method before making multiple changes and call this afterwards. When change level is restored to zero, cached change messages are sent out to clients.

See also
Spectrummodule::beginChange
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
Spectrum OpenCMISS::Zinc::Spectrummodule::findSpectrumByName ( const char *  name)
inline

Find the spectrum with the specified name, if any.

Parameters
nameThe name of the spectrum.
Returns
Handle to spectrum, or NULL/invalid handle if not found or failed.
Spectrum OpenCMISS::Zinc::Spectrummodule::getDefaultSpectrum ( )
inline

Get the default spectrum, if any. By default, a single component spectrum with COLOUR_MAPPING_TYPE_RAINBOW is returned.

See also
Spectrummodule::setDefaultSpectrum
Spectrumcomponent::ColourMappingType
Returns
Handle to default spectrum, or NULL/invalid handle if none or failed.
cmzn_spectrummodule_id OpenCMISS::Zinc::Spectrummodule::getId ( ) const
inline

Return the C handle of the Spectrummodule object.

Returns
C handle of Spectrummodule if this objects is valid, 0 otherwise.
bool OpenCMISS::Zinc::Spectrummodule::isValid ( ) const
inline

Check if this is a valid Spectrummodule object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Spectrummodule::readDescription ( const char *  description)
inline

Read the json description to the spectrum module. This will change the spectrums in the spectrum module.

The string containing json description

Returns
OpenCMISS::Zinc::OK on success, otherwise ERROR status.
int OpenCMISS::Zinc::Spectrummodule::setDefaultSpectrum ( const Spectrum spectrum)
inline

Set the default spectrum.

Parameters
spectrumThe spectrum to set as default.
Returns
OpenCMISS::Zinc::OK on success otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
char* OpenCMISS::Zinc::Spectrummodule::writeDescription ( )
inline

Write the json file describing the spectrums in the spectrum module, which can be used to store the current spectrum settings.

Returns
c string containing the json description of spectrum module, otherwise 0;

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