42 using proc_interface::PAsset;
80 verify_removalTimeline();
81 verify_removalBinding();
82 verify_removalSequence();
84 indirect_SequenceHandling();
92 CHECK (sess->isValid());
97 Query<Timeline> query1 = "id("+defaultTimeline->getNameID()+")."; 100 CHECK (queriedTimeline);
101 CHECK (queriedTimeline == defaultTimeline);
102 CHECK (queriedTimeline == sess->
timelines[0]);
104 Query<Sequence> query2 =
"id("+defaultTimeline->getSequence()->getNameID()+
").";
106 CHECK (queriedSequence);
107 CHECK (queriedSequence == sess->
sequences[0]);
108 CHECK (queriedSequence == sess->
timelines[0]->getSequence());
109 CHECK (queriedSequence == defaultTimeline->getSequence());
118 CHECK (sess->isValid());
120 uint num_timelines = sess->
timelines.size();
121 CHECK (0 < num_timelines);
124 Query<Timeline> special = "id(aSillyName), sequence(" 126 +
"), pipe(ambiance).";
129 CHECK (specialTimeline);
130 CHECK (num_timelines + 1 == sess->
timelines.size());
131 CHECK (specialTimeline ==
session->timelines[num_timelines]);
134 CHECK (specialTimeline->getSequence() == sess->
sequences[0]);
135 CHECK (contains (specialTimeline->pipes,
Pipe::query(
"pipe(ambiance)")));
137 CHECK (specialTimeline.use_count() == 3);
143 verify_removalTimeline()
148 CHECK (sess->isValid());
149 uint num_timelines = sess->
timelines.size();
150 CHECK (2 <= num_timelines);
152 PTimeline specialTimeline = sess->
timelines[num_timelines-1];
154 CHECK ("aSillyName" == specialTimeline->getNameID()); 156 RBinding binding = specialTimeline->getBinding();
159 PSequence theSeq = binding->getSequence();
161 CHECK (theSeq == specialTimeline->getSequence());
162 CHECK (assetM.
known (theSeq->getID()));
165 assetM.
remove (specialTimeline->getID());
167 CHECK (!assetM.
known (specialTimeline->getID()));
168 CHECK (1 == specialTimeline.use_count());
169 CHECK ( assetM.
known (theSeq->getID()));
172 CHECK (num_timelines - 1 == sess->
timelines.size());
179 verify_removalBinding()
184 CHECK (sess->isValid());
185 uint num_timelines = sess->
timelines.size();
186 CHECK (0 < num_timelines);
190 PTimeline aTimeline (asset::Struct::retrieve (Query<Timeline> ("sequence("+ 193 CHECK (num_timelines + 1 == sess->
timelines.size());
194 RBinding binding = aTimeline->getBinding();
197 PSequence theSeq = binding->getSequence();
199 CHECK (theSeq == aTimeline->getSequence());
200 CHECK (assetM.
known (aTimeline->getID()));
201 CHECK (assetM.
known (theSeq->getID()));
204 sess->remove(binding);
207 CHECK (!assetM.
known (aTimeline->getID()));
208 CHECK (1 == aTimeline.use_count());
209 CHECK ( assetM.
known (theSeq->getID()));
211 CHECK (num_timelines == sess->
timelines.size());
212 CHECK (!contains (sess->
timelines, aTimeline));
213 CHECK ( contains (sess->
sequences, theSeq));
219 verify_removalSequence()
224 CHECK (sess->isValid());
225 uint num_timelines = sess->
timelines.size();
226 uint num_sequences = sess->
sequences.size();
231 PSequence aSequence (aTimeline->getSequence()); 232 CHECK (num_timelines + 1 == sess->
timelines.size());
233 CHECK (num_sequences + 1 == sess->
sequences.size());
235 RBinding binding = aTimeline->getBinding();
236 RTrack rootTrack = aSequence->getTracks();
240 CHECK (aSequence == binding->getSequence());
241 CHECK (assetM.
known (aTimeline->getID()));
242 CHECK (assetM.
known (aSequence->getID()));
245 assetM.
remove (aSequence->getID());
247 CHECK (!assetM.
known (aTimeline->getID()));
248 CHECK (!assetM.
known (aSequence->getID()));
252 CHECK (num_timelines == sess->
timelines.size());
253 CHECK (num_sequences == sess->
sequences.size());
254 CHECK (!contains (sess->
timelines, aTimeline));
255 CHECK (!contains (sess->
sequences, aSequence));
257 CHECK (1 == aTimeline.use_count());
258 CHECK (1 == aSequence.use_count());
264 indirect_SequenceHandling()
269 CHECK (sess->isValid());
270 uint num_sequences = sess->
sequences.size();
273 RFork someFork = sess->sequences[0]->getForks(); 277 CHECK (newFork != someFork);
279 CHECK (num_sequences + 1 == sess->
sequences.size());
280 PSequence aSequence = sess->
sequences[num_sequences];
281 CHECK (newFork == aSequence->getForks());
284 CHECK (assetM.
known (aSequence->getID()));
290 newFork.getPlacement().chain (someFork,
Time(20));
295 CHECK (!assetM.
known (aSequence->getID()));
296 CHECK (num_sequences == sess->
sequences.size());
297 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.
Simplistic 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, based directly on the referee's memory identities. ...