![]() |
Kactus2
Kactus2 reference guide
|
LibraryHandler is the class that implements the services to manage the IP-XACT library. More...
#include <LibraryHandler.h>
Public Slots | |
void | beginSave () |
void | endSave () |
void | onCheckLibraryIntegrity () final |
void | onEditItem (VLNV const &vlnv) final |
void | onOpenDesign (VLNV const &vlnv, QString const &viewName) final |
void | onOpenMemoryDesign (VLNV const &vlnv, QString const &activeView) |
void | onOpenSWDesign (VLNV const &vlnv) |
void | onOpenSystemDesign (VLNV const &vlnv) |
void | removeObject (VLNV const &vlnv) final |
void | removeObjects (const QList< VLNV > &vlnvList) final |
![]() | |
virtual void | beginSave ()=0 |
virtual void | endSave ()=0 |
virtual void | onCheckLibraryIntegrity ()=0 |
virtual void | onEditItem (VLNV const &vlnv)=0 |
virtual void | onOpenDesign (VLNV const &vlnv, QString const &viewName)=0 |
virtual void | removeObject (VLNV const &vlnv)=0 |
virtual void | removeObjects (const QList< VLNV > &vlnvList)=0 |
Signals | |
void | addVLNV (VLNV const &vlnv) |
Inform tree model that a vlnv is to be added to the tree. | |
void | itemSelected (VLNV const &vlnv) |
Signal that the library item specified by vlnv is selected in one of the views. | |
void | openAbsDef (VLNV const &absDefVLNV) |
Signal that user wants to open specified abstraction for editing. | |
void | openApiDefinition (VLNV const &vlnv) |
Signal that user wants to open specified API definition for editing. | |
void | openBus (VLNV const &busDefVLNV) |
Signal that user wants to open specified bus for editing. | |
void | openCatalog (VLNV const &vlnv) |
Signal that user wants to open specified catalog for editing. | |
void | openComDefinition (VLNV const &vlnv) |
Signal that user wants to open specified COM definition for editing. | |
void | openComponent (VLNV const &vlnv) |
Signal that user wants to open specified component for editing. | |
void | openDesign (VLNV const &vlnv, const QString &viewName) |
Signal that user wants to open the specified component for editing. | |
void | openMemoryDesign (VLNV const &vlnv, const QString &viewName) |
Signal that user wants to open the memory design of the specified component for editing. | |
void | openPlatformComponent (VLNV const &vlnv) |
Signal that user wants to open a platform component. | |
void | openSWDesign (VLNV const &vlnv, QString const &viewName) |
Signal that user wants to open the specified software design for editing. | |
void | openSystemDesign (VLNV const &vlnv, QString const &viewName) |
Signal that user wants to open a system for editing. | |
void | progressStatus () |
void | removeVLNV (VLNV const &vlnv) |
Inform tree model that a vlnv is to be removed from the tree. | |
void | resetModel () |
Inform both models that the content must be reset. | |
void | updatedVLNV (VLNV const &vlnv) |
Inform that object has been updated. | |
![]() | |
void | createAbsDef (VLNV const &busDefVLNV, QString const &directory, bool disableBusDef) |
Signal that user wants to create a new abstraction definition for given bus definition. | |
void | itemSelected (VLNV const &vlnv) |
Signal that the library item specified by vlnv is selected in one of the views. | |
void | openBus (VLNV const &busDefVLNV, VLNV const &absDefVLNV, bool disableBusDef) |
Signal that user wants to open specified bus for editing. | |
void | openComponent (VLNV const &vlnv) |
Signal that user wants to open specified component for editing. | |
void | openDesign (VLNV const &vlnv, QString const &viewName) |
Signal that user wants to open the specified component for editing. | |
void | openPlatformComponent (VLNV const &vlnv) |
Signal that user wants to open a platform component. | |
void | openSystemDesign (VLNV const &vlnv) |
Signal that user wants to open a system for editing. | |
Public Member Functions | |
LibraryHandler (const LibraryHandler &other)=delete | |
No copying. | |
~LibraryHandler () final=default | |
The destructor. | |
bool | contains (VLNV const &vlnv) const final |
QVector< QString > | findErrorsInDocument (QSharedPointer< Document > document, QString const &path) |
QList< VLNV > | getAllVLNVs () const final |
int | getChildren (QList< VLNV > &list, VLNV const &vlnvToSearch) const final |
void | getDependencyFiles (VLNV const &vlnv, QStringList &list) final |
QSharedPointer< Design > | getDesign (VLNV const &hierarchyRef) final |
VLNV | getDesignVLNV (VLNV const &hierarchyRef) final |
QString | getDirectoryPath (VLNV const &vlnv) const final |
VLNV::IPXactType | getDocumentType (VLNV const &vlnv) final |
HierarchyModel * | getHierarchyModel () |
QSharedPointer< Document > | getModel (VLNV const &vlnv) final |
QSharedPointer< Document const > | getModelReadOnly (VLNV const &vlnv) final |
void | getNeededVLNVs (VLNV const &vlnv, QList< VLNV > &list) final |
int | getOwners (QList< VLNV > &list, VLNV const &vlnvToSearch) const final |
const QString | getPath (VLNV const &vlnv) const final |
LibraryTreeModel * | getTreeModel () |
LibraryItem const * | getTreeRoot () const final |
bool | isValid (VLNV const &vlnv) final |
LibraryHandler & | operator= (const LibraryHandler &other)=delete |
No assignment. | |
int | referenceCount (VLNV const &vlnv) const final |
void | searchForIPXactFiles () final |
Search for IP-Xact files in the file system and add them to library. | |
void | setOutputChannel (MessageMediator *messageChannel) |
bool | writeModelToFile (QSharedPointer< Document > model) final |
bool | writeModelToFile (QString const &path, QSharedPointer< Document > model) final |
![]() | |
template<class T> | |
QSharedPointer< T > | getModel (VLNV const &vlnv) |
template<class T> | |
QSharedPointer< T const > | getModelReadOnly (VLNV const &vlnv) |
Static Public Member Functions | |
static LibraryHandler & | getInstance () |
The the instance of the library. | |
LibraryHandler is the class that implements the services to manage the IP-XACT library.
Definition at line 45 of file LibraryHandler.h.
|
delete |
No copying.
|
finaldefault |
The destructor.
|
signal |
Inform tree model that a vlnv is to be added to the tree.
|
slot |
Call this function before saving several objects to library.
When calling this before saving and then using writeModelToFile() the library is not update between each save operation thus making the program faster.
Be sure to call endSave() after all items are saved.
|
finalvirtual |
Checks if the library already contains the specified vlnv.
[in] | vlnv | The vlnv that is searched within the library. |
Implements LibraryInterface.
|
slot |
End the saving operation and update the library.
This function must be called always after calling the beginSave().
QVector< QString > LibraryHandler::findErrorsInDocument | ( | QSharedPointer< Document > | document, |
QString const & | path ) |
Find errors in the given document.
[in] | document | The document to check. |
[in] | documentPath | The path to the document file on disk. |
|
finalvirtual |
Gets all the VLNVs currently in the library.
Implements LibraryInterface.
|
finalvirtual |
Get the items that are needed by the specified item.
[in] | list | QList where the search results are appended. |
[in] | vlnvToSearch | Identifies the item thats child-items are wanted. |
Implements LibraryInterface.
|
finalvirtual |
Get list of files that are needed by the given document.
This function returns a list of file paths that are converted as absolute file paths to the needed files. This function searches files only from this document, it does not search possible subcomponents.
[in] | vlnv | Reference to the vlnv that is used for the search. |
[out] | list | The files are appended to the list if they are not already on the list. |
Implements LibraryInterface.
|
finalvirtual |
Get pointer to the design for a given hierarchy reference.
[in] | hierarchyRef | The hierarchical reference obtained from component's view. |
Implements LibraryInterface.
|
finalvirtual |
Get the VLNV of the design for a given hierarchy reference.
This function can be used by calling it with a hierarchy reference found if a component's hierarchical view. Function checks if the reference is directly for a design and returns the design vlnv. If reference is for a configuration then the design vlnv is searched from the configuration and design vlnv is returned. If design is not found then invalid vlnv is returned.
[in] | hierarchyRef | The hierarchical reference obtained from component's view. |
Implements LibraryInterface.
|
finalvirtual |
Get the directory path to the specified IP-XACT document.
[in] | vlnv | Specifies the wanted IP-XACT document. |
Implements LibraryInterface.
|
finalvirtual |
Get the document type of given vlnv.
If vlnv is not found in the library then VLNV::INVALID is returned.
[in] | vlnv | Specifies the document that's type is wanted. |
Implements LibraryInterface.
HierarchyModel * LibraryHandler::getHierarchyModel | ( | ) |
|
static |
The the instance of the library.
|
finalvirtual |
Get a model that matches given VLNV.
This function can be called to get a model that matches an IP-Xact document.
[in] | vlnv | Identifies the desired document. |
Implements LibraryInterface.
|
finalvirtual |
Get a model that matches given VLNV for read-only access.
This function can be called to get a model that matches an IP-Xact document.
[in] | vlnv | Identifies the desired document. |
Implements LibraryInterface.
|
finalvirtual |
Get list of vlnvs that are needed by given document.
This function takes an IP-Xact document and searches it and returns list of all vlnvs that are needed by that document. Function also searches all possible sub vlnvs that need other vlnvs and adds them to the list. The list doesn't contain single vlnv twice.
[in] | vlnv | Reference to the vlnv that is used as starting point for the search. |
[out] | list | Reference to the list where all vlnvs are added to. |
Implements LibraryInterface.
|
finalvirtual |
Get the items that have referenced the given vlnv in their meta data.
[out] | list | The search results. |
[in] | vlnvToSearch | Identifies the item to search for. |
Implements LibraryInterface.
|
finalvirtual |
Get a path to the specified IP-Xact document.
[in] | vlnv | Specifies the wanted IP-Xact document. |
Implements LibraryInterface.
LibraryTreeModel * LibraryHandler::getTreeModel | ( | ) |
|
finalvirtual |
|
finalvirtual |
Check if the identified object is in valid state.
[in] | vlnv | Identifies the object to check. |
Implements LibraryInterface.
|
signal |
Signal that the library item specified by vlnv is selected in one of the views.
|
finalslot |
Check the library items for validity
This function automatically removes the invalid library items.
|
finalslot |
Edit an item in the library
[in] | vlnv | Reference to the vlnv that identifies the object to edit. |
|
finalslot |
Open the specified component design
[in] | vlnv | Identifies the component that's design is wanted |
[in] | viewName | Identifies the view for the design. |
|
slot |
Opens the memory design of the given HW design.
[in] | vlnv | The vlnv of the HW design. |
[in] | activeView | The active view of the selected HW design. |
|
slot |
Open the specified component SW design
[in] | vlnv | Identifies the component that's SW design is wanted |
|
slot |
Open the specified component system design
[in] | vlnv | Identifies the component that's system design is wanted |
|
signal |
Signal that user wants to open specified abstraction for editing.
|
signal |
Signal that user wants to open specified API definition for editing.
|
signal |
Signal that user wants to open specified bus for editing.
|
signal |
Signal that user wants to open specified catalog for editing.
|
signal |
Signal that user wants to open specified COM definition for editing.
|
signal |
Signal that user wants to open specified component for editing.
|
signal |
Signal that user wants to open the specified component for editing.
|
signal |
Signal that user wants to open the memory design of the specified component for editing.
|
signal |
Signal that user wants to open a platform component.
|
signal |
Signal that user wants to open the specified software design for editing.
|
signal |
Signal that user wants to open a system for editing.
|
delete |
No assignment.
|
signal |
|
finalvirtual |
Count how many times the given component is instantiated in the library.
[in] | vlnv | Identifies the component that's instances are searched. |
Implements LibraryInterface.
|
finalslot |
Remove the specified library object from the library and file system.
This function does not ask user to verify the deletion, it just removes the object and it's xml file. If vlnv is for component the component's files are not removed.
[in] | vlnv | Identifies the object. |
|
finalslot |
Remove the specified library objects from the library and file system.
This function opens a dialog that asks user to confirm the deletion of the objects.
[in] | vlnvList | Identifies the objects to remove. |
|
signal |
Inform tree model that a vlnv is to be removed from the tree.
|
signal |
Inform both models that the content must be reset.
|
finalvirtual |
Search for IP-Xact files in the file system and add them to library.
Implements LibraryInterface.
void LibraryHandler::setOutputChannel | ( | MessageMediator * | messageChannel | ) |
|
signal |
Inform that object has been updated.
|
finalvirtual |
Write the already registered model to file system.
This function demands that the model is already part of the library and it's file path can be found. The changes made to the model are written to the previous file so the model can not be restored to it's previous state after this operation.
[in] | model | The model to be written. |
Implements LibraryInterface.
|
finalvirtual |
Write the model to file system to given file path
This function takes the given directory path and writes the given model to that directory. The path must not contain the file name. If file already exists in file system it is written over.
When model is saved using this function it is not necessary to call onItemSaved() because it is called by this function.
[in] | path | Directory path that specifies the directory to save to file into. |
[in] | model | The library component that is written. |
Implements LibraryInterface.