Synergy Color Management Component - SDK -  2018.0.80
SYNCOLOR::ViewingRules Class Referenceabstract

The class contains all the viewing rules, and the capabilities to manage them. More...

Inheritance diagram for SYNCOLOR::ViewingRules:
SYNCOLOR::Rules

Public Types

typedef SynStatus(* ViewTransformCallback )(const SYNCOLOR::RulePtr &rulePtr)
 Callback function to obtain the list of evaluated view transforms. More...
 

Public Member Functions

virtual SYNCOLOR::SynStatus evaluate (const char *colorSpace, const char *display, ViewTransformCallback cb) const =0
 Evaluate the colour space and display to find the associated view transform. More...
 
- Public Member Functions inherited from SYNCOLOR::Rules
virtual SynStatus restoreDefaults ()=0
 Restore the default rules. More...
 
virtual SynStatus load ()=0
 Load rules from preferences. More...
 
virtual SynStatus save () const =0
 Save the rules in the preferences. More...
 
virtual unsigned int getNumRules () const =0
 Get the number of rules. More...
 
virtual SynStatus getRule (unsigned int position, RulePtr &rule) const =0
 Get a specific rule using its position. More...
 
virtual SynStatus getRule (const char *name, RulePtr &rule) const =0
 Get a specific rule using its name. More...
 
virtual SynStatus moveRule (const char *name, int offset)=0
 Move a rule to a new position. More...
 
virtual SynStatus removeRule (const char *name)=0
 Remove a rule using its name. More...
 
virtual SynStatus serialize (RuleWriter &writer) const =0
 Serialize the rule container in XML. More...
 
virtual SynStatus populate (const char *data, unsigned int length)=0
 Populate the rule container. More...
 

Static Public Member Functions

static ViewingRulesinstance ()
 Get the current container. More...
 

Protected Member Functions

virtual ~ViewingRules ()
 Default destructor. More...
 

Detailed Description

The class contains all the viewing rules, and the capabilities to manage them.

Member Typedef Documentation

typedef SynStatus(* SYNCOLOR::ViewingRules::ViewTransformCallback)(const SYNCOLOR::RulePtr &rulePtr)

Callback function to obtain the list of evaluated view transforms.

This callback is called once per valid view transform.

Parameters
nameView transform name.

Constructor & Destructor Documentation

virtual SYNCOLOR::ViewingRules::~ViewingRules ( )
inlineprotectedvirtual

Default destructor.

Member Function Documentation

static ViewingRules& SYNCOLOR::ViewingRules::instance ( )
static

Get the current container.

Returns
the container instance
virtual SYNCOLOR::SynStatus SYNCOLOR::ViewingRules::evaluate ( const char *  colorSpace,
const char *  display,
ViewTransformCallback  cb 
) const
pure virtual

Evaluate the colour space and display to find the associated view transform.

Parameters
colorSpaceThe color space to be used in the evaluation. This specifies a single colour space.
displayThe display to be used in the evaluation. This specifies a single display.
cbThe callback used to send evaluated view transforms to the client
Returns
returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred. See SYNCOLOR::SynStatus above.