All Frameworks Class Hierarchy This Framework Previous Next Indexes
System Class CATSysSettingController
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---System.CATEventSubscriber
|
+---CATSysSettingController
Usage: you can derive this class.
public class CATSysSettingController
Adapter class to implement setting controller C++ interfaces.
Role: CATSysSettingController should be derived by a data extension
class which is part of your setting controller component to help implement
two interfaces:
- CATISysSettingController
- Your setting controller interface
Commit
Rollback
ResetToAdminValues
SaveRepository
You usually should not re-implement these methods, except if you create
a bufferized setting controller. Refer to the CAA Encyclopedia to know
about such controllers.
CATSysSettingController also offers you a couple of ReadAttr/WriteAttr
methods
that encapsulates the access to the setting repository for each setting attribute supported type:
- A pointer to, or a table of pointers to
CATBaseUnknown
- A pointer to, or a table of pointers to
CATString
- A pointer to, or a table of pointers to
CATUnicodeString
- A table of pointers to simple types: char, double, float, int, short, and unsigned int
Use these methods when implementing your setting controller interface.
CATSysSettingController offers some other methods to implement
-
Initialize
Re-implemement it with bufferized setting controller only
-
GetInfo
Use it to implement the GetXxxInfo
methods of your setting controller
-
Lock and
Unlock
Use them to implement the SetXxxLock
methods of your setting controller
CATSysSettingController defines events you can use to warn subscriber that either:
- The setting repository managed by the setting controller is updated:
the SettingCtrl_Updated event is automatically sent
- A given setting attribute is updated:
use the Param_Updated to send such event for the appopriate setting attribute.
- See also:
- CATSettingRepository, CATISysSettingController
Constructor and Destructor Index
- o
CATSysSettingController(char*)
- Constructs an empty setting controller.
- o
~CATSysSettingController()
-
Method Index
- o
CATDeclareCBEvent(Param_Updated)
- Declares the Param_Updated event for an attribute update in the setting repository managed by the setting controller.
- o
CATDeclareCBEvent(SettingCtrl_Updated)
- Declares the SettingCtrl_Updated event for a global update of the setting
repository managed by the setting controller.
- o
Commit(int)
- Makes a memory copy of the setting attribute values.
- o
GetInfo(char*,CATSettingInfo*,int)
- Retrieves information associated with a given setting attribute.
- o
Initialize()
- Initializes the setting controller.
- o
Lock(char*)
- Locks a given setting attribute.
- o
MapLevel(CATSettingInfo&,CATUnicodeString&)
- Returns the Administration Level.
- o
MapLock(CATSettingInfo&,CATUnicodeString&)
- Returns the locking state.
- o
MapLock(char)
- Returns the locking state.
- o
NextAttribute(char*,char*,CATLONG32*,short)
- Browses the setting.
- o
ReadAttr(char*,CATBaseUnknown*)
- Retrieves the value of a setting attribute made up of a pointer to
CATBaseUnknown.
- o
ReadAttr(char*,CATBaseUnknown**,CATLONG32)
- Retrieves the value of a setting attribute made up of an array of pointers to CATBaseUnknown.
- o
ReadAttr(char*,CATString*)
- Retrieves the value of a setting attribute made up of a pointer to CATString.
- o
ReadAttr(char*,CATString**,CATLONG32)
- Retrieves the value of a setting attribute made up of an array of pointers to CATString.
- o
ReadAttr(char*,CATUnicodeString*)
- Retrieves the value of a setting attribute made up of a pointer to CATUnicodeString.
- o
ReadAttr(char*,CATUnicodeString**,CATLONG32)
- Retrieves the value of a setting attribute made up of an array of pointers to CATUnicodeString.
- o
ReadAttr(char*,char*,CATLONG32)
- Retrieves the value of a setting attribute made up of an array of chars.
- o
ReadAttr(char*,double*,CATLONG32)
- Retrieves the value of a setting attribute made up of an array of doubles.
- o
ReadAttr(char*,float*,CATLONG32)
- Retrieves the value of a setting attribute made up of an array of floats.
- o
ReadAttr(char*,int*,CATLONG32)
- Retrieves the value of a setting attribute made up of an array of ints.
- o
ReadAttr(char*,short*,CATLONG32)
- Retrieves the value of a setting attribute made up of an array of shorts.
- o
ReadAttr(char*,unsigned int*,CATLONG32)
- Retrieves the value of a setting attribute made up of an array of unsigned ints.
- o
ResetToAdminValues(char**,int)
- Restores the administrated values of the attributes.
- o
Rollback()
- Restores the last memory copy of the setting attribute values.
- o
SaveRepository(char*)
- Makes a persistent copy of the setting attribute values on file.
- o
Unlock(char*)
- Unlocks a given setting attribute.
- o
WriteAttr(char*,CATBaseUnknown*)
- Sets the value of a setting attribute made up of a pointer to CATBaseUnknown.
- o
WriteAttr(char*,CATBaseUnknown**,CATLONG32)
- Sets the value of a setting attribute made up of an array of pointers to CATBaseUnknown.
- o
WriteAttr(char*,CATString*)
- Sets the value of a setting attribute made up of a pointer to CATString.
- o
WriteAttr(char*,CATString**,CATLONG32)
- Sets the value of a setting attribute which is an array of CATString.
- o
WriteAttr(char*,CATUnicodeString*)
- Sets the value of a setting attribute made up of a pointer to
CATUnicodeString.
- o
WriteAttr(char*,CATUnicodeString**,CATLONG32)
- Sets the value of a setting attribute made up of an array of pointers to CATUnicodeString.
- o
WriteAttr(char*,char*,CATLONG32)
- Sets the value of a setting attribute made up of an array of chars.
- o
WriteAttr(char*,double*,CATLONG32)
- Sets the value of a setting attribute made up of an array of doubles.
- o
WriteAttr(char*,float*,CATLONG32)
- Sets the value of a setting attribute made up of an array of floats.
- o
WriteAttr(char*,int*,CATLONG32)
- Sets the value of a setting attribute made up of an array of ints.
- o
WriteAttr(char*,short*,CATLONG32)
- Sets the value of a setting attribute made up of an array of shorts.
- o
WriteAttr(char*,unsigned int*,CATLONG32)
- Sets the value of a setting attribute made up of an array of unsigned ints.
Constructor and Destructor
o CATSysSettingController
protected CATSysSettingController( | const char* | iSettingName) |
-
Constructs an empty setting controller.
- Parameters:
-
- iSettingName
- [in] The name of the setting repository that the setting controller is intended
to handle
o ~CATSysSettingController
public virtual ~CATSysSettingController( | ) |
-
Methods
o CATDeclareCBEvent
public CATDeclareCBEvent( | Param_Updated | ) |
-
Declares the Param_Updated event for an attribute update in the setting repository managed by the setting controller.
Role: A setting attribute update happens whenever the Set method
that deals with this attribute is called. This is not automatic. You need to
dispatch this event in that Set method
if you want to warn subscribers that this parameter is updated.
o CATDeclareCBEvent
public CATDeclareCBEvent( | SettingCtrl_Updated | ) |
-
Declares the SettingCtrl_Updated event for a global update of the setting
repository managed by the setting controller.
Role: A global update of the setting repository managed by the
setting controller happens, and the SettingCtrl_Updated event is sent,
whenever one of the methods
Commit,
Rollback,
SaveRepository and
ResetToAdminValues are called.
o Commit
public virtual HRESULT Commit( | int | iNoEvent | =0) |
-
Makes a memory copy of the setting attribute values.
Role: Commit
saves the current values of the setting
attributes managed by the setting controller in a specific memory area.
Successive calls to Commit
overwrite the memory area.
The values saved by the last call to Commit
can be restored from
that memory area using the
Rollback method.
- Parameters:
-
- iNoEvent
- [in] Reserved for internal use. Do not use. Should always be set to 0
- Returns:
- Legal values: S_OK on success, and E_FAIL otherwise
o GetInfo
-
Retrieves information associated with a given setting attribute.
Role:Information that may be associated with a setting
attribute consists in:
- Whether the setting attribute is locked
- Its default value
This information is retrieved as a pointer to a
CATSettingInfo class instance. Depending on whether the setting attribute is locked, you can unlock or lock it using the
retrieved pointer, like you can do it using the
Lock or
Unlock methods of CATSysSettingController, providing the methods are called in the Administrator mode.
- Parameters:
-
- iAttributeName
- [in] The name of the attribute.
Legal values: The length of this name must be less than
or equal to
MAXSETTINGNAME
- oInfo
- [out] The retrieved information
- iFlag
- [in] Reserved for internal use. Do not use. Should always be set to 0
- Returns:
- Legal values: S_OK if the information is successfully retrieved, and E_FAIL otherwise
o Initialize
protected virtual HRESULT Initialize( | ) |
-
Initializes the setting controller.
Role: Initializing a setting controller may be necessary
if you need to create a bufferized setting controller.
Some setting attributes may be bufferized, that is, the setting controller
reads and keeps their values in a buffer without needing to read the setting
repository whenever it is asked for the values of these setting attributes.
The first call to the Get method of a bufferized setting attribute value
initializes the buffer from the setting repository, a call to a Set method
updates the buffer, and a flag is set up and managed to indicate whether the
bufferized value is up-to-date.
The flag can be a data member of the setting controller (unsigned char) per
bufferized attribute. This flag is read by the attribute Get method to
determine whether the value is up-to-date, and accesses the setting
repository if it is not.
This value may be out-of-date when the
RollBack and
ResetToAdminValues methods are called. The setting controller must subscribe to
Rollback and
Reset events to change the flag to "out-of-date", and the next call to Get will access the setting repository
to update the buffer value and the flag.
Initialize
is always called when the setting controller is
instantiated.
Initializing the setting controller means initializing the setting attribute
values in the buffer by calling the Get methods of all the bufferized setting
attributes.
Redefine Initialize
implementation if you want to bufferize one
or several setting attributes.
The default implementation of Initialize
for non-bufferized
setting controllers returns S_OK without initializing anything.
- Returns:
- Legal values: S_OK on success, and E_FAIL otherwise
o Lock
protected HRESULT Lock( | const char* | iAttributeName) |
-
Locks a given setting attribute.
Role: Locking a given attribute enables you to prevent any further
modifications of its value.
Locking setting attribute is dedicated to setting administrators,
and is thus available in the Administrator mode only.
Otherwise Lock
simply returns S_OK without locking the setting
attribute.
- Parameters:
-
- iAttributeName
- [in] The name of the attribute to be locked.
Legal values: The length of this name must be less than
or equal to
MAXSETTINGNAME
- Returns:
- Legal values: S_OK if the attribute was successfully locked, and
E_FAIL otherwise
o MapLevel
-
Returns the Administration Level.
Role: Returns the Administration Level of an
attribute from the
CATSettingInfo instance attached to it. This method is used in the macros that help you create your setting
controller. You should not call it explicitely outside of these macros.
- Parameters:
-
- iInfo
- a CATSettingInfo Structure retrieved by a call to GetInfo.
- oLevel
- a String that will be valuated.
Legal values:
Not administrated | The attribute is not administrated |
Admin Level i | The Parameter is set at the level i of the CATReferenceSettingPath |
o MapLock
-
Returns the locking state.
Role: Returns the locking state and level of an
attribute from the
CATSettingInfo instance attached to it. This method is used in the macros that help you create your setting
controller. You should not call it explicitely outside of these macros.
- Parameters:
-
- iInfo
- a CATSettingInfo Structure retrieved by a call to GetInfo.
- oLockLevel
-
Legal values:
Locked | The setting attribute is locked |
Unlocked | The setting attribute is not locked |
Locked at Admin Level i | The setting attribute is lockedt the level i of the CATReferenceSettingPath |
o MapLock
public static const char* MapLock( | char | iLock) |
-
Returns the locking state.
Role: Returns the locking state of an
attribute from the
CATSettingInfo instance attached to it. This method is used in the macros that help you create your setting
controller. You should not call it explicitely outside of these macros.
- Returns:
- The locking state
Legal values:
Locked | The setting attribute is locked |
Unlocked | The setting attribute is not locked |
Upper Locked | The setting attribute is upper locked |
o NextAttribute
protected HRESULT NextAttribute( | char* | oAttributeName, |
| char* | oAttributeClass, |
| CATLONG32* | oAttributeSize, |
| short | iReset | = 0) |
-
Browses the setting.
Role: Returns the Name, the type and the number of constituting
elements of an attribute. The strings are copied but their allocation
must be done by the caller.
- Parameters:
-
- oAttributeName
- a pointer to an allocated buffer where the attribute's name
will be copied
- oAttributeClass
- a pointer to an allocated buffer where the attribute's type
will be copied
- oAttributeSize
- a pointer to a CATLONG32 int to put the number of constituting elements
- iReset
- iReset = 1 forces to begin with the first Attribute,reseting the state
reached with the last call to this method, otherwise 0
- Returns:
- Legal values S_OK until reaching the last Attribute and
returning E_FAIL when the last attribute is reached
o ReadAttr
-
Retrieves the value of a setting attribute made up of a pointer to
CATBaseUnknown.
Role: Retrieves, using its name, the value of an attribute
made up of a pointer to a CATBaseUnknown instance. A pointer to an intialized
and constructed object of type CATBaseUnknown must be given as argument,
because this object is used to set the default value of the attribute, if it
does not yet exist. In this last case, the method calls WriteSetting to
initialize the setting attribute.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be retrieved or created.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- ioAttrValue
- [inout] A pointer on an initialized and constructed CATBaseUnknown instance.
If the attribute has not been yet created, then ioAttrValue
is used as default, otherwise ioAttrValue is overwritten by
the retrieved value.
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o ReadAttr
-
Retrieves the value of a setting attribute made up of an array of pointers to CATBaseUnknown.
Role: Retrieves, using its name, the values of each element of the
array making up the attribute. The array is defined as an array of pointers to
constructed CATBaseUnknown instances, because it is used to set the default value of
the attribute, if it does not yet exist. In this last case the method calls
WriteAttr to initialize the setting attribute.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be retrieved or created.
Legal values: The name length must be less than
or equal to
MAXSETTINGNAME
- ioAttrValue
- [inout] An array of pointers to initialized and constructed CATBaseUnknown instances.
If the attribute has not been yet created, then the elements of
ioAttrValue are used as default values, otherwise the elements of
ioAttrValue are overwritten by the retrieved values.
- iSize
- [in] The size of the array
- Returns:
- Legal values:
>0: on success, returns the number of elements really read
0: if a class conflict on the attribute has occurred
-1: on failure
o ReadAttr
-
Retrieves the value of a setting attribute made up of a pointer to CATString.
Role: Retrieves, using its name, the value of an attribute
made up of a pointer to a CATString instance. A pointer to an intialized and
constructed object of type CATString must be given as argument, because this
object is used to set the default value of the attribute, if it does not yet
exist. In this last case, the method calls WriteSetting to initialize the
setting attribute.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be retrieved or created.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- ioAttrValue
- [inout] A pointer on a constructed CATString. If the attribute has not
been yet created, then ioAttr is used as default values,
otherwise ioAttrValue is overwritten by the retrieved value.
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o ReadAttr
-
Retrieves the value of a setting attribute made up of an array of pointers to CATString.
Role: Retrieves, using its name, the values of each element of the
array making up the attribute. The array is defined as an array of pointers
to constructed CATString, because it is used to set the default value of
the attribute, if it does not yet exist. In this last case the method calls
WriteAttr to initialize the setting attribute.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be retrieved or created.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- ioAttrValue
- [inout] An array of pointers to initialized and constructed CATString instances.
If the attribute has not been yet created, then the elements of
ioAttrValue are used as default values, otherwise the elements
of ioAttrValue are overwritten by the retrieved values.
- iSize
- [in] The size of the array
- Returns:
- Legal values:
>0: on success, returns the number of elements really read
0: if a class conflict on the attribute has occurred
-1: on failure
o ReadAttr
-
Retrieves the value of a setting attribute made up of a pointer to CATUnicodeString.
Role: Retrieves, using its name, the value of an attribute
constituted by one CATUnicodeString. A pointer on a intialized and constructed
object of type CATUnicodeString must be given as argument, because this object
is used to set the default value of the attribute, if it does not yet exist.
In this last case the method calls WriteAttr () to initialize the setting
attribute.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be retrieved or created.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- ioAttrValue
- [inout] A pointer to an initialized and constructed CATUnicodeString instance.
If the attribute has not been yet created, then ioAttrValue
is used as default value, otherwise ioAttrValue is overwritten
by the retrieved value.
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o ReadAttr
-
Retrieves the value of a setting attribute made up of an array of pointers to CATUnicodeString.
Role: Retrieves, using its name, the values of each element of the
array making up the attribute. The array is defined as an array of pointers
to constructed CATUnicodeString, because it is used to set the default value
of the attribute, if it does not yet exist. In this last case the method calls
WriteAttr to initialize the setting attribute.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be retrieved or created.
Legal values: The name length must be less than
or equal to
MAXSETTINGNAME
- ioAttrValue
- [inout] An array of pointers to initialized and constructed CATUnicodeString
instances
If the attribute has not been yet created, then the elements of
ioAttrValue are used as default values, otherwise the elements
of ioAttrValue are overwritten by the retrieved values.
- iSize
- [in] The size of the array
- Returns:
- Legal values:
>0: on success, returns the number of elements really read
0: if a class conflict on the attribute has occurred
-1: on failure
o ReadAttr
-
Retrieves the value of a setting attribute made up of an array of chars.
Role: Retrieves, using its name, the values of each element of the
array making up the attribute. The array is defined as an array of
initialized chars, because it is used to set the default value of
the attribute, if it does not yet exist. In this last case the method calls
WriteAttr to initialize the setting attribute.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be retrieved or created.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- ioAttrValue
- [inout] An array of initialized chars.
If the attribute has not been yet created, then the elements of
ioAttrValue are used as default values, otherwise the elements
of ioAttrValue are overwritten by the retrieved values.
- iSize
- [in] The size of the array
- Returns:
- Legal values:
>0: on success, returns the number of elements really read
0: if a class conflict on the attribute has occurred
-1: on failure
o ReadAttr
protected CATLONG32 ReadAttr( | const char* | iAttrName, |
| double* | ioAttrValue, |
| CATLONG32 | iSize | =1) |
-
Retrieves the value of a setting attribute made up of an array of doubles.
Role: Retrieves, using its name, the values of each element of the
array making up the attribute. The array is defined as an array of
initialized doubles, because it is used to set the default value of
the attribute, if it does not yet exist. In this last case the method calls
WriteAttr to initialize the setting attribute.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be retrieved or created.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- ioAttrValue
- [inout] An array of initialized doubles.
If the attribute has not been yet created, then the elements of
ioAttrValue are used as default values, otherwise the elements
of ioAttrValue are overwritten by the retrieved values.
- iSize
- [in] The size of the array
- Returns:
- Legal values:
>0: on success, returns the number of elements really read
0: if a class conflict on the attribute has occurred
-1: on failure
o ReadAttr
-
Retrieves the value of a setting attribute made up of an array of floats.
Role: Retrieves, using its name, the values of each element of the
array making up the attribute. The array is defined as an array of
initialized floats, because it is used to set the default value of
the attribute, if it does not yet exist. In this last case the method calls
WriteAttr to initialize the setting attribute.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be retrieved or created.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- ioAttrValue
- [inout] An array of initialized floats.
If the attribute has not been yet created, then the elements of
ioAttrValue are used as default values, otherwise the elements
of ioAttrValue are overwritten by the retrieved values.
- iSize
- [in] The size of the array
- Returns:
- Legal values:
>0: on success, returns the number of elements really read
0: if a class conflict on the attribute has occurred
-1: on failure
o ReadAttr
-
Retrieves the value of a setting attribute made up of an array of ints.
Role: Retrieves, using its name, the values of each element of the
array making up the attribute. The array is defined as an array of
initialized ints, because it is used to set the default value of
the attribute, if it does not yet exist. In this last case the method calls
WriteAttr to initialize the setting attribute.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be retrieved or created.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- ioAttrValue
- [inout] An array of initialized ints.
If the attribute has not been yet created, then the elements of
ioAttrValue are used as default values, otherwise the elements
of ioAttrValue are overwritten by the retrieved values.
- iSize
- [in] The size of the array
- Returns:
- Legal values:
>0: on success, returns the number of elements really read
0: if a class conflict on the attribute has occurred
-1: on failure
o ReadAttr
-
Retrieves the value of a setting attribute made up of an array of shorts.
Role: Retrieves, using its name, the values of each element of the
array making up the attribute. The array is defined as an array of
initialized shorts, because it is used to set the default value of
the attribute, if it does not yet exist. In this last case the method calls
WriteAttr to initialize the setting attribute.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be retrieved or created.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- ioAttrValue
- [inout] An array of initialized shorts.
If the attribute has not been yet created, then the elements of
ioAttrValue are used as default values, otherwise the elements
of ioAttrValue are overwritten by the retrieved values.
- iSize
- [in] The size of the array
- Returns:
- Legal values:
>0: on success, returns the number of elements really read
0: if a class conflict on the attribute has occurred
-1: on failure
o ReadAttr
protected CATLONG32 ReadAttr( | const char* | iAttrName, |
| unsigned int* | ioAttrValue, |
| CATLONG32 | iSize | =1) |
-
Retrieves the value of a setting attribute made up of an array of unsigned ints.
Role: Retrieves, using its name, the values of each element of the
array making up the attribute. The array is defined as an array of
initialized unsigned ints, because it is used to set the default value of
the attribute, if it does not yet exist. In this last case the method calls
WriteAttr to initialize the setting attribute.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be retrieved or created.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- ioAttrValue
- [inout] An array of initialized unsigned ints.
If the attribute has not been yet created, then the elements of
ioAttrValue are used as default values, otherwise the elements
of ioAttrValue are overwritten by the retrieved values.
- iSize
- [in] The size of the array
- Returns:
- Legal values:
>0: on success, returns the number of elements really read
0: if a class conflict on the attribute has occurred
-1: on failure
o ResetToAdminValues
public virtual HRESULT ResetToAdminValues( | char** | iAttList, |
| int | iNbAtt) |
-
Restores the administrated values of the attributes.
Role: ResetToAdminValues
restores all
the values of the setting attributes managed by the setting controller
to either the values set by the setting administrator, or to their default
values if the setting administrator did not change them.
- Parameters:
-
- iAttList
- [in] Reserved for internal use. Do not use. Should always be set to NULL
- iNbAtt
- [in] Reserved for internal use. Do not use. Should always be set to 0
- Returns:
- Legal values: S_OK on success, and E_FAIL otherwise
o Rollback
-
Restores the last memory copy of the setting attribute values.
Role: Rollback
restores the values of the
setting attributes managed by the setting controller from the
memory area.
All values of the
setting attributes managed by the setting controller modified since the last
call to
Commit are restored to the values they had when this last
Commit was called.
- Returns:
- Legal values: S_OK on success, and E_FAIL otherwise
o SaveRepository
public virtual HRESULT SaveRepository( | const char* | itmp | =NULL) |
-
Makes a persistent copy of the setting attribute values on file.
Role: SaveRepository
saves the current values of the
setting attributes managed by the setting controller in a setting repository
file.
To avoid inconsistencies, SaveRepository
first saves the values
in the memory area used by the
Commit method by calling
Commit before writing the values in the setting repository file.
- Parameters:
-
- iTmp
- [in] Reserved for internal use. Do not use. Should always be set to NULL
- Returns:
- Legal values: S_OK on success, and E_FAIL otherwise
o Unlock
protected HRESULT Unlock( | const char* | iAttributeName) |
-
Unlocks a given setting attribute.
Role: Unlocking a given attribute enables you to authorize further
modifications of its value.
Unlocking setting attribute is dedicated to setting administrators,
and is thus available in the Administrator mode only.
Otherwise Unlock
simply returns S_OK without unlocking the
setting attribute.
- Parameters:
-
- iAttributeName
- [in] The name of the attribute to be unlocked.
Legal values: The length of this name must be less than
or equal to
MAXSETTINGNAME
- Returns:
- Legal values S_OK if the attribute was successfully unlocked, and
E_FAIL otherwise
o WriteAttr
-
Sets the value of a setting attribute made up of a pointer to CATBaseUnknown.
Role: Sets the value of an attribute
made up of a pointer to a CATBaseUnknown instance.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be set.
Legal values: The name length must be less than
or equal to
MAXSETTINGNAME
- iAttrValue
- [in] A pointer to an initialized and constructed CATBaseUnknown instance
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o WriteAttr
-
Sets the value of a setting attribute made up of an array of pointers to CATBaseUnknown.
Role: Sets the values of each element of the array making up the
attribute. Each of these elements is a pointer to a constructed
CATBaseUnknown instance.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be set.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- iAttrValue
- [in] An array of pointers to initialized and constructed CATBaseUnknown instances
- iSize
- [in] The size of the array
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o WriteAttr
-
Sets the value of a setting attribute made up of a pointer to CATString.
Role: Sets the value of an attribute
made up of a pointer to a CATString instance.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be set.
Legal values: The name length must be less than
or equal to
MAXSETTINGNAME
- iAttrValue
- [in] A pointer to an initialized CATString instance
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o WriteAttr
-
Sets the value of a setting attribute which is an array of CATString.
Role: Sets the values of each element of the array making up the
attribute. Each of these elements is a pointer to a constructed
CATString instance.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be set.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- iAttrValue
- [in] An array of pointers to initialized and constructed CATString instances
- iSize
- [in] The size of the array
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o WriteAttr
-
Sets the value of a setting attribute made up of a pointer to
CATUnicodeString.
Role: Sets the value of an attribute
made up of a pointer to a CATUnicodeString instance.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be set.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- iAttrValue
- [in] A pointer to an initialized and constructed CATUnicodeString instance.
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o WriteAttr
-
Sets the value of a setting attribute made up of an array of pointers to CATUnicodeString.
Role: Sets the values of each element of the array making up the
attribute. Each of these elements is a pointer to a constructed
CATUnicodeString instance.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be set.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- iAttrValue
- [in] An array of pointers to initialized and constructed CATUnicodeString
instances
- iSize
- [in] The size of the array
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o WriteAttr
-
Sets the value of a setting attribute made up of an array of chars.
Role: Sets the values of each element of the array making up the
attribute. The array is defined as an array of initialized chars.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be set.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- iAttrValue
- [in] An array of initialized chars
- iSize
- [in] The size of the array
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o WriteAttr
protected CATLONG32 WriteAttr( | const char* | iAttrName, |
| double* | iAttrValue, |
| CATLONG32 | iSize | =1) |
-
Sets the value of a setting attribute made up of an array of doubles.
Role: Sets the values of each element of the array constituting the
attribute. The array is defined as an array of initialized doubles.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be set.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- iAttrValue
- [in] An array of initialized doubles
- iSize
- [in] The size of the array
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o WriteAttr
-
Sets the value of a setting attribute made up of an array of floats.
Role: Sets the values of each element of the array constituting the
attribute. The array is defined as an array of initialized floats.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be set.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- iAttrValue
- [in] An array of initialized floats
- iSize
- [in] The size of the array
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o WriteAttr
-
Sets the value of a setting attribute made up of an array of ints.
Role: Sets the values of each element of the array constituting the
attribute. The array is defined as an array of initialized ints.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be set.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- iAttrValue
- [in] An array of initialized ints
- iSize
- [in] The size of the array
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o WriteAttr
-
Sets the value of a setting attribute made up of an array of shorts.
Role: Sets the values of each element of the array constituting the
attribute. The array is defined as an array of initialized shorts.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be set.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- iAttrValue
- [in] An array of initialized shorts
- iSize
- [in] The size of the array
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
o WriteAttr
protected CATLONG32 WriteAttr( | const char* | iAttrName, |
| unsigned int* | iAttrValue, |
| CATLONG32 | iSize | =1) |
-
Sets the value of a setting attribute made up of an array of unsigned ints.
Role: Sets the values of each element of the array constituting the
attribute. The array is defined as an array of initialized unsigned ints.
- Parameters:
-
- iAttrName
- [in] The name of the attribute whose value is to be set.
Legal values: The name length must be less than or
equal to
MAXSETTINGNAME
- iAttrValue
- [in] An array of initialized unsigned ints
- iSize
- [in] The size of the array
- Returns:
- Legal values:
1: on success
0: if a class conflict on the attribute has occurred
-1: on failure
This object is included in the file: CATSysSettingController.h
If needed, your Imakefile.mk should include the module: JS0GROUP