* 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. */
| 252 | * @return int - Returns the total number of all the children of the current Checkable. |
| 253 | */ |
| 254 | size_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 | |
| 262 | std::set<Checkable::Ptr> Checkable::GetAllChildren() const |
| 263 | { |