![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "steam/mobject/session/scope-path.hpp"
Sequence of nested scopes within the high-level model.
Implemented as vector of Scope elements. Providing state and relation predicates, and the ability to navigate the current location, as represented by the current leaf element of the path.
Incorporates a ref count to be utilised by ScopeLocator and QueryFocus to establish the current focus (path).
Definition at line 126 of file scope-path.hpp.
Public Types | |
| typedef _IterType | iterator |
| Iteration is always ascending from leaf to root. | |
Static Public Attributes | |
| static const ScopePath | INVALID = ScopePath(Scope()) |
| constant invalid path token. | |
Public Member Functions | |
| ~ScopePath () | |
| ScopePath () | |
| Create an empty path. | |
| ScopePath (Scope const &leaf) | |
| When creating a path to a given (leaf) scope, the complete sequence of nested scopes leading to this special scope is discovered, using the query service exposed by the session (through ScopeLocator). | |
| ScopePath (ScopePath const &) | |
| ScopePath & | operator= (ScopePath const &) |
| Copy from existing path. | |
| operator bool () const | |
| bool | isValid () const |
| a valid path consists of more than just the root element. | |
| bool | empty () const |
| an empty path doesn't even contain a root element. | |
| bool | isRoot () const |
| size_t | size () const |
| size_t | length () const |
| size_t | ref_count () const |
| operator string () const | |
| ScopePath diagnostic self display. | |
| iterator | begin () const |
| iterator | end () const |
| Scope const & | getLeaf () const |
| bool | endsAt (Scope const &) const |
| verify the scope in question is equivalent to our leaf scope. | |
| bool | contains (Scope const &) const |
| bool | contains (ScopePath const &) const |
| void | clear () |
| Scope const & | moveUp () |
| Scope const & | goRoot () |
| void | navigate (Scope const &) |
Friends | |
| ScopePath | commonPrefix (ScopePath const &, ScopePath const &) |
| bool | disjoint (ScopePath const &, ScopePath const &) |
| bool | operator== (ScopePath const &, ScopePath const &) |
| void | intrusive_ptr_add_ref (ScopePath *) |
| management function for boost::intrusive_ptr to be picked up by ADL | |
| void | intrusive_ptr_release (ScopePath *) |
Private Types | |
| typedef vector< Scope > | _VType |
| typedef _VType::const_reverse_iterator | _VIter |
| typedef lib::RangeIter< _VIter > | _IterType |
Private Member Functions | |
| bool | hasValidRoot () const |
| PlacementMO const & | currModelRoot () const |
| void | appendScope (Scope const &) |
Private Attributes | |
| size_t | refcount_ |
| std::vector< Scope > | path_ |
| ~ScopePath | ( | ) |
Definition at line 127 of file scope-path.cpp.
References ScopePath::refcount_.
| ScopePath | ( | ) |
Create an empty path.
By default, a scope path just contains the root scope of the current session (PlacementIndex).
Definition at line 74 of file scope-path.cpp.
References ScopePath::clear().
Here is the call graph for this function:When creating a path to a given (leaf) scope, the complete sequence of nested scopes leading to this special scope is discovered, using the query service exposed by the session (through ScopeLocator).
| error::Invalid | if the given target scope can't be connected to the (implicit) root |
Definition at line 92 of file scope-path.cpp.
References ScopePath::clear(), Scope::INVALID, and ScopePath::navigate().
Here is the call graph for this function:Definition at line 103 of file scope-path.cpp.
Definition at line 131 of file scope-path.hpp.
|
private |
Definition at line 132 of file scope-path.hpp.
|
private |
Definition at line 133 of file scope-path.hpp.
Iteration is always ascending from leaf to root.
Definition at line 159 of file scope-path.hpp.
Copy from existing path.
| error::Logic | when current path has nonzero refcount |
Definition at line 113 of file scope-path.cpp.
References ScopePath::path_, and ScopePath::refcount_.
|
inlineexplicit |
Definition at line 146 of file scope-path.hpp.
References ScopePath::isValid().
Here is the call graph for this function:| bool isValid | ( | ) | const |
a valid path consists of more than just the root element.
Definition at line 161 of file scope-path.cpp.
References ScopePath::hasValidRoot(), and ScopePath::length().
Referenced by ScopePath_test::checkInvalidScopeDetection(), ScopePath::clear(), ScopePath::contains(), ScopePath::operator bool(), QueryFocusStack::push(), and ScopePath_test::rootPath().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
an empty path doesn't even contain a root element.
Many operations throw when invoked on such a path. Navigating up from an root path creates an empty path.
Definition at line 256 of file scope-path.hpp.
References ScopePath::path_.
Referenced by steam::mobject::session::anonymous_namespace{scope-path.cpp}::___check_notBottom(), ScopePath_test::checkInvalidScopeDetection(), ScopePath::clear(), QueryFocusStack_test::clear(), ScopePath::contains(), ScopePath_test::invalidPath(), ScopePath::moveUp(), and ScopePath_test::rootPath().
Here is the caller graph for this function:
|
inline |
Definition at line 262 of file scope-path.hpp.
References ScopePath::path_, and ScopePath::size().
Referenced by QueryFocusStack_test::createStack().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 246 of file scope-path.hpp.
References ScopePath::path_.
Referenced by ScopePath::isRoot().
Here is the caller graph for this function:
|
inline |
Definition at line 239 of file scope-path.hpp.
References ScopePath::path_.
Referenced by ScopePath::contains(), ScopePath::hasValidRoot(), ScopePath_test::invalidPath(), ScopePath::isValid(), ScopePath::moveUp(), and ScopePath_test::rootPath().
Here is the caller graph for this function:
|
inline |
Definition at line 232 of file scope-path.hpp.
References ScopePath::refcount_.
Referenced by QueryFocusStack_test::automaticFrameHandling(), ScopePath_test::check_RefcountProtection(), QueryFocusStack_test::clear(), steam::mobject::session::test::anonymous_namespace{query-focus-test.cpp}::refs(), QueryFocusStack_test::usePushedFrame(), and QueryFocusStack_test::verify_errorHandling().
Here is the caller graph for this function:| operator string | ( | ) | const |
ScopePath diagnostic self display.
Implemented similar to a filesystem path, where the path elements are based on the self-display of the MObject attached through the respective scope top placement.
Definition at line 141 of file scope-path.cpp.
|
inline |
Definition at line 277 of file scope-path.hpp.
References ScopePath::path_.
Referenced by ScopePath_test::checkIteration(), ScopePath::contains(), ScopePath::contains(), and ScopeLocator::locate().
Here is the caller graph for this function:
|
inline |
Definition at line 283 of file scope-path.hpp.
| Scope const & getLeaf | ( | ) | const |
Definition at line 190 of file scope-path.cpp.
References ScopePath::path_.
Referenced by QueryFocusStack_test::automaticFrameHandling(), ScopePath_test::buildPath(), ScopePath_test::check_Identity_and_Copy(), QueryFocus_test::checkNavigation(), QueryFocusStack_test::clear(), ScopePath_test::clear(), ScopePath::endsAt(), ScopePath_test::navigate(), QueryFocusStack_test::usePushedFrame(), and QueryFocusStack_test::verify_errorHandling().
Here is the caller graph for this function:| bool endsAt | ( | Scope const & | aScope | ) | const |
verify the scope in question is equivalent to our leaf scope.
Equivalence of scopes means they are defined by the same scope top placement, i.e. registered with the same Placement-ID.
Definition at line 203 of file scope-path.cpp.
References ScopePath::getLeaf().
Referenced by ScopePath_test::checkRelations(), ScopePath_test::invalidPath(), and ScopePath_test::navigate().
Here is the call graph for this function:
Here is the caller graph for this function:| bool contains | ( | Scope const & | aScope | ) | const |
Definition at line 210 of file scope-path.cpp.
References ScopePath::begin(), and Scope::INVALID.
Referenced by ScopePath_test::buildPath(), ScopePath_test::check_Identity_and_Copy(), QueryFocus_test::checkNavigation(), ScopePath_test::checkRelations(), ScopePath::contains(), ScopePath_test::invalidPath(), and ScopePath_test::navigate().
Here is the call graph for this function:
Here is the caller graph for this function:| bool contains | ( | ScopePath const & | otherPath | ) | const |
Definition at line 223 of file scope-path.cpp.
References ScopePath::begin(), ScopePath::contains(), ScopePath::empty(), ScopePath::isValid(), and ScopePath::length().
Here is the call graph for this function:| void clear | ( | ) |
Definition at line 268 of file scope-path.cpp.
References ScopePath::currModelRoot(), ScopePath::empty(), ScopePath::hasValidRoot(), ScopePath::isValid(), and ScopePath::path_.
Referenced by ScopePath::ScopePath(), ScopePath::ScopePath(), and ScopePath_test::clear().
Here is the call graph for this function:
Here is the caller graph for this function:| Scope const & moveUp | ( | ) |
Definition at line 280 of file scope-path.cpp.
References ScopePath::empty(), Scope::INVALID, ScopePath::length(), and ScopePath::path_.
Referenced by ScopePath_test::check_Identity_and_Copy(), ScopePath_test::check_RefcountProtection(), ScopePath_test::checkRelations(), QueryFocusStack_test::clear(), ScopePath_test::invalidPath(), ScopePath_test::navigate(), and QueryFocusStack_test::usePushedFrame().
Here is the call graph for this function:
Here is the caller graph for this function:| Scope const & goRoot | ( | ) |
Definition at line 292 of file scope-path.cpp.
References ScopePath::hasValidRoot(), and ScopePath::path_.
Referenced by ScopePath_test::invalidPath(), ScopePath_test::navigate(), ScopePath_test::rootPath(), and QueryFocusStack_test::usePushedFrame().
Here is the call graph for this function:
Here is the caller graph for this function:| void navigate | ( | Scope const & | target | ) |
Definition at line 303 of file scope-path.cpp.
References Scope::isValid(), LERR_, and ScopePath::path_.
Referenced by ScopePath::ScopePath(), QueryFocusStack_test::automaticFrameHandling(), ScopePath_test::invalidPath(), ScopeLocator::locate(), ScopePath_test::navigate(), QueryFocusStack_test::usePushedFrame(), and QueryFocusStack_test::verify_errorHandling().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 171 of file scope-path.cpp.
References ScopePath::currModelRoot(), ScopePath::length(), and ScopePath::path_.
Referenced by ScopePath::clear(), ScopePath::goRoot(), and ScopePath::isValid().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 178 of file scope-path.cpp.
References SessionServiceExploreScope::getScopeRoot().
Referenced by ScopePath::clear(), and ScopePath::hasValidRoot().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
| child |
backdoor for commonPrefix
Definition at line 325 of file scope-path.cpp.
References ScopePath::path_.
|
private |
Definition at line 128 of file scope-path.hpp.
Referenced by ScopePath::~ScopePath(), ScopePath::operator=(), and ScopePath::ref_count().
|
private |
Definition at line 129 of file scope-path.hpp.
Referenced by ScopePath::appendScope(), ScopePath::begin(), ScopePath::clear(), ScopePath::empty(), ScopePath::getLeaf(), ScopePath::goRoot(), ScopePath::hasValidRoot(), ScopePath::isRoot(), ScopePath::length(), ScopePath::moveUp(), ScopePath::navigate(), ScopePath::operator=(), and ScopePath::size().
constant invalid path token.
Created by locating an invalid scope
Definition at line 144 of file scope-path.hpp.
Referenced by ScopePath_test::check_Identity_and_Copy(), and ScopePath_test::invalidPath().
Definition at line 241 of file scope-path.cpp.
Definition at line 253 of file scope-path.cpp.
Definition at line 199 of file scope-path.hpp.
|
friend |
management function for boost::intrusive_ptr to be picked up by ADL
Definition at line 215 of file scope-path.hpp.
|
friend |
Definition at line 222 of file scope-path.hpp.
Collaboration diagram for ScopePath: