openDAQ
Open data acquisition platform
GenericFolderPtr< InterfaceType > Class Template Reference

Acts as a container for other components. More...

Detailed Description

template<typename InterfaceType>
class GenericFolderPtr< InterfaceType >

Acts as a container for other components.

Other components use the folder component to organize the children components, such as channels, signals, function blocks, etc.

Public Member Functions

daq::ListPtr< daq::IComponent > getItems (const daq::SearchFilterPtr &searchFilter=nullptr) const
 Gets the list of the items in the folder. More...
 
daq::Bool isEmpty () const
 Returns True if the folder is empty. More...
 
daq::Bool hasItem (const daq::StringPtr &localId) const
 Returns True if the folder has an item with local ID. More...
 
daq::GenericComponentPtr< daq::IComponent > getItem (const daq::StringPtr &localId) const
 Gets the item component with the specified localId. More...
 

Member Function Documentation

◆ getItem()

daq::GenericComponentPtr<daq::IComponent> getItem ( const daq::StringPtr &  localId) const
inline

Gets the item component with the specified localId.

Parameters
localIdThe local id of the child component.
Returns
The item component.
Return values
OPENDAQ_SUCCESSif succeeded.
OPENDAQ_NOT_FOUNDif folder with the specified ID not found.

◆ getItems()

daq::ListPtr<daq::IComponent> getItems ( const daq::SearchFilterPtr &  searchFilter = nullptr) const
inline

Gets the list of the items in the folder.

Parameters
searchFilterProvides an optional filter that filters out unwanted components and allows for recursion.
Returns
The list of the items.

If searchFilter is not provided, the returned list contains only immediate children with visible set to true.

◆ hasItem()

daq::Bool hasItem ( const daq::StringPtr &  localId) const
inline

Returns True if the folder has an item with local ID.

Parameters
localIdThe local ID of the item.
Returns
True if the folder contains item with local ID.

◆ isEmpty()

daq::Bool isEmpty ( ) const
inline

Returns True if the folder is empty.

Returns
True if the folder is empty.