lookupAccumulator Member Function
Creates an Accumulator object for an Event object of the Listener. This function creates an Accumulator object only when that object does not exist. If the object exists, the existing object is returned.
Attention: The application
does not call delete on any objects that are returned by this function.
Syntax
Accumulator *lookupAccumulator(const char *accumulatorName);
Accumulator *lookupAccumulator(const wchar_t *accumulatorName);Parameters
- accumulatorName
- [in] Required pointer to a string, which provides the name of the Accumulator object. The string consists of UTF-8 or Unicode characters, which can contain any printable characters, excluding the newline character.
Example
Listener *listener = new Listener("sampleApp", "4.0", NULL, false);
Container *store = listener->lookupContainer("storeName");
Event *creations = store->lookupEvent("document creations");
Accumulator *numCreations = creations->lookupAccumulator("number of document creations");
...