All Frameworks Class Hierarchy This Framework Indexes
ApplicationFrame Macro CATImplementHeaderSpecialResources
Macro CATImplementHeaderSpecialResources (DerivedHeader,BaseHeader,Rsrc)
Implements the methods to get the header's resource file.
The difference with CATImplementHeaderResources is that the resources
files have a different name, which is useful if your header or any directly
derived class can be instanciated from different frameworks.
Indeed, there can be only one resources file of the same name, whereever in
the code. A more detailed explanation follows in the parameters' descriptions.
Let us imagine the following scenario:
- a BaseHeader using CATDeclareHeaderResources and
CATImplementHeaderResources(BaseHeader, BaseBaseHeader, BaseRsc).
- a DerivedHeader1 deriving from BaseHeader, and
- which role is specific for every instanciation, and therefore is
using CATDeclareHeaderSpecialResources and
CATImplementHeaderSpecialResources(DerivedHeader1, BaseHeader, DerivedRsc1)
macros.
- which constructors is of the following kind:
DerivedHeader1(const CATString& iHeaderId,arguments for role definition,
const CATString& iResourcesFileNamePrefix1);
- where iResourcesFileNamePrefix1 is stored in the
_ResourcesFileNamePrefix
data declared by the CATDeclareHeaderSpecialResources macro.
- a DerivedHeader2 deriving from DerivedHeader1, and
- which role is specific for every instanciation, and therefore is
using CATDeclareHeaderSpecialResources and
CATImplementHeaderSpecialResources(DerivedHeader2, BaseHeader, DerivedRsc2)
macros.
- which constructors is of the following kind:
DerivedHeader2(const CATString& iHeaderId2,arguments for role definition,
const CATString& iResourcesFileNamePrefix2);
- where iResourcesFileNamePrefix2 is stored in the
_ResourcesFileNamePrefix
data declared by the CATDeclareHeaderSpecialResources macro.
When an application is instanciating DerivedHeader2 classes, through:
new DerivedHeader2("MyDerivedHeader2", ..., "MyFilePrefix_");
the resources for this header will be looked for:
- first in "MyFilePrefix_DerivedRsc2" .CATNls and .CATRsc files
- then in "MyFilePrefix_DerivedRsc1" .CATNls and .CATRsc files.
- and at last in "BaseHeader" .CATNls and .CATRsc files.
- Parameters:
-
- DerivedHeader
- Command header class name.
- BaseHeader
- Base class of your header class.
- Rsrc
- Resources file name
The keys to be filled are the same as for the
CATImplementHeaderResources macro.
They are all starting this way: FilePrefix_BaseRsc.HeaderId
- See also:
- CATDeclareHeaderSpecialResources, CATImplementHeaderResources
This object is included in the file: CATCommandHeader.h
If needed, your Imakefile.mk should include the module: CATApplicationFrame