Workspace 6.21.5
Public Member Functions | List of all members
PackageItemContainer Class Reference

Abstract base class for items that can go into a software package.

#include <Package/packageitemcontainer.h>

Inheritance diagram for PackageItemContainer:
[legend]

Public Member Functions

 PackageItemContainer ()
 
 PackageItemContainer (const PackageItemContainer &container)
 
 ~PackageItemContainer () override
 
void add (const PackageItem &item)
 
bool addToCMakePackScript (QStringList &cmakeScript) const override
 
void clear ()
 
PackageItemContainerclone () const override
 
QList< ApplicationIconDetailsgetApplicationIcons () const override
 
QList< ExecutableDetailsgetExecutables () const override
 
PackageItemContaineroperator= (const PackageItemContainer &container)
 
- Public Member Functions inherited from PackageItem
virtual bool addToCMakePackScript (QStringList &cmakeScript) const =0
 
PackageItemclone () const override=0
 
virtual QList< ApplicationIconDetailsgetApplicationIcons () const
 
virtual QList< EnvironmentVariableDetailsgetEnvironmentVariables () const
 
virtual QList< ExecutableDetailsgetExecutables () const
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()=default
 
virtual Clonableclone () const =0
 

Constructor & Destructor Documentation

◆ PackageItemContainer() [1/2]

◆ PackageItemContainer() [2/2]

◆ ~PackageItemContainer()

~PackageItemContainer ( )
override

Member Function Documentation

◆ add()

void add ( const PackageItem item)
Parameters
itemThe item to add to the container. This item will be cloned and the clone will be stored, so the original item passed in to the function can be freely modified or deleted after the function returns.

◆ addToCMakePackScript()

bool addToCMakePackScript ( QStringList cmakeScript) const
overridevirtual
Parameters
cmakeScriptUpon entry, this will hold the contents of the CMake script that have been assembled so far. These contents would normally not be modified, but this is permitted if required. Normally, the subclass implementation would simply append to cmakeScript and in some circumstances, it may search for things in cmakeScript to customize entries that will be appended.
Returns
True upon success, or false if an error was encountered that results in the CMake script incomplete or invalid.

Implements PackageItem.

◆ clear()

void clear ( )

◆ clone()

PackageItemContainer * clone ( ) const
overridevirtual
Returns
A clone of this object.
Note
Subclasses would normally return their own type rather than the Clonable type. The C++ language rules allow a more derived type to be returned from a virtual function and the compiler will still treat it as a valid override.

We redeclare this function only so that the more derived return type is available without casting.

Implements PackageItem.

◆ getApplicationIcons()

QList< PackageItem::ApplicationIconDetails > getApplicationIcons ( ) const
overridevirtual
Returns
A list of ApplicationIconDetails objects describing the set of application icons provided by this package item. Only those icons needed by ExecutableDetails objects in the package need to be present in this list. Other icons used by the package internally do not need to be included in the list.

The default implementation returns an empty list.

Reimplemented from PackageItem.

◆ getExecutables()

QList< PackageItem::ExecutableDetails > getExecutables ( ) const
overridevirtual
Returns
A list of ExecutableDetails objects describing the set of executables provided by this package item. Only those executables for which a desktop menu entry is required need to be present in this list. Executables used by the package internally do not need to be included in the list.

The default implementation returns an empty list.

Reimplemented from PackageItem.

◆ operator=()

PackageItemContainer & operator= ( const PackageItemContainer container)