Lumiera
0.pre.03
»edit your freedom«
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
"
55
#include "
steam/asset/struct-scheme.hpp
"
56
#include "
lib/idi/entry-id.hpp
"
57
#include "
lib/nocopy.hpp
"
58
59
60
namespace
steam
{
61
namespace
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
81
class
Descriptor
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
:
114
static
MetaFactory
create
;
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>
128
Meta
(
lib::idi::EntryID<TY>
const
& nameID)
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
142
typedef
lib::P<Meta>
PMeta
;
143
144
145
149
class
MetaFactory
150
:
util::NonCopyable
151
{
152
public
:
153
typedef
lib::P<asset::Meta>
PType
;
154
155
template
<
class
MA>
156
meta::Builder<MA>
operator() (
lib::idi::EntryID<MA>
elementIdentity);
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::asset::ID< Meta >
Definition:
asset/meta.hpp:68
steam::asset::MetaFactory
Factory specialised for creating Metadata Asset objects.
Definition:
asset/meta.hpp:149
util::NonCopyable
Any copy and copy construction prohibited.
Definition:
nocopy.hpp:37
steam::asset::Meta
key abstraction: metadata, parametrisation, customisation and similar organisational traits...
Definition:
asset/meta.hpp:109
lib::idi::EntryID
typed symbolic and hash ID for asset-like position accounting.
Definition:
entry-id.hpp:126
steam
Steam-Layer implementation namespace root.
Definition:
dummy-player-facade.h:37
steam::asset::Meta::getID
virtual const ID< Meta > & getID() const
Definition:
asset/meta.hpp:117
steam::asset::Meta::create
static MetaFactory create
storage for the static MetaFactory instance
Definition:
asset/meta.hpp:114
nocopy.hpp
Mix-Ins to allow or prohibit various degrees of copying and cloning.
steam::asset::Asset::Ident
a POD comprised of all the information sufficiently identifying any given Asset.
Definition:
asset.hpp:149
steam::asset::Asset
Superinterface describing especially bookkeeping properties.
Definition:
asset.hpp:139
asset.hpp
Steam-Layer Interface: Assets.
lib::HashVal
size_t HashVal
a STL compatible hash value
Definition:
hash-value.h:52
entry-id.hpp
Bare symbolic and hash ID used for accounting of asset like entries.
steam::asset::meta::Builder
Building and configuring a meta asset.
Definition:
asset/meta.hpp:100
lib::P
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition:
trait.hpp:71
steam::asset::meta::Descriptor
Interface: the unspecific, reflective base of meta assets.
Definition:
asset/meta.hpp:81
steam::asset
The asset subsystem of the Steam-Layer.
Definition:
wrapperptr.hpp:35
struct-scheme.hpp
Naming and labelling scheme for structural assets.
steam::asset::ID
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
Definition:
asset.hpp:99
steam
asset
meta.hpp
Generated on Fri Dec 13 2024 05:05:34 for Lumiera by
1.8.13