Lumiera  0.pre.03
»edit your freedom«
abstractmo.cpp
Go to the documentation of this file.
1 /*
2  AbstractMO - abstract base class for all Media Objects
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 
30 #include "lib/format-string.hpp"
31 #include "lib/util.hpp"
32 
33 using util::_Fmt;
34 using util::isnil;
35 
36 namespace steam {
37 namespace mobject {
38 namespace session {
39 
44  bool
46  {
47  return (this == &oo);
48  }
49 
50 
51 
52  string
53  AbstractMO::buildShortID (lib::Literal typeID, string suffix) const
54  {
55  static size_t i=0;
56 
57  REQUIRE (!isnil (typeID));
58  if (!isnil (suffix))
59  return typeID+"."+suffix;
60  else
61  return _Fmt{"%s.%03d"} % typeID % (++i);
62  }
63 
64 
65 }}} // namespace mobject::session
inline string literal This is a marker type to indicate that
Definition: symbol.hpp:85
Front-end for printf-style string template interpolation.
bool operator==(const MObject &oo) const
default/fallback implementation of equality using literal object identity (same address).
Definition: abstractmo.cpp:45
Steam-Layer implementation namespace root.
A front-end for using printf-style formatting.
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
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...