Mantid
|
This class wraps an algorithm history pointer to add additional functionality when creating a HistoryView. More...
#include <HistoryView.h>
Public Member Functions | |
void | filterBetweenExecDate (Mantid::Types::Core::DateAndTime start, Mantid::Types::Core::DateAndTime end=Mantid::Types::Core::DateAndTime::getCurrentTime()) |
Filter the list of history items to remove any anlgorithms whos start time is outside of the given range. More... | |
const std::vector< HistoryItem > & | getAlgorithmsList () const |
Get the list of History Items for this view. More... | |
HistoryView (const WorkspaceHistory &wsHist) | |
void | roll (size_t index) |
Roll an unrolled algorithm history item and remove its children from the view. More... | |
void | rollAll () |
Roll the entire algorithm history back up. More... | |
size_t | size () const |
void | unroll (size_t index) |
Unroll an algorithm history to export its child algorithms. More... | |
void | unrollAll () |
Unroll the entire algorithm history. More... | |
virtual | ~HistoryView ()=default |
Private Member Functions | |
void | roll (std::vector< HistoryItem >::iterator &it) |
Roll an unrolled algorithm history item and remove its children from the view. More... | |
void | rollChildren (std::vector< HistoryItem >::iterator it) |
Check if our children are unrolled and if so roll them back up. More... | |
void | unroll (std::vector< HistoryItem >::iterator &it) |
Unroll an algorithm history to export its child algorithms. More... | |
Private Attributes | |
std::vector< HistoryItem > | m_historyItems |
const WorkspaceHistory | m_wsHist |
This class wraps an algorithm history pointer to add additional functionality when creating a HistoryView.
This class builds a view of the algorithm history by "unrolling" parent algorithms.
Definition at line 32 of file HistoryView.h.
Mantid::API::HistoryView::HistoryView | ( | const WorkspaceHistory & | wsHist | ) |
Definition at line 16 of file HistoryView.cpp.
References Mantid::API::WorkspaceHistory::getAlgorithmHistories(), and m_historyItems.
|
virtualdefault |
void Mantid::API::HistoryView::filterBetweenExecDate | ( | Mantid::Types::Core::DateAndTime | start, |
Mantid::Types::Core::DateAndTime | end = Mantid::Types::Core::DateAndTime::getCurrentTime() |
||
) |
Filter the list of history items to remove any anlgorithms whos start time is outside of the given range.
start | Start of time range |
end | End of time range |
Definition at line 183 of file HistoryView.cpp.
References m_historyItems.
|
inline |
Get the list of History Items for this view.
Definition at line 47 of file HistoryView.h.
void Mantid::API::HistoryView::roll | ( | size_t | index | ) |
Roll an unrolled algorithm history item and remove its children from the view.
This removes each of the child algorithm histories (if any) and marks the parent as being "rolled up". Note that this will recursively "roll up" any child history objects that are also unrolled. This method does nothing if the history object has no children.
index | :: index of the history object to unroll |
std::out_of_range | if the index is larger than the number of history items. |
Definition at line 120 of file HistoryView.cpp.
References index, m_historyItems, and roll().
Referenced by roll(), rollAll(), and rollChildren().
|
private |
Roll an unrolled algorithm history item and remove its children from the view.
This removes each of the child algorithm histories (if any) and marks the parent as being "rolled up". Note that this will recursively "roll up" any child history objects that are also unrolled. This method does nothing if the history object has no children.
it | :: iterator to the list of history item objects at the positon to roll |
Definition at line 161 of file HistoryView.cpp.
References m_historyItems, and rollChildren().
void Mantid::API::HistoryView::rollAll | ( | ) |
Roll the entire algorithm history back up.
This is method will roll up the entire history for every algorithm by calling roll on each element in the list. Only top level algorithms with be visible after calling this method.
Definition at line 98 of file HistoryView.cpp.
References m_historyItems, and roll().
|
private |
Check if our children are unrolled and if so roll them back up.
it | :: iterator pointing to the item whose children will be rolled up. |
Definition at line 136 of file HistoryView.cpp.
References roll().
Referenced by roll().
|
inline |
Definition at line 49 of file HistoryView.h.
void Mantid::API::HistoryView::unroll | ( | size_t | index | ) |
Unroll an algorithm history to export its child algorithms.
This places each of the child algorithm histories into the HistoryView object. The parent is retained as a marker so we can "roll" the history back up if we want. This method does nothing if the history object has no children
index | :: index of the history object to unroll |
std::out_of_range | if the index is larger than the number of history items. |
Definition at line 34 of file HistoryView.cpp.
References index, m_historyItems, and unroll().
Referenced by unroll(), and unrollAll().
|
private |
Unroll an algorithm history to export its child algorithms.
This places each of the child algorithm histories into the HistoryView object. The parent is retained as a marker so we can "roll" the history back up if we want. This method does nothing if the history object has no children
it | :: iterator to the list of history item objects at the position to unroll |
Definition at line 56 of file HistoryView.cpp.
References history, and m_historyItems.
void Mantid::API::HistoryView::unrollAll | ( | ) |
Unroll the entire algorithm history.
This is method will unroll the entire history for every algorithm by calling unroll on each element in the list. Every child algorithm with be visible after calling this method.
Definition at line 81 of file HistoryView.cpp.
References m_historyItems, and unroll().
|
private |
Definition at line 57 of file HistoryView.h.
Referenced by filterBetweenExecDate(), HistoryView(), roll(), rollAll(), unroll(), and unrollAll().
|
private |
Definition at line 56 of file HistoryView.h.