Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
placement.cpp
Go to the documentation of this file.
1/*
2 Placement - Key Abstraction: a way to place and locate a Media Object
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
23#include "lib/format-string.hpp"
24
25#include <typeinfo>
26
27using util::_Fmt;
29
30namespace steam {
31namespace mobject {
32
33
40 ExplicitPlacement
41 Placement<MObject>::resolve () const
42 {
43 return ExplicitPlacement (*this, chain.resolve());
44 }
45
46
47
48 Placement<MObject>::operator string () const
49 {
50 return _Fmt{"Placement<%s> %|50T.| use-cnt=%u ID(%016x) adr=%p pointee=%p"}
51 % typeStr(this->get()) % use_count()
52 % (size_t)getID()
53 % (void*)this
54 % (void*)get()
55 ;
56 }
57
58
59 string
61 {
62 size_t hashVal = pla.getID();
63 return _Fmt{"pID(%016x)"} % hashVal;
64 }
65
66
67 bool
68 isSameDef (PlacementMO const& pl1, PlacementMO const& pl2)
69 {
70 return pl1.getID() == pl2.getID()
71 or pl1.chain == pl2.chain
72 ;
73 }
74
75
76
77
78
79}} // namespace steam::mobject
A refcounting Handle to an MObject of type MO, used to constrain or explicitly specify the location w...
A front-end for using printf-style formatting.
Core abstraction: completely resolved placement of an MObject Within the session model,...
Front-end for printf-style string template interpolation.
Core abstraction of the Session model: a media object.
std::string typeStr(TY const *obj=nullptr) noexcept
failsafe human readable type display
string format_PlacementID(Placement< MObject > const &pla)
Definition placement.cpp:60
bool isSameDef(PlacementMO const &pl1, PlacementMO const &pl2)
compare the properties of placement
Definition placement.cpp:68
Steam-Layer implementation namespace root.
Core abstraction: placement of a media object into session context.