Lumiera  0.pre.03
»edit your freedom«
Scope Class Reference

#include "steam/mobject/session/scope.hpp"

Description

A Placement scope within the high-level-model.

Within the Session/Model, Placements are used to attach MObjects; but beyond that, each Placement can contain other Placements, effectively forming a scope. Thus Scope is basically another view on Placements which are attached to the session. This (hidden) link to the session is utilised to establish the nesting of scopes and allow querying and navigating.

Actually, Scope is implemented through a PlacementRef pointing to the Placement which constitutes this Scope. We call this Placement the "scope top". A fork e.g. can contain several clips, but also nested sub forks, all of which would be within the scope of this fork. This scoping relation plays an important role when it comes to resolving properties of placement, like e.g. the output designation, overlay mode, sound pan position etc – properties from enclosing scopes will be inherited unless shaded by local definitions, similar to the behaviour known from most programming languages when referring to local variables.

Note
Scope is a passive entity, basically just wrapping up a Scope-top Placement. Contrast this to QueryFocus, which actively maintains the current focus location and exposes query facilities.

Definition at line 78 of file scope.hpp.

Public Member Functions

 Scope (PlacementMO const &constitutingPlacement)
 conversion of a scope top (placement) into a Scope. More...
 
 Scope ()
 unlocated NIL scope
 
 Scope (PlacementMO::ID const &constitutingPlacement)
 
 Scope (Scope const &)
 
Scope getParent () const
 retrieve the parent scope which encloses this scope. More...
 
PlacementMOgetTop () const
 
bool isRoot () const
 
bool isValid () const
 check if this scope can be located. More...
 
 operator std::string () const
 
Scopeoperator= (Scope const &)
 

Static Public Member Functions

static Scope containing (PlacementMO const &aPlacement)
 discover the enclosing scope of a given Placement
 
static Scope containing (RefPlacement const &refPlacement)
 

Static Public Attributes

static const Scope INVALID = Scope()
 constant invalid scope token. More...
 

Friends

bool operator!= (Scope const &, Scope const &)
 
bool operator== (Scope const &, Scope const &)
 as scopes are constituted by a "scope top" element (placement) registered within the PlacementIndex of the current session, equality is defined in terms of this defining placement.
 

Private Attributes

RefPlacement anchor_
 

Constructor & Destructor Documentation

◆ Scope()

Scope ( PlacementMO const &  constitutingPlacement)

conversion of a scope top (placement) into a Scope.

only allowed if the given Placement is actually attached to the session, which will be checked by index access

Definition at line 73 of file scope.cpp.

References Scope::Scope().

+ Here is the call graph for this function:

Member Function Documentation

◆ getParent()

Scope getParent ( ) const

retrieve the parent scope which encloses this scope.

Exceptions
error::Invalidif this is the root scope

Definition at line 218 of file scope.cpp.

References Scope::isRoot().

Referenced by QueryFocus_test::checkNavigation(), and PlacementScope_test::verifyEquality().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isValid()

bool isValid ( ) const

check if this scope can be located.

An default constructed Scope (i.e without defining Placement) can't be located and returns false here

Definition at line 240 of file scope.cpp.

Referenced by QueryFocus::push(), and Scope::Scope().

+ Here is the caller graph for this function:

◆ isRoot()

bool isRoot ( ) const
Returns
true if this is the outmost (root) scope

Definition at line 230 of file scope.cpp.

References SessionServiceExploreScope::getScopeRoot().

Referenced by QueryFocus_test::checkNavigation(), Scope::getParent(), and QueryFocusStack::push().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ INVALID

const Scope INVALID = Scope()
static

constant invalid scope token.

Definition at line 92 of file scope.hpp.

Referenced by ScopePath::endsAt(), Scope::Scope(), and ScopePath::ScopePath().

+ Collaboration diagram for Scope:

The documentation for this class was generated from the following files: