All Frameworks Object Hierarchy This Framework Indexes
All setting controllers share the five methods of the SettingController object to deal with the whole set, or a subset of the setting attributes:
Commit
to make a memory copy of the setting attribute valuesRollback
to restore the last memory copy of the setting attribute valuesResetToAdminValues
to restore the administered values of all the attributesResetToAdminValuesByName
to restore the administered values of a subset of the attributesSaveRepository
to make a persistent copy of the setting attribute values on file.In addition, each setting controller exposes four methods per setting parameter: two methods to access the setting attribute values, that usually make up a read/write property if the setting parameter is represented by a single setting attribute, a method to manage the setting parameter lock, and a method to retrieve the state of the setting parameter. The first two methods are parameter-specific and are fully described in the setting controller object that managing the setting parameter. The last two methods have always the same signature and the same behavior whatever the setting parameter. They are described below. PARAMETER is used in place of the actual setting parameter name.
HRESULT SetPARAMETERLock(in boolean iLocked);
Locks or unlocks the PARAMETER setting parameter.
Role: Locking a setting parameter prevents the end user, or the
administrators below the current one, from changing the setting parameter value.
Locking or unlocking the PARAMETER setting parameter is an administrator task
and is possible when running a session in the administration mode only.
iLocked
True
to lock, and False
to unlock.HRESULT GetPARAMETERInfo (inout CATBSTR ioAdminLevel, inout CATBSTR ioLocked, out /*IDLRETVAL*/ boolean oModified);
Retrieves information about the PARAMETER setting parameter.
Role: This information defines the state of the setting parameter and is made up of:
ioAdminLevel
Legal values:
ioLocked
o Sub Commit( | ) |
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.
o Sub ResetToAdminValuesByName( | iAttList) |
ResetToAdminValuesByName
restores the values of
a subset 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.
o Sub ResetToAdminValues( | ) |
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.
o Sub Rollback( | ) |
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.
o Sub SaveRepository( | ) |
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.
Copyright © 2003, Dassault Systèmes. All rights reserved.