Lumiera  0.pre.03
»edit your freedom«
mobjectfactory.cpp
Go to the documentation of this file.
1 /*
2  MObjectFactory - creating concrete MObject subclass instances
3 
4  Copyright (C)
5  2008,2010, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 * *****************************************************************/
13 
14 
28 #include "steam/asset/clip.hpp"
29 #include "steam/asset/effect.hpp"
31 
33 
34 namespace steam {
35 namespace mobject {
36 namespace session {
38 
39 
40 
42  Placement<Root>
43  MObjectFactory::operator() (DefsManager& sessionDefaultsHandler)
44  {
45  return Placement<Root> (*new Root (sessionDefaultsHandler), &deleterFunc);
46  }
47 
48 
52  {
53  return Placement<Label> (*new Label (labelType), &deleterFunc);
54  }
55 
56 
70  MObjectFactory::operator() (const asset::Clip& clipRef, const asset::Media& mediaDef)
71  {
72  return Placement<Clip> (*new Clip (clipRef,mediaDef), &deleterFunc);
73  }
74 
80  MObjectFactory::operator() (const asset::Clip& clipRef, vector<const Media*> mediaTracks)
81  {
82  UNIMPLEMENTED ("build multichannel compound clip-MO");
83  }
84 
88  {
89  TODO ("what needs to be registered when creating an Fork-MO?");
90  TODO ("assure the ID is indeed unique and not already used for another fork??");
91  return Placement<Fork> (*new Fork (id), &deleterFunc);
92  }
93 
96  MObjectFactory::operator() (const asset::Effect& processorDef)
97  {
98  UNIMPLEMENTED ("fabricate effect-MO");
99  }
100 
103  MObjectFactory::operator() (PSequence const& sequence_to_bind)
104  {
105  TODO ("any additional liabilities when creating a binding?");
106  return Placement<Binding> (*new Binding(sequence_to_bind), &deleterFunc);
107  }
108 
109 
110 
111 }}} // namespace mobject::session
A refcounting Handle to an MObject of type MO, used to constrain or explicitly specify the location w...
Definition: trait.hpp:82
High-level model root element, corresponding to the global session wide scope.
Definition: root.hpp:60
key abstraction: media-like assets
Definition: media.hpp:63
A marker or reference point in the Session.
MObject in the Session to represent a clip on the timeline.
A user visible/editable Clip is a reference to a contiguous sequence of media data loaded as Asset in...
Organisational grouping device within the Session model ("Track" / "Media Bin").
Steam-Layer implementation namespace root.
MObject within the session to represent "the session itself".
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:65
Effect or media processing component.
Management of defaults and default rules.
Token or Atom with distinct identity.
Definition: symbol.hpp:117
Organise a collection of preconfigured default objects.
MObject in session to represent the top-level binding of a sequence.
Placement< Root > operator()(lumiera::query::DefsManager &)
build a new session/model root element.
Definition of Asset representation for a media clip.
Explicit link to bind a Sequence (container) to be used within the Session, either as contents of a t...
Core factory to generate media objects for use in the Session model.
bookkeeping (Asset) view of a media clip.
Definition: asset/clip.hpp:35
A Fork serves as grouping device within the Session.
Definition: fork.hpp:94
static void deleterFunc(MObject *o)
custom deleter function allowing Placement to take ownership of MObjct instances
Definition of an Asset representation for any kind of effect or media processor.
Any sort of User visible Marker or Tag, used to mark time positions and ranges, or specific locations...
Definition: label.hpp:50