SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Caches the phrase visibility information for Phrases in a Phrase Model. More...
#include <GeometricVisibilityBadge.h>
Public Member Functions | |
void | update (smtk::view::DescriptivePhrase *phrase, const VisibilityState &childPreviousVisibility, const VisibilityState &childNewVisibility, bool okToCreate=true) |
Update the cache for a Phrase based on the visibility change of one of the Phrase's children. More... | |
void | update (smtk::view::DescriptivePhrase *phrase, const VisibilityState &geometricVisibility, bool isResource=false) |
Update the cache for a Phrase based on its new geometric visibility. More... | |
void | updateForRemoval (smtk::view::DescriptivePhrase *phrase, std::size_t numVisibleChildrenToBeRemoved, std::size_t numInvisibleChildrenToBeRemoved, std::size_t numNeitherChildrenToBeRemoved) |
Update the cache for a Phrase, based on the number of the Phrase's children being removed for each visibility state. | |
void | clear () |
Clear the entire cache/. | |
void | removeSubTreeVisibilities (view::DescriptivePhrase *phrase, std::map< smtk::common::UUID, int > &uuidToRepVisibility, bool isTopOfSubTree) |
Remove the cache entries for a sub-tree of Phrases. More... | |
void | removePhrase (smtk::view::DescriptivePhrase *phrase) |
Removed a Phase and all of its descendants from the cache. More... | |
void | insertNewPhrase (smtk::view::DescriptivePhrase *phrase) |
Inserts a newly inserted Descriptive Phrase into the cache. | |
std::map< smtk::view::DescriptivePhrase *, PhraseInfo > & | phraseInfos () const |
Return the cache of PhaseInfos. | |
Public Attributes | |
std::map< smtk::view::DescriptivePhrase *, PhraseInfo > | m_phraseInfos |
Caches the phrase visibility information for Phrases in a Phrase Model.
void smtk::extension::paraview::appcomponents::GeometricVisibilityBadge::PhraseCache::removePhrase | ( | smtk::view::DescriptivePhrase * | phrase | ) |
Removed a Phase and all of its descendants from the cache.
NOTE - this does not update the phase's parent's visibility! If you need to do that you should first call updateForRemoval on the parent phrase.
void smtk::extension::paraview::appcomponents::GeometricVisibilityBadge::PhraseCache::removeSubTreeVisibilities | ( | view::DescriptivePhrase * | phrase, |
std::map< smtk::common::UUID, int > & | uuidToRepVisibility, | ||
bool | isTopOfSubTree | ||
) |
Remove the cache entries for a sub-tree of Phrases.
isTopOfSubTree indicates that the Phrase represents the top of the sub-tree being removed. The Phrase that owns that phrase will have its visibility information updated.
uuidToRepVisibility is a map of Persistent Object UUID's to Representation Visibilities.
void smtk::extension::paraview::appcomponents::GeometricVisibilityBadge::PhraseCache::update | ( | smtk::view::DescriptivePhrase * | phrase, |
const VisibilityState & | childPreviousVisibility, | ||
const VisibilityState & | childNewVisibility, | ||
bool | okToCreate = true |
||
) |
Update the cache for a Phrase based on the visibility change of one of the Phrase's children.
If okToCreate is true, then if the Phrase is not already in the cache, then create a new PhraseInfo and insert it.
void smtk::extension::paraview::appcomponents::GeometricVisibilityBadge::PhraseCache::update | ( | smtk::view::DescriptivePhrase * | phrase, |
const VisibilityState & | geometricVisibility, | ||
bool | isResource = false |
||
) |
Update the cache for a Phrase based on its new geometric visibility.
If okToCreate is true, then if the Phrase is not already in the cache, then create a new PhraseInfo and insert it.