11 return res->isSingle();
20 return res->isMultiple();
33 return res->isExist(resInstId);
42 return res->instCount();
49 return std::vector<ID_T>();
51 return res->instIds();
60 return res->newInstId();
69 if (!res->remove(resInstId))
return false;
80 if (!res->clear())
return false;
94 auto finder = [&resId](
const Resource &res) ->
bool {
return res.
getId() == resId; };
95 auto res = std::find_if(_resources.begin(), _resources.end(), finder);
96 return res != _resources.end()? &(*res) : NULL;
#define WPP_LOGW(TAG, FMT,...)
void setupResources(const std::vector< Resource > &resources)
This methods setup resources list.
Resource * resource(ID_T resId)
This method return resource ptr if it exists. If resources does not exist then return NULL.
std::vector< ID_T > instIds(ID_T resId)
Returns vector with available ids of resource instances.
std::vector< Resource > & resources()
This method return list with all resources that has been defined.
size_t instCount(ID_T resId)
Get the number of resource instances.
virtual void resourceOperationNotifier(ItemOp::TYPE type, ID_T resId, ID_T resInstId)=0
This method must be implemented by the derived class, and handle information about resource operation...
bool removeRes(ID_T resId, ID_T resInstId)
Remove resource instance if resource is MULTIPLE and instance exists, if the resource is SINGLE remov...
bool clearRes(ID_T resId)
Remove all instances.
bool isMultiple(ID_T resId)
Check if the resource is MULTIPLE.
ID_T newInstId(ID_T resId)
Find first available instance ID that is not used.
bool isExist(ID_T resId)
Check if the instance ID is exist.
bool isSingle(ID_T resId)
Check if the resource is SINGLE.
The Resource class in the wpp namespace is a comprehensive and flexible class designed to handle diff...
The WppConnection class represents a connection interface for the Wpp library.