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)
5  2008, 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 
21 #include "lib/format-string.hpp"
22 #include "lib/util.hpp"
23 
24 using util::_Fmt;
25 using util::isnil;
26 
27 namespace steam {
28 namespace mobject {
29 namespace session {
30 
35  bool
37  {
38  return (this == &oo);
39  }
40 
41 
42 
43  string
44  AbstractMO::buildShortID (lib::Literal typeID, string suffix) const
45  {
46  static size_t i=0;
47 
48  REQUIRE (!isnil (typeID));
49  if (!isnil (suffix))
50  return typeID+"."+suffix;
51  else
52  return _Fmt{"%s.%03d"} % typeID % (++i);
53  }
54 
55 
56 }}} // namespace mobject::session
inline string literal This is a marker type to indicate that
Definition: symbol.hpp:76
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:36
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:65
MObject is the interface class for all "Media Objects".
Definition: mobject.hpp:70
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...