Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
asset/meta.hpp
Go to the documentation of this file.
1/*
2 META.hpp - key abstraction: metadata and organisational asset
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
51#ifndef ASSET_META_H
52#define ASSET_META_H
53
54#include "steam/asset.hpp"
56#include "lib/idi/entry-id.hpp"
57#include "lib/nocopy.hpp"
58
59
60namespace steam {
61namespace asset {
62
63 class Meta;
64 class MetaFactory;
65
66
67 template<>
68 class ID<Meta> : public ID<Asset>
69 {
70 public:
71 ID (HashVal id);
72 ID (const Meta&);
73 };
74
75 namespace meta {
76
82 {
83 public:
84 virtual ~Descriptor();
85 };
86
99 template<class MA>
100 struct Builder;
101 }
102
103
109 class Meta
110 : public Asset
111 , public meta::Descriptor
112 {
113 public:
115
117 virtual const ID<Meta>& getID() const
118 {
119 return static_cast<const ID<Meta>& > (Asset::getID());
120 }
121
122 protected:
123 Meta (Asset::Ident const& idi)
124 : Asset{idi}
125 { }
126
127 template<typename TY>
129 : Meta{idi::getAssetIdent (nameID, META)}
130 { }
131
132// friend class MetaFactory; ///////////////////////////////////TODO still necessary?
133 };
134
135
136 // definition of ID<Meta> ctors is possible now,
137 // after providing full definition of class Meta
138
139 inline ID<Meta>::ID(HashVal id) : ID<Asset> (id) {};
140 inline ID<Meta>::ID(const Meta& meta) : ID<Asset> (meta.getID()) {};
141
143
144
145
151 {
152 public:
154
155 template<class MA>
157
158 template<class MA>
159 meta::Builder<MA> operator() (meta::Descriptor const& prototype, lib::idi::EntryID<MA> elementIdentity);
160
161 };
162
163
164
165
166}} // namespace steam::asset
167#endif
Steam-Layer Interface: Assets.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition p.hpp:77
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 Metadata Asset objects.
meta::Builder< MA > operator()(lib::idi::EntryID< MA > elementIdentity)
Generic factory method for Metadata Asset instances.
key abstraction: metadata, parametrisation, customisation and similar organisational traits.
virtual const ID< Meta > & getID() const
Meta(Asset::Ident const &idi)
static MetaFactory create
storage for the static MetaFactory instance
Meta(lib::idi::EntryID< TY > const &nameID)
Interface: the unspecific, reflective base of meta assets.
virtual ~Descriptor()
this is an Interface
Any copy and copy construction prohibited.
Definition nocopy.hpp:38
Bare symbolic and hash ID used for accounting of asset like entries.
Building and configuring a meta asset.
The asset subsystem of the Steam-Layer.
Steam-Layer implementation namespace root.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Naming and labelling scheme for structural assets.
typed symbolic and hash ID for asset-like position accounting.
Definition entry-id.hpp:219
a POD comprised of all the information sufficiently identifying any given Asset.
Definition asset.hpp:147