51 using proc_interface::PAsset;
89 verify_removalTimeline();
90 verify_removalBinding();
91 verify_removalSequence();
93 indirect_SequenceHandling();
101 CHECK (sess->isValid());
106 Query<Timeline> query1 = "id("+defaultTimeline->getNameID()+")."; 109 CHECK (queriedTimeline);
110 CHECK (queriedTimeline == defaultTimeline);
111 CHECK (queriedTimeline == sess->
timelines[0]);
113 Query<Sequence> query2 =
"id("+defaultTimeline->getSequence()->getNameID()+
").";
115 CHECK (queriedSequence);
116 CHECK (queriedSequence == sess->
sequences[0]);
117 CHECK (queriedSequence == sess->
timelines[0]->getSequence());
118 CHECK (queriedSequence == defaultTimeline->getSequence());
127 CHECK (sess->isValid());
129 uint num_timelines = sess->
timelines.size();
130 CHECK (0 < num_timelines);
133 Query<Timeline> special = "id(aSillyName), sequence(" 135 +
"), pipe(ambiance).";
138 CHECK (specialTimeline);
139 CHECK (num_timelines + 1 == sess->
timelines.size());
140 CHECK (specialTimeline ==
session->timelines[num_timelines]);
143 CHECK (specialTimeline->getSequence() == sess->
sequences[0]);
144 CHECK (contains (specialTimeline->pipes,
Pipe::query(
"pipe(ambiance)")));
146 CHECK (specialTimeline.use_count() == 3);
152 verify_removalTimeline()
157 CHECK (sess->isValid());
158 uint num_timelines = sess->
timelines.size();
159 CHECK (2 <= num_timelines);
161 PTimeline specialTimeline = sess->
timelines[num_timelines-1];
163 CHECK ("aSillyName" == specialTimeline->getNameID()); 165 RBinding binding = specialTimeline->getBinding();
168 PSequence theSeq = binding->getSequence();
170 CHECK (theSeq == specialTimeline->getSequence());
171 CHECK (assetM.
known (theSeq->getID()));
174 assetM.
remove (specialTimeline->getID());
176 CHECK (!assetM.
known (specialTimeline->getID()));
177 CHECK (1 == specialTimeline.use_count());
178 CHECK ( assetM.
known (theSeq->getID()));
181 CHECK (num_timelines - 1 == sess->
timelines.size());
188 verify_removalBinding()
193 CHECK (sess->isValid());
194 uint num_timelines = sess->
timelines.size();
195 CHECK (0 < num_timelines);
199 PTimeline aTimeline (asset::Struct::retrieve (Query<Timeline> ("sequence("+ 202 CHECK (num_timelines + 1 == sess->
timelines.size());
203 RBinding binding = aTimeline->getBinding();
206 PSequence theSeq = binding->getSequence();
208 CHECK (theSeq == aTimeline->getSequence());
209 CHECK (assetM.
known (aTimeline->getID()));
210 CHECK (assetM.
known (theSeq->getID()));
213 sess->remove(binding);
216 CHECK (!assetM.
known (aTimeline->getID()));
217 CHECK (1 == aTimeline.use_count());
218 CHECK ( assetM.
known (theSeq->getID()));
220 CHECK (num_timelines == sess->
timelines.size());
221 CHECK (!contains (sess->
timelines, aTimeline));
222 CHECK ( contains (sess->
sequences, theSeq));
228 verify_removalSequence()
233 CHECK (sess->isValid());
234 uint num_timelines = sess->
timelines.size();
235 uint num_sequences = sess->
sequences.size();
240 PSequence aSequence (aTimeline->getSequence()); 241 CHECK (num_timelines + 1 == sess->
timelines.size());
242 CHECK (num_sequences + 1 == sess->
sequences.size());
244 RBinding binding = aTimeline->getBinding();
245 RTrack rootTrack = aSequence->getTracks();
249 CHECK (aSequence == binding->getSequence());
250 CHECK (assetM.
known (aTimeline->getID()));
251 CHECK (assetM.
known (aSequence->getID()));
254 assetM.
remove (aSequence->getID());
256 CHECK (!assetM.
known (aTimeline->getID()));
257 CHECK (!assetM.
known (aSequence->getID()));
261 CHECK (num_timelines == sess->
timelines.size());
262 CHECK (num_sequences == sess->
sequences.size());
263 CHECK (!contains (sess->
timelines, aTimeline));
264 CHECK (!contains (sess->
sequences, aSequence));
266 CHECK (1 == aTimeline.use_count());
267 CHECK (1 == aSequence.use_count());
273 indirect_SequenceHandling()
278 CHECK (sess->isValid());
279 uint num_sequences = sess->
sequences.size();
282 RFork someFork = sess->sequences[0]->getForks(); 286 CHECK (newFork != someFork);
288 CHECK (num_sequences + 1 == sess->
sequences.size());
289 PSequence aSequence = sess->
sequences[num_sequences];
290 CHECK (newFork == aSequence->getForks());
293 CHECK (assetM.
known (aSequence->getID()));
299 newFork.getPlacement().chain (someFork,
Time(20));
304 CHECK (!assetM.
known (aSequence->getID()));
305 CHECK (num_sequences == sess->
sequences.size());
306 CHECK (!contains (sess->
sequences, aSequence));
Steam-Layer Interface: Asset Lookup and Organisation.
A "processing pipe" represented as Asset.
An active (smart-ptr like) external reference to a specifically placed MObject "instance" within the ...
virtual void reset()=0
reset all session config and start with a pristine default session.
Basic and generic representation of an internal query.
MORef< MOX > attach(Placement< MOX > const &newPlacement)
attach a child element to the model
void remove(IDA id)
remove the given asset from the internal DB.
Facade for the Asset subsystem.
static session::SessManager & current
access point to the current Session
Steam-Layer implementation namespace root.
DefaultsAccess defaults
manages default configured objects
Namespace of Session and user visible high-level objects.
structural asset corresponding to the part of the model forming a processing pipe for generating medi...
static lib::Depend< AssetManager > instance
get at the system-wide asset manager instance.
Lumiera's internal time value datatype.
static StructFactory retrieve
storage for the static StructFactory instance
Structural building block of the session: a sequence of clips.
External MObject/Placement reference.
MObject in session to represent the top-level binding of a sequence.
Simple test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
creation, access and Session lifecycle Interface.
SequenceAccess sequences
collection of sequences
static PPipe query(string const &properties)
convenience shortcut for retrieving default configured pipes
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Primary Interface to the current Session.
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
bool contains(SEQ const &cont, typename SEQ::const_reference val)
shortcut for brute-force containment test in any sequential container
Top level structural element within the session.
TimelineAccess timelines
collection of timelines (top level)
bool isSameObject(A const &a, B const &b)
compare plain object identity, bypassing any custom comparison operators.