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

The base class for rule containers that contain all the rules, and the capabilities to manage them. More...

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

Public Member Functions

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...
 

Detailed Description

The base class for rule containers that contain all the rules, and the capabilities to manage them.

Member Function Documentation

virtual SynStatus SYNCOLOR::Rules::restoreDefaults ( )
pure virtual

Restore the default rules.

Returns
The status of the request. Check the error code to determine if an error occurred. See SYNCOLOR::SynStatus above.
virtual SynStatus SYNCOLOR::Rules::load ( )
pure virtual

Load rules from preferences.

Returns
returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred. See SYNCOLOR::SynStatus above.
virtual SynStatus SYNCOLOR::Rules::save ( ) const
pure virtual

Save the rules in the preferences.

Returns
returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred. See SYNCOLOR::SynStatus above.
virtual unsigned int SYNCOLOR::Rules::getNumRules ( ) const
pure virtual

Get the number of rules.

Returns
The number of rules
virtual SynStatus SYNCOLOR::Rules::getRule ( unsigned int  position,
RulePtr rule 
) const
pure virtual

Get a specific rule using its position.

Parameters
positionThe position of the rule to get
ruleThe rule found
Returns
returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred. See SYNCOLOR::SynStatus above.
virtual SynStatus SYNCOLOR::Rules::getRule ( const char *  name,
RulePtr rule 
) const
pure virtual

Get a specific rule using its name.

Parameters
nameThe name of the rule
ruleThe rule found
Returns
returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred. See SYNCOLOR::SynStatus above.
virtual SynStatus SYNCOLOR::Rules::moveRule ( const char *  name,
int  offset 
)
pure virtual

Move a rule to a new position.

Parameters
nameThe name of the rule to move
offsetThe offset to be applied to the current rule position
Returns
returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred. See SYNCOLOR::SynStatus above.
virtual SynStatus SYNCOLOR::Rules::removeRule ( const char *  name)
pure virtual

Remove a rule using its name.

Parameters
nameThe name of the rule
Returns
returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred. See SYNCOLOR::SynStatus above.
virtual SynStatus SYNCOLOR::Rules::serialize ( RuleWriter writer) const
pure virtual

Serialize the rule container in XML.

Parameters
writerThe writer to receive the ASCII string containing XML formatting
Returns
returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred. See SYNCOLOR::SynStatus above.
virtual SynStatus SYNCOLOR::Rules::populate ( const char *  data,
unsigned int  length 
)
pure virtual

Populate the rule container.

Parameters
dataThe XML string
lengthThe length of the string
Returns
returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred. See SYNCOLOR::SynStatus above.