Aspose.Tasks for C++
Aspose::Tasks::Util::TaskUtils Class Reference

Helper class which provides useful operations with tasks. More...

#include <TaskUtils.h>

Static Public Member Functions

static void Apply (const System::SharedPtr< Task > &root, const System::SharedPtr< ITreeAlgorithm< System::SharedPtr< Task >>> &alg, int32_t level)
 Applies specified algorithm to each task of a tree. More...
 
static System::SharedPtr< TaskFilter (const System::SharedPtr< Task > &root, const System::SharedPtr< ICondition< System::SharedPtr< Task >>> &cond)
 Builds new tree of tasks which satisfy the condition. More...
 
static System::SharedPtr< TaskFind (const System::SharedPtr< Task > &root, const System::SharedPtr< ICondition< System::SharedPtr< Task >>> &cond)
 Finds a task which satisfy the condition in a tree of tasks. More...
 
static int32_t TaskChildrenCount (const System::SharedPtr< Task > &task)
 Recursively calculates a number of task's children tasks through all levels. More...
 

Detailed Description

Helper class which provides useful operations with tasks.

Member Function Documentation

◆ Apply()

static void Aspose::Tasks::Util::TaskUtils::Apply ( const System::SharedPtr< Task > &  root,
const System::SharedPtr< ITreeAlgorithm< System::SharedPtr< Task >>> &  alg,
int32_t  level 
)
static

Applies specified algorithm to each task of a tree.

Parameters
rootRoot of the tree
algApplied algorithm.
levelLevel of the root task.

◆ Filter()

static System::SharedPtr<Task> Aspose::Tasks::Util::TaskUtils::Filter ( const System::SharedPtr< Task > &  root,
const System::SharedPtr< ICondition< System::SharedPtr< Task >>> &  cond 
)
static

Builds new tree of tasks which satisfy the condition.

Parameters
rootRoot of the tree.
condApplied condition.
Returns
Root of a new tree.

◆ Find()

static System::SharedPtr<Task> Aspose::Tasks::Util::TaskUtils::Find ( const System::SharedPtr< Task > &  root,
const System::SharedPtr< ICondition< System::SharedPtr< Task >>> &  cond 
)
static

Finds a task which satisfy the condition in a tree of tasks.

Parameters
rootRoot of the tree.
condApplied condition.
Returns
Task if task was found, otherwise null.

◆ TaskChildrenCount()

static int32_t Aspose::Tasks::Util::TaskUtils::TaskChildrenCount ( const System::SharedPtr< Task > &  task)
static

Recursively calculates a number of task's children tasks through all levels.

Parameters
taskThe task which children calculate.
Returns
The number of children.