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

An editable policy. More...

Inheritance diagram for SYNCOLOR::Preferences:
SYNCOLOR::PolicyInterface

Public Types

typedef SharedPtr< PreferencesPtr
 A pointer to a Preferences instance with shared ownership type. The instance is automatically destroyed once no Ptr points to it. More...
 

Public Member Functions

virtual ~Preferences ()
 Destructor. More...
 
virtual SynStatus save () const =0
 Persists the Preferences. More...
 
virtual SynStatus saveAsPolicy (PolicyCollection &lib, const char *name) const =0
 Saves the Preferences as a 'Policy' with name 'name' in collection 'lib'. More...
 
virtual void setWorkingColourSpace (const char *cs)=0
 Sets the working colour space. More...
 
virtual void setRenderingColourSpace (const char *cs)=0
 Sets the rendering colour space. More...
 
virtual void setInputRulesFileName (const char *name)=0
 Sets the name of input rules file (always relative to the Preferences location, see 'create' above). More...
 
virtual void setViewingRulesFileName (const char *name)=0
 Sets the name of viewing rules file (always relative to the Preferences location, see 'create' above). More...
 
virtual void setUserColourSpacesDirectoryName (const char *name)=0
 Sets the name of colour space collection directory (always relative to the Preferences location, see 'create' above). More...
 
virtual void setUserVariable (const char *var, const char *value)=0
 Sets the value of an arbitrary variable 'var'. More...
 
- Public Member Functions inherited from SYNCOLOR::PolicyInterface
virtual ~PolicyInterface ()
 Destructor. More...
 
virtual const char * getPolicyName () const =0
 Get the name of the policy. More...
 
virtual const char * getWorkingColourSpace () const =0
 Get the working colour space. More...
 
virtual const char * getRenderingColourSpace () const =0
 Get the rendering colour space. More...
 
virtual URL::Ptr getInputRules () const =0
 Get the full path to the input rules file. More...
 
virtual URL::Ptr getViewingRules () const =0
 Get the full path to the viewing rules file. More...
 
virtual URL::Ptr getUserColourSpaces () const =0
 Get the full path to the user colour space collection. More...
 
virtual const char * getUserVariable (const char *var) const =0
 Get the value of an arbitrary variable. More...
 

Static Public Member Functions

static Ptr create (const URL::Ptr &dir)
 Creates Preferences at location 'dir'. More...
 
static SynStatus copy (const URL::Ptr &to, const Preferences &from, Ptr *copy)
 Copies 'from' at location 'to'. The new Preferences object is returned to caller via optional 'copy'. Pass null for 'copy' if not interested. More...
 
static SynStatus replace (const URL::Ptr &to, const Preferences &from, Ptr *copy)
 Like 'copy' but any existing Preferences at 'to' is lost. More...
 
- Static Public Member Functions inherited from SYNCOLOR::PolicyInterface
static const char * policyFile ()
 Gets the standard name of the policy file in which variables are stored. More...
 

Private Member Functions

virtual SynStatus assign (const Preferences &r, bool replace)=0
 

Detailed Description

An editable policy.

Member Typedef Documentation

A pointer to a Preferences instance with shared ownership type. The instance is automatically destroyed once no Ptr points to it.

Constructor & Destructor Documentation

virtual SYNCOLOR::Preferences::~Preferences ( )
virtual

Destructor.

Releases all resources used by the Preferences instance.

Member Function Documentation

static Ptr SYNCOLOR::Preferences::create ( const URL::Ptr dir)
static

Creates Preferences at location 'dir'.

Parameters
dirThe storage location of the created Preferences instance.
Returns
A shared pointer to a Preferences instance. Always succeeds if enough memory is available. Loads existing preferences at 'dir' when possible.
static SynStatus SYNCOLOR::Preferences::copy ( const URL::Ptr to,
const Preferences from,
Ptr copy 
)
static

Copies 'from' at location 'to'. The new Preferences object is returned to caller via optional 'copy'. Pass null for 'copy' if not interested.

Parameters
toThe target location for the copy
fromThe Preferences instance to copy
copyAn optional Ptr to hold the resulting Preferences copy. Can be null.
Returns
A SynStatus. Check the error code to determine if an error occurred.
static SynStatus SYNCOLOR::Preferences::replace ( const URL::Ptr to,
const Preferences from,
Ptr copy 
)
static

Like 'copy' but any existing Preferences at 'to' is lost.

Parameters
toThe target location for the copy
fromThe Preferences instance to copy
copyAn optional Ptr to hold the resulting Preferences copy. Can be null.
Returns
A SynStatus. Check the error code to determine if an error occurred.
virtual SynStatus SYNCOLOR::Preferences::save ( ) const
pure virtual

Persists the Preferences.

Returns
A SynStatus. Check the error code to determine if an error occurred.
virtual SynStatus SYNCOLOR::Preferences::saveAsPolicy ( PolicyCollection lib,
const char *  name 
) const
pure virtual

Saves the Preferences as a 'Policy' with name 'name' in collection 'lib'.

Parameters
libThe PolicyCollection in which to add the new Policy.
nameThe name to assign to the new Policy.
Returns
A SynStatus. Check the error code to determine if an error occurred.
virtual void SYNCOLOR::Preferences::setWorkingColourSpace ( const char *  cs)
pure virtual

Sets the working colour space.

Parameters
csThe unique(short) colour space name.
virtual void SYNCOLOR::Preferences::setRenderingColourSpace ( const char *  cs)
pure virtual

Sets the rendering colour space.

Parameters
csThe unique(short) colour space name.
virtual void SYNCOLOR::Preferences::setInputRulesFileName ( const char *  name)
pure virtual

Sets the name of input rules file (always relative to the Preferences location, see 'create' above).

Parameters
nameThe name of the input rules file.
virtual void SYNCOLOR::Preferences::setViewingRulesFileName ( const char *  name)
pure virtual

Sets the name of viewing rules file (always relative to the Preferences location, see 'create' above).

Parameters
nameThe name of the viewing rules file.
virtual void SYNCOLOR::Preferences::setUserColourSpacesDirectoryName ( const char *  name)
pure virtual

Sets the name of colour space collection directory (always relative to the Preferences location, see 'create' above).

Parameters
nameThe name of the user colour space collection directory.
virtual void SYNCOLOR::Preferences::setUserVariable ( const char *  var,
const char *  value 
)
pure virtual

Sets the value of an arbitrary variable 'var'.

Parameters
varThe name of the variable.
valueThe value of the variable.