libSBML C++ API
5.20.2
|
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. It is a class used in the implementation of extra functionality provided by libSBML.
Some libSBML objects provide the ability to return lists of components. To provide callers with greater control over exactly what is returned, these methods take optional arguments in the form of filters. The ElementFilter class is the parent class for these filters.
Public Member Functions | |
ElementFilter () | |
Creates a new ElementFilter object. More... | |
virtual bool | filter (const SBase *element) |
Predicate to test elements. More... | |
void * | getUserData () |
Returns the user data that has been previously set via setUserData(). More... | |
void | setUserData (void *userData) |
Sets the user data of this element. More... | |
virtual | ~ElementFilter () |
Destroys this ElementFilter. More... | |
ElementFilter::ElementFilter | ( | ) |
Creates a new ElementFilter object.
|
virtual |
Destroys this ElementFilter.
|
virtual |
Predicate to test elements.
This is the central predicate of the ElementFilter class. In subclasses of ElementFilter, callers should implement this method such that it returns true
for element
arguments that are "desirable" and false
for those that are "undesirable" in whatever filtering context the ElementFilter subclass is designed to be used.
element | the element to be tested. |
true
if the element
is desirable or should be kept, false
otherwise. void* ElementFilter::getUserData | ( | ) |
Returns the user data that has been previously set via setUserData().
Callers can attach private data to ElementFilter objects using setUserData(). This user data can be used by an application to store custom information to be accessed by the ElementFilter in its work. In case of a deep copy, the data will passed as it is. The attribute will never be interpreted by libSBML.
NULL
if no user data has been set.void ElementFilter::setUserData | ( | void * | userData | ) |
Sets the user data of this element.
Callers can attach private data to ElementFilter objects using this method, and retrieve them using getUserData(). Such user data can be used by an application to store information to be accessed by the ElementFilter in its work. In case of a deep copy, this data will passed as it is. The attribute will never be interpreted by libSBML.
userData | specifies the new user data. |