Ating for MQL5
Loading...
Searching...
No Matches
TimeLapseTree Class Reference

Tree structure to manage time lapses. More...

Public Member Functions

 TimeLapseTree ()
 Constructor for TimeLapseTree.
 
 ~TimeLapseTree ()
 Destructor for TimeLapseTree.
 
void Insert (int id, datetime start, datetime end)
 Inserts a new node into the tree.
 
void Insert (TimeLapseTreeNode *newNode)
 Inserts an existing node into the tree.
 
bool UpdateNode (int id, int newStart, int newEnd)
 Updates an existing node's time range.
 
bool UpdateNode (TimeLapseTreeNode *newNode)
 Updates an existing node with a new node's details.
 
void TraverseInorder ()
 Traverses the tree in-order.
 
TimeLapseTreeNodeGetNode (int id)
 Gets a node by its identifier.
 
void GetNodesInRange (CArrayObj *&result, datetime dt)
 Gets nodes within a specified time range.
 
void GetNodesByIdentifierCArr (CArrayObj &result, CArrayInt &identifiers)
 Gets nodes by their identifiers using CArrayInt.
 
void GetNodesByIdentifierArr (CArrayObj &result, int &identifiers[])
 Gets nodes by their identifiers using a native array.
 
void GetIdentifierInRange (CArrayInt &result, datetime dt)
 Gets identifiers of nodes within a specified time range using CArrayInt.
 
void GetIdentifierInRange (int &result[], datetime dt)
 Gets identifiers of nodes within a specified time range using a native array.
 
void GetAllIdentifiers (CArrayInt &result)
 Gets all identifiers in the tree using CArrayInt.
 
void GetAllIdentifiers (int &result[])
 Gets all identifiers in the tree using a native array.
 

Detailed Description

Tree structure to manage time lapses.

Constructor & Destructor Documentation

◆ TimeLapseTree()

TimeLapseTree::TimeLapseTree ( )

Constructor for TimeLapseTree.

◆ ~TimeLapseTree()

TimeLapseTree::~TimeLapseTree ( )

Destructor for TimeLapseTree.

Member Function Documentation

◆ GetAllIdentifiers() [1/2]

void TimeLapseTree::GetAllIdentifiers ( CArrayInt & result)

Gets all identifiers in the tree using CArrayInt.

Parameters
resultArray to store the identifiers

◆ GetAllIdentifiers() [2/2]

void TimeLapseTree::GetAllIdentifiers ( int & result[])

Gets all identifiers in the tree using a native array.

Parameters
resultArray to store the identifiers

◆ GetIdentifierInRange() [1/2]

void TimeLapseTree::GetIdentifierInRange ( CArrayInt & result,
datetime dt )

Gets identifiers of nodes within a specified time range using CArrayInt.

Parameters
resultArray to store the identifiers
dtTime to check within the range

◆ GetIdentifierInRange() [2/2]

void TimeLapseTree::GetIdentifierInRange ( int & result[],
datetime dt )

Gets identifiers of nodes within a specified time range using a native array.

Parameters
resultArray to store the identifiers
dtTime to check within the range

◆ GetNode()

TimeLapseTreeNode * TimeLapseTree::GetNode ( int id)

Gets a node by its identifier.

Parameters
idNode identifier
Returns
Pointer to the found node

◆ GetNodesByIdentifierArr()

void TimeLapseTree::GetNodesByIdentifierArr ( CArrayObj & result,
int & identifiers[] )

Gets nodes by their identifiers using a native array.

Parameters
resultArray to store the result nodes
identifiersArray of identifiers

◆ GetNodesByIdentifierCArr()

void TimeLapseTree::GetNodesByIdentifierCArr ( CArrayObj & result,
CArrayInt & identifiers )

Gets nodes by their identifiers using CArrayInt.

Parameters
resultArray to store the result nodes
identifiersArray of identifiers

◆ GetNodesInRange()

void TimeLapseTree::GetNodesInRange ( CArrayObj *& result,
datetime dt )

Gets nodes within a specified time range.

Parameters
resultPointer to the array to store the result nodes
dtTime to check within the range

◆ Insert() [1/2]

void TimeLapseTree::Insert ( int id,
datetime start,
datetime end )

Inserts a new node into the tree.

Parameters
idNode identifier
startStart time of the time lapse
endEnd time of the time lapse

◆ Insert() [2/2]

void TimeLapseTree::Insert ( TimeLapseTreeNode * newNode)

Inserts an existing node into the tree.

Parameters
newNodePointer to the new node

◆ TraverseInorder()

void TimeLapseTree::TraverseInorder ( )

Traverses the tree in-order.

◆ UpdateNode() [1/2]

bool TimeLapseTree::UpdateNode ( int id,
int newStart,
int newEnd )

Updates an existing node's time range.

Parameters
idNode identifier
newStartNew start time
newEndNew end time
Returns
True if the update was successful

◆ UpdateNode() [2/2]

bool TimeLapseTree::UpdateNode ( TimeLapseTreeNode * newNode)

Updates an existing node with a new node's details.

Parameters
newNodePointer to the new node
Returns
True if the update was successful

The documentation for this class was generated from the following file: