MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetAllChildrenCount

Method GetAllChildrenCount

lib/icinga/checkable-dependency.cpp:254–260  ·  view source on GitHub ↗

* Retrieve the total number of all the children of the current Checkable. * * Note, due to the max recursion limit of 256, the returned number may not reflect * the actual total number of children involved in the dependency chain. * * @return int - Returns the total number of all the children of the current Checkable. */

Source from the content-addressed store, hash-verified

252 * @return int - Returns the total number of all the children of the current Checkable.
253 */
254size_t Checkable::GetAllChildrenCount() const
255{
256 // Are you thinking in making this more efficient? Please, don't.
257 // In order not to count the same child multiple times, we need to maintain a separate set of visited children,
258 // which is basically the same as what GetAllChildren() does. So, we're using it here!
259 return GetAllChildren().size();
260}
261
262std::set<Checkable::Ptr> Checkable::GetAllChildren() const
263{

Callers 1

PrepareObjectMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected