Lumiera  0.pre.03
»edit your freedom«
mobject.hpp
Go to the documentation of this file.
1 /*
2  MOBJECT.hpp - Key Abstraction: A Media Object in the Session
3 
4  Copyright (C) Lumiera.org
5  2008, 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 
39 #ifndef STEAM_MOBJECT_MOBJECT_H
40 #define STEAM_MOBJECT_MOBJECT_H
41 
42 #include "steam/common.hpp"
45 #include "steam/asset.hpp" //TODO finally not needed?
46 #include "lib/p.hpp"
47 #include "lib/time/timevalue.hpp"
48 
49 #include <boost/operators.hpp>
50 #include <string>
51 
52 
53 
54 #include "steam/assetmanager.hpp"
55 using proc_interface::IDA; //TODO finally not needed?
56 //using proc_interface::PAsset; //TODO: only temporarily
58 
59 namespace steam {
60 namespace mobject {
61 
62  using std::string;
63 
64  //NOBUG_DECLARE_FLAG (mobjectmem);
65 
66 
67  namespace session {
68  class MObjectFactory;
69  }
70 
71 
79  class MObject
80  : public Buildable,
82  boost::equality_comparable< MObject >
83  {
84  protected:
86 
87  Duration length_;
88 
89  mutable string shortID_;
90 
91  MObject() ;
92  virtual ~MObject() ;
93 
94  friend class session::MObjectFactory;
95 
96 
97  public:
99 
104  string const& shortID() const;
105 
107  virtual bool isValid() const =0;
108 
109  virtual Duration& getLength() =0;
110 
111  virtual bool operator== (const MObject& oo) const =0;
112 
113  protected:
114 
115  virtual string initShortID() const =0;
116 
117  };
118 
119 
120 
121  typedef Placement<MObject> PMO;
122 
123 
124 }} // namespace steam::mobject
125 #endif /*STEAM_MOBJECT_MOBJECT_H*/
Basic set of definitions and includes commonly used together.
Steam-Layer Interface: Asset Lookup and Organisation.
Marker Interface for classes visitable by Builder tools.
Core abstraction: placement of a media object into session context.
Any copy and copy construction prohibited.
Definition: nocopy.hpp:46
Customised refcounting smart pointer.
Facade for the Asset subsystem.
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:74
MObject is the interface class for all "Media Objects".
Definition: mobject.hpp:79
Visiting-tool mechanism configured specifically for the Builder.
bool operator==(LocatingPin const &pin1, LocatingPin const &pin2)
check for equivalent definition of a complete locating chain
Steam-Layer Interface: Assets.
Duration is the internal Lumiera time metric.
Definition: timevalue.hpp:477
static session::MObjectFactory create
Storage for the (single, static) MObject factory object.
Definition: mobject.hpp:98
a family of time value like entities and their relationships.