3Depict
|
#include <state.h>
Public Member Functions | |
AnalysisState () | |
~AnalysisState () | |
void | clear () |
void | operator= (const AnalysisState &oth) |
unsigned int | getStateModifyLevel () const |
void | setStateModifyLevel (unsigned int newLevel) |
bool | load (const char *cpFilename, bool merge, std::ostream &errStream) |
bool | save (const char *cpFilename, std::map< std::string, std::string > &fileMapping, bool writePackage, bool setModifyLevel=true) |
void | merge (const AnalysisState &srcState) |
std::string | getFilename () const |
void | setFilename (std::string &s) |
int | getWorldAxisMode () const |
void | getBackgroundColour (float &r, float &g, float &b) const |
void | setBackgroundColour (float r, float g, float b) |
void | setWorldAxisMode (unsigned int mode) |
void | setCamerasByCopy (std::vector< Camera *> &c, unsigned int active) |
void | setCameraByClone (const Camera *c, unsigned int offset) |
size_t | getActiveCam () const |
void | setActiveCam (size_t offset) |
void | removeCam (size_t offset) |
const Camera * | getCam (size_t offset) const |
void | copyCams (std::vector< Camera *> &cams) const |
void | copyCamsByRef (std::vector< const Camera *> &cams) const |
size_t | getNumCams () const |
void | addCamByClone (const Camera *c) |
bool | setCamProperty (size_t offset, unsigned int key, const std::string &value) |
std::string | getCamName (size_t offset) const |
void | addCam (const std::string &camName, bool makeActive=false) |
Add a new camera to the scene. More... | |
void | setEffectsByCopy (const std::vector< const Effect *> &e) |
void | copyEffects (std::vector< Effect *> &effects) const |
void | setPlotLegend (bool enabled) |
void | setEnabledPlots (const std::vector< std::pair< std::string, unsigned int > > &enabledPlots) |
void | getEnabledPlots (std::vector< std::pair< std::string, unsigned int > > &enabledPlots) const |
void | setUseRelPaths (bool useRel) |
bool | getUseRelPaths () const |
void | setWorkingDir (const std::string &work) |
std::string | getWorkingDir () const |
void | setStashedTreesByClone (const std::vector< std::pair< std::string, FilterTree > > &s) |
Set the stashed filters to use internally. More... | |
void | addStashedTree (const std::pair< std::string, FilterTree > &) |
void | stashFilters (unsigned int filterId, const char *stashName) |
Transform the subtree at the given point into a stash, and save it. More... | |
void | copyStashedTree (size_t offset, std::pair< std::string, FilterTree > &) const |
void | copyStashedTree (size_t offset, FilterTree &) const |
void | copyStashedTrees (std::vector< std::pair< std::string, FilterTree > > &stashList) const |
void | addStashedToFilters (const Filter *parentFilter, unsigned int stashOffset) |
Insert the given stash into the tree as a child of the given parent filter. More... | |
void | eraseStash (size_t offset) |
void | eraseStashes (std::vector< size_t > &offset) |
size_t | getStashCount () const |
std::string | getStashName (size_t offset) const |
bool | hasStateData () const |
bool | hasStateOverrides () const |
Returns true if any of the filters (incl. stash) More... | |
void | setAnimationState (const PropertyAnimator &p, const std::vector< std::pair< std::string, size_t > > &animPth) |
void | getAnimationState (PropertyAnimator &p, std::vector< std::pair< std::string, size_t > > &animPth) const |
Static Public Member Functions | |
static unsigned int | getStateWriterVersion () |
Public Attributes | |
TreeState | treeState |
AnalysisState::AnalysisState | ( | ) |
References STATE_MODIFIED_NONE.
AnalysisState::~AnalysisState | ( | ) |
References clear().
void AnalysisState::addCam | ( | const std::string & | camName, |
bool | makeActive = false |
||
) |
Add a new camera to the scene.
References ASSERT, Camera::clone(), getActiveCam(), getCam(), setStateModifyLevel(), Camera::setUserString(), and STATE_MODIFIED_ANCILLARY.
void AnalysisState::addCamByClone | ( | const Camera * | c | ) |
References Camera::clone(), setStateModifyLevel(), and STATE_MODIFIED_ANCILLARY.
void AnalysisState::addStashedToFilters | ( | const Filter * | parentFilter, |
unsigned int | stashOffset | ||
) |
Insert the given stash into the tree as a child of the given parent filter.
References TreeState::addFilterTree(), copyStashedTree(), TreeState::getIdByFilter(), TreeState::pushUndoStack(), and treeState.
void AnalysisState::addStashedTree | ( | const std::pair< std::string, FilterTree > & | ) |
References setStateModifyLevel(), and STATE_MODIFIED_ANCILLARY.
Referenced by TreeState::resetModifyLevel(), and stashFilters().
void AnalysisState::clear | ( | ) |
References TreeState::clear(), setStateModifyLevel(), TreeState::size(), STATE_MODIFIED_DATA, and treeState.
Referenced by operator=(), TreeState::resetModifyLevel(), save(), and ~AnalysisState().
void AnalysisState::copyCamsByRef | ( | std::vector< const Camera *> & | cams | ) | const |
void AnalysisState::copyEffects | ( | std::vector< Effect *> & | effects | ) | const |
void AnalysisState::copyStashedTree | ( | size_t | offset, |
std::pair< std::string, FilterTree > & | |||
) | const |
Referenced by addStashedToFilters(), copyStashedTrees(), StashDialog::OnTreeSelChange(), and TreeState::resetModifyLevel().
void AnalysisState::copyStashedTree | ( | size_t | offset, |
FilterTree & | s | ||
) | const |
void AnalysisState::copyStashedTrees | ( | std::vector< std::pair< std::string, FilterTree > > & | stashList | ) | const |
References copyStashedTree().
void AnalysisState::eraseStash | ( | size_t | offset | ) |
References ASSERT, setStateModifyLevel(), and STATE_MODIFIED_ANCILLARY.
Referenced by StashDialog::OnListKeyDown().
void AnalysisState::eraseStashes | ( | std::vector< size_t > & | offset | ) |
References ASSERT, setStateModifyLevel(), and STATE_MODIFIED_ANCILLARY.
Referenced by StashDialog::OnBtnRemove().
|
inline |
void AnalysisState::getAnimationState | ( | PropertyAnimator & | p, |
std::vector< std::pair< std::string, size_t > > & | animPth | ||
) | const |
void AnalysisState::getBackgroundColour | ( | float & | r, |
float & | g, | ||
float & | b | ||
) | const |
const Camera * AnalysisState::getCam | ( | size_t | offset | ) | const |
std::string AnalysisState::getCamName | ( | size_t | offset | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by StashDialog::OnTreeSelChange(), and TreeState::resetModifyLevel().
std::string AnalysisState::getStashName | ( | size_t | offset | ) | const |
References ASSERT.
unsigned int AnalysisState::getStateModifyLevel | ( | ) | const |
References ASSERT, TreeState::getModifyLevel(), STATE_MODIFIED_ENUM_END, and treeState.
|
static |
bool AnalysisState::getUseRelPaths | ( | ) | const |
|
inline |
int AnalysisState::getWorldAxisMode | ( | ) | const |
|
inline |
References TreeState::hasStateOverrides(), and TreeState::size().
bool AnalysisState::hasStateOverrides | ( | ) | const |
Returns true if any of the filters (incl. stash)
References TreeState::hasStateOverrides(), and treeState.
bool AnalysisState::load | ( | const char * | cpFilename, |
bool | merge, | ||
std::ostream & | errStream | ||
) |
Referenced by threeDepictApp::OnCmdLineParsed(), TreeState::resetModifyLevel(), and save().
void AnalysisState::merge | ( | const AnalysisState & | srcState | ) |
References TreeState::addFilterTree(), TreeState::clearUndoRedoStacks(), TreeState::getTreeRef(), hasFirstInPairVec(), setStateModifyLevel(), FilterTree::size(), STATE_MODIFIED_DATA, TRANS, treeState, and WARN.
Referenced by save().
void AnalysisState::operator= | ( | const AnalysisState & | oth | ) |
void AnalysisState::removeCam | ( | size_t | offset | ) |
References ASSERT, setStateModifyLevel(), and STATE_MODIFIED_ANCILLARY.
bool AnalysisState::save | ( | const char * | cpFilename, |
std::map< std::string, std::string > & | fileMapping, | ||
bool | writePackage, | ||
bool | setModifyLevel = true |
||
) |
References ASSERT, boolStrEnc(), FilterTree::clear(), clear(), escapeXML(), PropertyAnimator::getMaxFrame(), getMaxVerStr(), TreeState::getTreeRef(), load(), PropertyAnimator::loadState(), FilterTree::loadXML(), makeEffect(), merge(), NTRANS, onlyDir(), parseVersion(), plotID(), PROGRAM_VERSION, TreeState::resetModifyLevel(), FilterTree::saveXML(), setStateModifyLevel(), FilterTree::size(), STATE_FORMAT_XML, STATE_MODIFIED_NONE, stream_cast(), TreeState::swapFilterTree(), tabs(), TRANS, treeState, unescapeXML(), PropertyAnimator::writeState(), XMLGetAttrib(), XMLGetNextElemAttrib(), XMLHelpFwdToElem(), XMLHelpGetProp(), and XMLHelpNextType().
Referenced by TreeState::resetModifyLevel().
|
inline |
References ASSERT.
|
inline |
void AnalysisState::setBackgroundColour | ( | float | r, |
float | g, | ||
float | b | ||
) |
References setStateModifyLevel(), and STATE_MODIFIED_VIEW.
Referenced by TreeState::resetModifyLevel().
void AnalysisState::setCameraByClone | ( | const Camera * | c, |
unsigned int | offset | ||
) |
References ASSERT, Camera::clone(), setStateModifyLevel(), STATE_MODIFIED_ANCILLARY, and STATE_MODIFIED_VIEW.
void AnalysisState::setCamerasByCopy | ( | std::vector< Camera *> & | c, |
unsigned int | active | ||
) |
References setStateModifyLevel(), and STATE_MODIFIED_DATA.
bool AnalysisState::setCamProperty | ( | size_t | offset, |
unsigned int | key, | ||
const std::string & | value | ||
) |
References setStateModifyLevel(), STATE_MODIFIED_ANCILLARY, and STATE_MODIFIED_VIEW.
void AnalysisState::setEffectsByCopy | ( | const std::vector< const Effect *> & | e | ) |
References setStateModifyLevel(), and STATE_MODIFIED_VIEW.
|
inline |
|
inline |
|
inline |
void AnalysisState::setStashedTreesByClone | ( | const std::vector< std::pair< std::string, FilterTree > > & | s | ) |
Set the stashed filters to use internally.
References setStateModifyLevel(), and STATE_MODIFIED_ANCILLARY.
void AnalysisState::setStateModifyLevel | ( | unsigned int | newLevel | ) |
Referenced by addCam(), addCamByClone(), addStashedTree(), clear(), eraseStash(), eraseStashes(), merge(), removeCam(), save(), setBackgroundColour(), setCameraByClone(), setCamerasByCopy(), setCamProperty(), setEffectsByCopy(), setStashedTreesByClone(), setWorkingDir(), and setWorldAxisMode().
void AnalysisState::setUseRelPaths | ( | bool | useRel | ) |
void AnalysisState::setWorkingDir | ( | const std::string & | work | ) |
References setStateModifyLevel(), and STATE_MODIFIED_DATA.
void AnalysisState::setWorldAxisMode | ( | unsigned int | mode | ) |
References setStateModifyLevel(), and STATE_MODIFIED_VIEW.
Referenced by TreeState::resetModifyLevel().
void AnalysisState::stashFilters | ( | unsigned int | filterId, |
const char * | stashName | ||
) |
Transform the subtree at the given point into a stash, and save it.
References addStashedTree(), FilterTree::cloneSubtree(), TreeState::getFilterById(), TreeState::getTreeRef(), and treeState.
TreeState AnalysisState::treeState |
Referenced by addStashedToFilters(), VisController::applyBindingsToTree(), Scene::applyDevice(), clear(), Scene::drawOverlays(), VisController::getSelectionDevices(), getStateModifyLevel(), hasStateOverrides(), merge(), threeDepictApp::OnCmdLineParsed(), operator=(), TreeState::resetModifyLevel(), save(), and stashFilters().