libSBML C++ API  5.20.4
ElementFilter.h File Reference

Base class of element filters. More...

Include dependency graph for ElementFilter.h:
This graph shows which files directly or indirectly include this file:

Classes

class  ElementFilter
 

Macros

#define ADD_FILTERED_ELEMENT(pResult, pSublist, element, pFilter)
 
#define ADD_FILTERED_FROM_PLUGIN(pResult, pSublist, pFilter)
 
#define ADD_FILTERED_LIST(pResult, pSublist, list, pFilter)
 
#define ADD_FILTERED_PLIST(pResult, pSublist, pList, pFilter)
 
#define ADD_FILTERED_POINTER(pResult, pSublist, pElement, pFilter)
 

Detailed Description

Base class of element filters.

Author
Frank T. Bergmann

Macro Definition Documentation

◆ ADD_FILTERED_ELEMENT

#define ADD_FILTERED_ELEMENT (   pResult,
  pSublist,
  element,
  pFilter 
)
Value:
{\
{\
if (pFilter == NULL || pFilter->filter(&element))\
pResult->add(&element);\
pSublist = element.getAllElements(pFilter);\
pResult->transferFrom(pSublist);\
delete pSublist;\
}\
}

◆ ADD_FILTERED_FROM_PLUGIN

#define ADD_FILTERED_FROM_PLUGIN (   pResult,
  pSublist,
  pFilter 
)
Value:
{\
pSublist = getAllElementsFromPlugins(pFilter);\
pResult->transferFrom(pSublist);\
delete pSublist;\
}

◆ ADD_FILTERED_LIST

#define ADD_FILTERED_LIST (   pResult,
  pSublist,
  list,
  pFilter 
)
Value:
{\
if (list.size() > 0) {\
if (pFilter == NULL || pFilter->filter(&list))\
pResult->add(&list);\
pSublist = list.getAllElements(pFilter);\
pResult->transferFrom(pSublist);\
delete pSublist;\
}\
else {\
if ((pFilter == NULL || pFilter->filter(&list)) && list.getLevel() >= 3 && list.getVersion() >= 2 && list.isExplicitlyListed())\
pResult->add(&list);\
}\
}

◆ ADD_FILTERED_PLIST

#define ADD_FILTERED_PLIST (   pResult,
  pSublist,
  pList,
  pFilter 
)
Value:
{\
if (pList != NULL && pList->size() > 0) {\
if (pFilter == NULL || pFilter->filter(pList))\
pResult->add(pList);\
pSublist = pList->getAllElements(pFilter);\
pResult->transferFrom(pSublist);\
delete pSublist;\
}\
}

◆ ADD_FILTERED_POINTER

#define ADD_FILTERED_POINTER (   pResult,
  pSublist,
  pElement,
  pFilter 
)
Value:
{\
if (pElement != NULL) {\
if (pFilter == NULL || pFilter->filter(pElement))\
pResult->add(pElement);\
pSublist = pElement->getAllElements(pFilter);\
pResult->transferFrom(pSublist);\
delete pSublist;\
}\
}