Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
stypemanager.hpp
Go to the documentation of this file.
1/*
2 STYPEMANAGER.hpp - entry point for dealing with media stream types
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
22#ifndef STEAM_CONTROL_STYPEMANAGER_H
23#define STEAM_CONTROL_STYPEMANAGER_H
24
25
26#include "steam/streamtype.hpp"
27#include "lib/depend.hpp"
28
29#include <memory>
30
31
32namespace steam {
33namespace control {
34
35 using lib::Symbol;
36
37
39 {
40
41 class Registry;
42 std::unique_ptr<Registry> reg_;
43
44 public:
46
48
49
53
55
58
60 StreamType const& getType (StreamType::ImplFacade const& implType) ;
61
66
70 template<class TY>
72
73
74
76 protected:
77 STypeManager() ;
79
81
87 void reset() ;
88
89 private:
91 };
92
94
95
96 template<class TY>
102
103
104}} // namespace steam::control
105
106
107namespace proc_interface {
108
110
111
112} // namespace proc_interface
113
114
115extern "C" { //TODO provide a separate header if some C code or plugin happens to need this...
116
122 void
123 lumiera_StreamType_registerInitFunction (void setupFun(void));
124
125 // TODO provide a C interface usable from such a setupFun to access the STypeManager registration functions.
126}
127
128
129#endif
Access point to singletons and other kinds of dependencies designated by type.
Definition depend.hpp:281
Helper to abstract creation and lifecycle of a dependency.
Definition depend.hpp:127
Token or Atom with distinct identity.
Definition symbol.hpp:120
opaque placeholder (type erasure) for implementation specific type info.
A (more or less) concrete implementation type, wired up as a facade providing the basic set of operat...
ImplFacade const & fetchImpl(StreamType::ImplFacade::TypeTag)
ImplFacade const & getImpl(Symbol libID, TY &rawType)
build or retrieve an implementation (facade) wrapping up the actual implementation as designated by t...
static lib::Depend< STypeManager > instance
access the system-wide stream type manager instance.
std::unique_ptr< Registry > reg_
ImplFacade const & getImpl(Symbol libID, StreamType::Prototype const &protoType)
build or retrieve an implementation (facade) utilizing a specific MediaImplLib and implementing the g...
StreamType::ImplFacade ImplFacade
void reset()
Lifecycle: reset all type registration information to the generic pristine default state.
StreamType const & getType(Symbol sTypeID)
(re)-access a media stream type using just a symbolic ID.
Singleton services and Dependency Injection.
const char * CStr
Definition error.hpp:42
enable_if_c< Cond::value, T >::type enable_if
SFINAE helper to control the visibility of specialisations and overloads.
Definition meta/util.hpp:87
CStr ON_STREAMTYPES_RESET
triggered to load the generic pristine default
Steam-Layer implementation namespace root.
Framework for classification of media streams.
void lumiera_StreamType_registerInitFunction(void setupFun(void))
any stream type implementation, which needs to be present on the pristine default level (without any ...