3Depict
|
#include <state.h>
Public Member Functions | |
TreeState () | |
void | operator= (const TreeState &otherState) |
unsigned int | refresh (std::list< FILTER_OUTPUT_DATA > &outData, std::vector< std::pair< const Filter *, std::string > > &consoleMessages, ProgressData &prog) |
void | setAbort () |
bool | isRefreshing () const |
void | setUpdates () |
Inform that it has new updates to filters from external sources (eg bindings) More... | |
bool | hasUpdates () const |
Returns true if the filter tree has updates that need to be processed. More... | |
bool | hasMonitorUpdates () const |
Returns true if the filter tree has updates via a filter monitor. More... | |
void | cloneFilterTree (FilterTree &f) const |
const FilterTree & | getTreeRef () const |
void | addFilter (Filter *f, size_t parentId=(size_t) -1) |
Add a new filter to the tree. parentID == -1 for not. More... | |
void | addFilterTree (FilterTree &f, size_t parentId=(size_t) -1) |
Add a new subtree to the tree, optionally specifying a parent filter. More... | |
void | switchoutFilterTree (FilterTree &f) |
Grab the filter tree from the internal one, and swap the. More... | |
void | swapFilterTree (FilterTree &f) |
void | swapFilterMap (std::map< size_t, Filter *> &m) |
bool | copyFilter (size_t toCopy, size_t newParent, bool copyToRoot=false) |
Duplicate a branch of the tree to a new position. Do not copy cache,. More... | |
size_t | getIdByFilter (const Filter *f) const |
const Filter * | getFilterById (size_t filterId) const |
void | getFiltersByType (std::vector< const Filter *> &filters, unsigned int type) const |
Return all of a given type of filter from the filter tree. Type must be the exact type of filter - it is not a mask. More... | |
void | purgeFilterCache () |
Clear the cache for the filters. More... | |
void | removeFilterSubtree (size_t filterId) |
Delete a filter and all its children. More... | |
bool | reparentFilter (size_t filterID, size_t newParentID) |
bool | respliceFilter (size_t filterID, size_t newParentID) |
bool | setFilterProperty (size_t filterId, unsigned int key, const std::string &value, bool &needUpdate) |
Set the properties using a key-value result. More... | |
void | setFilterString (size_t id, const std::string &s) |
Set the filter's string. More... | |
void | modifyRangeFiles (const std::map< const RangeFile *, const RangeFile *> &toModify) |
void | clearCache () |
Clear all caches. More... | |
void | clearCacheByType (unsigned int type) |
Clear all caches. More... | |
void | clear () |
size_t | size () const |
void | pushUndoStack () |
void | popUndoStack (bool restorePopped=true) |
void | popRedoStack () |
size_t | getUndoSize () const |
size_t | getRedoSize () const |
void | clearUndoRedoStacks () |
void | stripHazardousContents () |
void | applyBindingsToTree () |
Apply external filter modifications that have been changed due to bindings. More... | |
void | getAnalysisResults (std::vector< FILTERTREE_ERR > &res) const |
Get the analysis results for the last refresh. More... | |
void | setCachePercent (unsigned int newCache) |
Set the cache maximum ram usage (0->100) More... | |
bool | hasStateOverrides () const |
std::vector< SelectionDevice * > & | getSelectionDevices () |
void | elevateModifyLevel (unsigned int newLevel) |
unsigned int | getModifyLevel () const |
void | resetModifyLevel () |
TreeState::TreeState | ( | ) |
References STATE_MODIFIED_NONE.
void TreeState::addFilter | ( | Filter * | f, |
size_t | parentId = (size_t)-1 |
||
) |
Add a new filter to the tree. parentID == -1 for not.
Referenced by getTreeRef().
void TreeState::addFilterTree | ( | FilterTree & | f, |
size_t | parentId = (size_t)-1 |
||
) |
Add a new subtree to the tree, optionally specifying a parent filter.
References ASSERT.
Referenced by AnalysisState::addStashedToFilters(), getTreeRef(), and AnalysisState::merge().
void TreeState::applyBindingsToTree | ( | ) |
Apply external filter modifications that have been changed due to bindings.
References STATE_MODIFIED_DATA.
Referenced by VisController::applyBindingsToTree(), and stripHazardousContents().
|
inline |
References FilterTreeAnalyse::clear(), and FilterTree::clear().
Referenced by AnalysisState::clear().
void TreeState::clearCache | ( | ) |
|
inline |
Clear all caches.
References FilterTree::clearCacheByType().
|
inline |
|
inline |
bool TreeState::copyFilter | ( | size_t | toCopy, |
size_t | newParent, | ||
bool | copyToRoot = false |
||
) |
Duplicate a branch of the tree to a new position. Do not copy cache,.
Referenced by swapFilterMap().
void TreeState::elevateModifyLevel | ( | unsigned int | newLevel | ) |
|
inline |
Get the analysis results for the last refresh.
References FilterTreeAnalyse::getAnalysisResults(), and setCachePercent().
const Filter * TreeState::getFilterById | ( | size_t | filterId | ) | const |
References ASSERT.
Referenced by AnalysisState::stashFilters(), and swapFilterMap().
void TreeState::getFiltersByType | ( | std::vector< const Filter *> & | filters, |
unsigned int | type | ||
) | const |
Return all of a given type of filter from the filter tree. Type must be the exact type of filter - it is not a mask.
Referenced by swapFilterMap().
size_t TreeState::getIdByFilter | ( | const Filter * | f | ) | const |
References ASSERT.
Referenced by AnalysisState::addStashedToFilters(), and swapFilterMap().
unsigned int TreeState::getModifyLevel | ( | ) | const |
References ASSERT, and STATE_MODIFIED_ENUM_END.
Referenced by getSelectionDevices(), and AnalysisState::getStateModifyLevel().
|
inline |
|
inline |
References elevateModifyLevel(), getModifyLevel(), and resetModifyLevel().
Referenced by VisController::getSelectionDevices().
|
inline |
References addFilter(), addFilterTree(), and switchoutFilterTree().
Referenced by AnalysisState::merge(), AnalysisState::save(), and AnalysisState::stashFilters().
|
inline |
bool TreeState::hasMonitorUpdates | ( | ) | const |
Returns true if the filter tree has updates via a filter monitor.
Referenced by setUpdates().
|
inline |
References FilterTree::hasStateOverrides().
Referenced by AnalysisState::hasStateData(), and AnalysisState::hasStateOverrides().
bool TreeState::hasUpdates | ( | ) | const |
Returns true if the filter tree has updates that need to be processed.
Referenced by setUpdates().
|
inline |
References FilterTree::isRefreshing().
Referenced by Scene::applyDevice(), and Scene::drawOverlays().
|
inline |
References clearCache(), and FilterTree::modifyRangeFiles().
void TreeState::popRedoStack | ( | ) |
References ASSERT, MAX_UNDO_SIZE, and STATE_MODIFIED_DATA.
Referenced by size().
void TreeState::popUndoStack | ( | bool | restorePopped = true | ) |
References ASSERT, MAX_UNDO_SIZE, and STATE_MODIFIED_DATA.
Referenced by size().
|
inline |
Clear the cache for the filters.
References FilterTree::purgeCache(), removeFilterSubtree(), reparentFilter(), respliceFilter(), setFilterProperty(), and setFilterString().
void TreeState::pushUndoStack | ( | ) |
References MAX_UNDO_SIZE.
Referenced by AnalysisState::addStashedToFilters(), and size().
unsigned int TreeState::refresh | ( | std::list< FILTER_OUTPUT_DATA > & | outData, |
std::vector< std::pair< const Filter *, std::string > > & | consoleMessages, | ||
ProgressData & | prog | ||
) |
References ASSERT, and ProgressData::reset().
Referenced by RefreshController::refresh().
void TreeState::removeFilterSubtree | ( | size_t | filterId | ) |
Delete a filter and all its children.
Referenced by purgeFilterCache().
bool TreeState::reparentFilter | ( | size_t | filterID, |
size_t | newParentID | ||
) |
void TreeState::resetModifyLevel | ( | ) |
References FilterTree::addFilter(), AnalysisState::addStashedTree(), ASSERT, AnalysisState::clear(), AnalysisState::copyStashedTree(), genRandomFilename(), AnalysisState::getStashCount(), AnalysisState::load(), rmFile(), AnalysisState::save(), AnalysisState::setBackgroundColour(), AnalysisState::setWorldAxisMode(), FilterTree::size(), STATE_MODIFIED_NONE, swapFilterTree(), TEST, AnalysisState::treeState, and WARN.
Referenced by getSelectionDevices(), and AnalysisState::save().
bool TreeState::respliceFilter | ( | size_t | filterID, |
size_t | newParentID | ||
) |
|
inline |
void TreeState::setCachePercent | ( | unsigned int | newCache | ) |
Set the cache maximum ram usage (0->100)
Referenced by getAnalysisResults().
bool TreeState::setFilterProperty | ( | size_t | filterId, |
unsigned int | key, | ||
const std::string & | value, | ||
bool & | needUpdate | ||
) |
Set the properties using a key-value result.
References STATE_MODIFIED_DATA.
Referenced by purgeFilterCache().
void TreeState::setFilterString | ( | size_t | id, |
const std::string & | s | ||
) |
Set the filter's string.
References Filter::setUserString().
Referenced by purgeFilterCache().
|
inline |
Inform that it has new updates to filters from external sources (eg bindings)
References hasMonitorUpdates(), and hasUpdates().
Referenced by Scene::applyDevice().
|
inline |
References popRedoStack(), popUndoStack(), pushUndoStack(), and FilterTree::size().
Referenced by AnalysisState::clear(), and AnalysisState::hasStateData().
|
inline |
References applyBindingsToTree(), and FilterTree::stripHazardousContents().
|
inline |
References copyFilter(), getFilterById(), getFiltersByType(), and getIdByFilter().
|
inline |
References FilterTree::swap().
Referenced by resetModifyLevel(), and AnalysisState::save().
void TreeState::switchoutFilterTree | ( | FilterTree & | f | ) |
Grab the filter tree from the internal one, and swap the.
References ASSERT, FilterTree::depthBegin(), FilterTree::depthEnd(), and FilterTree::swap().
Referenced by getTreeRef().