106 #ifndef STEAM_MOBJECT_PLACEMENT_INDEX_H 107 #define STEAM_MOBJECT_PLACEMENT_INDEX_H 117 #include <unordered_map> 128 operator() (steam::mobject::PlacementMO::ID
const& val)
const noexcept
130 return hash_value(val);
150 using std::unique_ptr;
157 template<
typename PLA>
161 template<
typename MO,
typename BMO>
164 typedef PlacementMO::Id<MO> Type;
187 unique_ptr<Table> pTab_;
190 using _PID = PlacementMO::ID;
191 using ScopeIter = std::unordered_multimap<_PID,_PID>::const_iterator;
199 using ID = PlacementMO::ID
const&;
224 bool contains (ID)
const;
226 bool isValid()
const;
233 ID insert (
PlacementMO const& newObj, ID targetScope);
245 void clear (ID targetScope);
266 if (!questionable.isCompatible<MOX>())
268 "while the actual type of the pointee (MObject) " 269 "registered within the index isn't compatible with the " 270 "requested specific MObject subclass" 271 , LERR_(PLACEMENT_TYPE));
279 , LERR_(BOTTOM_PLACEMENTREF));
280 if (!idx.contains (
id))
282 , LERR_(NOT_IN_SESSION));
291 PlacementIndex::find (PlacementMO::Id<MO>
id)
const 295 ___check_compatibleType<MO> (result);
304 PlacementMO::Id<MO> id (pRef);
310 PlacementIndex::getScope (
PlacementMO const& p)
const 312 return getScope(p.
getID());
317 PlacementIndex::contains (
PlacementMO const& p)
const 319 return contains (p.
getID());
331 PlacementIndex::insert (PLA
const& newObj, ID targetScope)
336 return find (insert (genericPlacement, targetScope))
337 .template recastID<TargetMO>();
344 return remove (p.
getID());
A refcounting Handle to an MObject of type MO, used to constrain or explicitly specify the location w...
Core abstraction: placement of a media object into session context.
Any copy and copy construction prohibited.
Primary class template for std::hash.
#define LUMIERA_ERROR_DECLARE(err)
Forward declare an error constant.
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
Derived specific exceptions within Lumiera's exception hierarchy.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Marker types to indicate a literal string and a Symbol.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
A generic reference mechanism for Placements, as added to the current session.
Structured compound of Placement instances with lookup capabilities.
Lumiera error handling (C++ interface).
PlacementIndex self-verification code Executes all built-in checks automatically on object creation...
Lumiera public interface.
Helper for building Placement-ID types.
Accessing a STL element range through a Lumiera forward iterator, An instance of this iterator adapte...
Storage and implementation backing the PlacementIndex.