59 throw error::Logic (operation_descr+
" an empty placement scope path"
60 ,
LERR_(EMPTY_SCOPE_PATH));
116 throw error::Logic (
"Attempt to overwrite a ScopePath with nonzero refcount");
118 if (!isSameObject (*
this, ref))
141 ScopePath::operator string()
const
143 if (isnil (path_))
return "!";
144 if (1 == length())
return "/";
147 vector<Scope>::const_iterator node (path_.begin());
148 while (++node != path_.end())
151 res += string (*node);
192 ___check_notBottom (
this,
"Inspecting");
225 if (!otherPath.
isValid())
return true;
226 if (
empty())
return false;
230 ASSERT (1 < otherPath.
length());
245 for (
uint pos = 0; pos<len; ++pos)
255 if (path1.
empty() or path2.
empty())
return false;
282 ___check_notBottom (
this,
"Navigating");
287 else return path_.back();
294 ___check_notBottom (
this,
"Navigating");
305 ___check_notBottom (
this,
"Navigating");
307 throw error::Invalid (
"can't navigate to a target scope outside the model"
308 ,
LERR_(INVALID_SCOPE));
310 std::vector<Scope> otherPath;
311 append_all (discoverScopePath(target), otherPath);
312 reverse (otherPath.begin(), otherPath.end());
314 ASSERT (
path_[0] == otherPath[0]);
315 this->
path_ = otherPath;
327 path_.push_back (child);
Accessing a STL element range through a Lumiera forward iterator, An instance of this iterator adapte...
static lib::Depend< ScopeLocator > instance
Storage holding the single ScopeLocator instance.
Sequence of nested scopes within the high-level model.
bool endsAt(Scope const &) const
verify the scope in question is equivalent to our leaf scope.
void appendScope(Scope const &)
Scope const & getLeaf() const
static const ScopePath INVALID
constant invalid path token.
PlacementMO const & currModelRoot() const
bool hasValidRoot() const
ScopePath & operator=(ScopePath const &)
Copy from existing path.
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.
std::vector< Scope > path_
bool contains(Scope const &) const
ScopePath()
Create an empty path.
void navigate(Scope const &)
_Parent::iterator iterator
A Placement scope within the high-level-model.
bool isValid() const
check if this scope can be located.
static const Scope INVALID
constant invalid scope token.
Lumiera error handling (C++ interface).
This header is for including and configuring NoBug.
Core abstraction of the Session model: a media object.
void append_all(IT iter, CON &container)
LumieraError< LERR_(LOGIC)> Logic
LumieraError< LERR_(INVALID)> Invalid
ScopeQuery< MObject >::iterator discoverScopePath(Scope const &leaf)
issue a query to discover the (raw) path to root, starting with the given scope
Namespace of Session and user visible high-level objects.
bool disjoint(ScopePath const &path1, ScopePath const &path2)
ScopePath commonPrefix(ScopePath const &path1, ScopePath const &path2)
Steam-Layer implementation namespace root.
bool isSameObject(A const &a, B const &b)
compare plain object identity, based directly on the referee's memory identities.
bool isnil(lib::time::Duration const &dur)
Service to build the notion of a current location within the Sesison model.
An Object representing a sequence of nested scopes within the Session.
Implementation level session API: query a scope.
static PlacementMO & getScopeRoot()
Marker types to indicate a literal string and a Symbol.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...