Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
proc.hpp
Go to the documentation of this file.
1/*
2 PROC.hpp - key abstraction: data-processing assets
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
27#ifndef ASSET_PROC_H
28#define ASSET_PROC_H
29
30#include "steam/asset.hpp"
31#include "steam/streamtype.hpp"
32#include "lib/nocopy.hpp"
33
34
35
36namespace steam {
37namespace asset {
38
39
40 class Proc;
41 class ProcFactory;
42
44
45
46
47 template<>
48 class ID<Proc> : public ID<Asset>
49 {
50 public:
51 ID (HashVal id);
52 ID (const Proc&);
53 };
54
55
56
63 class Proc : public Asset
64 {
65 public:
67
68 virtual const ID<Proc>& getID() const
69 {
70 return static_cast<const ID<Proc>& > (Asset::getID());
71 }
72
74 typedef Buff* PBuff;
75 typedef void (ProcFunc) (PBuff);
76
77
87 virtual ProcFunc*
88 resolveProcessor() const =0;
89
90
91
92 protected:
93 Proc (const Asset::Ident& idi) : Asset(idi) {}
94 friend class ProcFactory;
95 };
96
97
98 // definition of ID<Proc> ctors is possible now,
99 // after providing full definition of class Proc
100
101 inline ID<Proc>::ID(HashVal id) : ID<Asset> (id) {};
102 inline ID<Proc>::ID(const Proc& proc) : ID<Asset> (proc.getID()) {};
103
104
105
106
112 {
113 public:
115
117
118 };
119
120
121
122
123}} // namespace steam::asset
124#endif
Steam-Layer Interface: Assets.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition p.hpp:77
placeholder type for the contents of a data buffer.
Superinterface describing especially bookkeeping properties.
Definition asset.hpp:139
virtual const ID< Asset > & getID() const
Definition asset.hpp:199
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
Definition asset.hpp:98
ID(HashVal id)
Definition asset.hpp:101
Factory specialised for creating Processor Asset objects.
Definition proc.hpp:112
lib::P< asset::Proc > PType
Definition proc.hpp:114
PType operator()(Asset::Ident &key)
Factory method for Processor Asset instances.
Definition proc.cpp:40
key abstraction: data processing asset
Definition proc.hpp:64
virtual ProcFunc * resolveProcessor() const =0
resolve any plugin and configuration info to yield the actual media data processing function.
virtual const ID< Proc > & getID() const
<
Definition proc.hpp:68
StreamType::ImplFacade::DataBuffer Buff
Definition proc.hpp:73
Proc(const Asset::Ident &idi)
Definition proc.hpp:93
void() ProcFunc(PBuff)
Definition proc.hpp:75
static ProcFactory create
storage for the static ProcFactory instance
Definition proc.hpp:66
Any copy and copy construction prohibited.
Definition nocopy.hpp:38
The asset subsystem of the Steam-Layer.
lib::P< const asset::Proc > PProc
Steam-Layer implementation namespace root.
Proc
Result instruction from Activity activation.
Definition activity.hpp:140
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Framework for classification of media streams.
a POD comprised of all the information sufficiently identifying any given Asset.
Definition asset.hpp:147