All Frameworks Class Hierarchy This Framework Previous Next Indexes
DraftingInterfaces Interface CATIDftStandardMediator
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---CATIDftStandardMediator
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATIDftStandardMediator
Role: Interface dedicated to the management and synchronization of a document-wide DFT-Standard.
For documents on which the CATIDftStandardMediator interface can be requested, there should be
a SINGLE DFT-standard.
The multiple drafting-based application instances coexisting in the same document are supposed
to share this DFT-standard.
Consequently, any modification of it MUST be done through this interface rather than through CATIDftStandardManager.
NOTE: The DFT-standard is a version number and the set of key/value used by drafting elements in order to
customize their behavior (for example: color, shape, but also how given features should react to a given
interaction).
In order to retrieve theses key/values pair, we usually use a dedicated interface.@see CATIDftStandard.
An embedded standard can be switched (standard A to standard B) or upgraded (standard A version x to standard A version y).
Both a switch and an upgrade consist in the replacement of the embedded standard A with a standard B whose characteristics
will be taken from the ressources/standard/drafting/B.xml file.
However, features can have a custom way of adapting to the new standard according to the import strategy (switch or upgrade).
For example, in drafting a switch of standard will reset the sheet's format to the default format of the new standard.
However during an upgrade, the sheet's format will remain roughly the same.
WARNING: any switch or upgrade requires that the target standard has a greater version number that the source standard.
Method Index
- o
CheckStandardCanBeImported(CATUnicodeString&)
- Checks whether the XML standard identified by the given name can be imported.
- o
ImportDftStandard(CATUnicodeString&,CATIContainer*)
- Switch the DFT-standard in the document to the given standard for the given drafting-like container.
- o
InitializeDftStandard(CATUnicodeString&,CATIContainer*)
- Initialize the DFT-standard in the document to the given standard for the given drafting-like container.
- o
UpgradeDftStandard(CATIContainer*)
- Upgrade the embeded DFT-standard in the document for the given drafting-like container.
Methods
o CheckStandardCanBeImported
-
Checks whether the XML standard identified by the given name can be imported.
This method is typically used in order to construct the list of available standards for import.
- Parameters:
-
- iNewStd
- The name of the standard.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Success. the XML standard can be used.
- S_FALSE
- Success. The standard cannot be imported, check the version number.
- E_FAIL
- Error. Internal error or the XML standard is inconsistant.
o ImportDftStandard
-
Switch the DFT-standard in the document to the given standard for the given drafting-like container.
See this interface description for more explanation about switches.
- Parameters:
-
- iNewStd
- The name of the standard xml file which should be imported and used globally (see this interface description).
- iContainer
- The container whose standard is to be changed and will consequently impact other DFT containers.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Sucess.
- S_FALSE
- The version number of the standard in the xml file you want to import is lower than
the version number of the embeded standard (see the warning this interface description).
- E_FAIL
- Preconditions not met or internal critical error. The model can potentially be corrupted and unusable.
o InitializeDftStandard
-
Initialize the DFT-standard in the document to the given standard for the given drafting-like container.
- Parameters:
-
- iNewStd
- The name of the standard xml file which should be imported and used globally (see this interface description).
- iContainer
- The container whose standard is to be initialized for the first time to iNewStd.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Success.
- S_FALSE
- There are existing containers in this document whose standard cant be changed to iNewStd.
Check the version number of the standard you want to import (see this interface description).
- E_FAIL
- Preconditions not met or internal critical error. The model can potentially be corrupted and unusable.
o UpgradeDftStandard
-
Upgrade the embeded DFT-standard in the document for the given drafting-like container.
See this interface description for more explanation about upgrades.
- Parameters:
-
- iContainer
- The container for which the standard is upgraded.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Sucess.
- S_FALSE
- The version number of the standard in the xml file you want to import is lower than
the version number of the embeded standard (see this interface description).
- E_FAIL
- Preconditions not met or internal critical error. The model can potentially be corrupted and unusable.
This object is included in the file: CATIDftStandardMediator.h
If needed, your Imakefile.mk should include the module: CATDraftingInterfaces