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) Lumiera.org
5  2008,2010, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
37 #include "steam/asset/clip.hpp"
38 #include "steam/asset/effect.hpp"
40 
42 
43 namespace steam {
44 namespace mobject {
45 namespace session {
47 
48 
49 
51  Placement<Root>
52  MObjectFactory::operator() (DefsManager& sessionDefaultsHandler)
53  {
54  return Placement<Root> (*new Root (sessionDefaultsHandler), &deleterFunc);
55  }
56 
57 
61  {
62  return Placement<Label> (*new Label (labelType), &deleterFunc);
63  }
64 
65 
79  MObjectFactory::operator() (const asset::Clip& clipRef, const asset::Media& mediaDef)
80  {
81  return Placement<Clip> (*new Clip (clipRef,mediaDef), &deleterFunc);
82  }
83 
89  MObjectFactory::operator() (const asset::Clip& clipRef, vector<const Media*> mediaTracks)
90  {
91  UNIMPLEMENTED ("build multichannel compound clip-MO");
92  }
93 
97  {
98  TODO ("what needs to be registered when creating an Fork-MO?");
99  TODO ("assure the ID is indeed unique and not already used for another fork??");
100  return Placement<Fork> (*new Fork (id), &deleterFunc);
101  }
102 
105  MObjectFactory::operator() (const asset::Effect& processorDef)
106  {
107  UNIMPLEMENTED ("fabricate effect-MO");
108  }
109 
112  MObjectFactory::operator() (PSequence const& sequence_to_bind)
113  {
114  TODO ("any additional liabilities when creating a binding?");
115  return Placement<Binding> (*new Binding(sequence_to_bind), &deleterFunc);
116  }
117 
118 
119 
120 }}} // namespace mobject::session
A refcounting Handle to an MObject of type MO, used to constrain or explicitly specify the location w...
Definition: trait.hpp:91
High-level model root element, corresponding to the global session wide scope.
Definition: root.hpp:69
key abstraction: media-like assets
Definition: media.hpp:72
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:74
Effect or media processing component.
Management of defaults and default rules.
Token or Atom with distinct identity.
Definition: symbol.hpp:126
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:44
A Fork serves as grouping device within the Session.
Definition: fork.hpp:103
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:59