Discussion Forums: help

Monitor Forum | Start New Thread Start New Thread


RE: How to get Components managed by a ComponentExtension ? [ reply ]
By: Claire SERY on 2015-11-12 11:40
Thank you for your answer Mahnu.

I have already done things like it is done in the Core::getConfig(), using methods of the ExtensionManager.

What I want really (for the edition of the catalogue of CEPs and the update of the XML file generated by the Wizard) is to access to the description of each components (that you call non top-level component) "managed" by the component extension (ie, I load the DLL of the extension and I want to get all informations about it to update or create an XML file that can be reloaded in the Wizard to modifying an existing CEP).

I understand your point of view of why it has been thinking like this, but I need to access to component's information directly.

Or, at least, these informations could be recorded in the description of the component extension, as the information of the file extension ? Because in fact, I don't really need of the Component itself, I need of its description (and its properties, if appropriate)...

RE: How to get Components managed by a ComponentExtension ? [ reply ]
By: Emmanuel Promayon on 2015-11-10 18:47
Hi Claire,

If you are looking for the name of the file extensions managed by top-level components or the name of the component extension, I suggest that you can check the source code of:
const QString Core::getConfig()
and more specifically how the QStringList components is build (first and second foreach loop).

If you are looking at accessing the name of the non top-level components, I am afraid this is not possible.

The reasons for that comes from the following "spec":
- while an action needs to be visible to the Core, the non top-level components are not important to the Core. For instance to open a file, the Core can decide which top-level component extension to trigger by checking the file extension.
- The principle of the ComponentExtension Service Layer (for CamiTK 3.x anyway!) is to associate one or more file extension to one and only one top-level components.
- The CamiTK programmer should be free to define as many sub-components (non top-level component) as she/he wishes. To manage specific datatype, the programmer might just need the top-level component or might want/need to share the management of parts of the datatype to the sub-component.
- The non top-level component are therefore "hidden". It is a good way to detect a re-usable component. If the programmer thinks that a specific non top-level component can be reused somewhere else, she/he should offer an independent top-level Component and its associated ComponentExtension or she/he should "publicized" it in the API. In this case I would even suggest to move this Component to the Core when possible (e.g. MeshComponent or ImageComponent).

In brief, ComponentExtension are not managing a list of Component class, they are here to provide a link to a top-level Component in a DLL (that is of course for CamiTK 3.x spec). There might be a concept missing here if you found a use-case where access to the "hidden" Component is required (and I am interested!).

Let me know if that answer your question,
Best regards,


How to get Components managed by a ComponentExtension ? [ reply ]
By: Claire SERY on 2015-11-10 09:59
Hi all,

When I load with the ExtensionManager a ComponentExtension, I want to get all components managed by this componentExtension. But there is no list in the componentExtension of components (like it is done for ActionExtension and Actions)

So, how can I get all components managed by my ComponentExtension loaded with the ExtensionManager ? Because I need to get description of all these components...

Thank you !


Powered By FusionForge