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
"
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
using
PMeta
=
lib::P<Meta>
;
143
144
145
149
class
MetaFactory
150
:
util::NonCopyable
151
{
152
public
:
153
using
PType
=
lib::P<asset::Meta>
;
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
asset.hpp
Steam-Layer Interface: Assets.
lib::P
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition
p.hpp:77
steam::asset::Asset
Superinterface describing especially bookkeeping properties.
Definition
asset.hpp:139
steam::asset::Asset::getID
virtual const ID< Asset > & getID() const
Definition
asset.hpp:199
steam::asset::ID
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
Definition
asset.hpp:98
steam::asset::ID::ID
ID(HashVal id)
Definition
asset.hpp:101
steam::asset::MetaFactory
Factory specialised for creating Metadata Asset objects.
Definition
asset/meta.hpp:151
steam::asset::MetaFactory::operator()
meta::Builder< MA > operator()(lib::idi::EntryID< MA > elementIdentity)
Generic factory method for Metadata Asset instances.
Definition
asset/meta.cpp:56
steam::asset::Meta
key abstraction: metadata, parametrisation, customisation and similar organisational traits.
Definition
asset/meta.hpp:112
steam::asset::Meta::getID
virtual const ID< Meta > & getID() const
Definition
asset/meta.hpp:117
steam::asset::Meta::Meta
Meta(Asset::Ident const &idi)
Definition
asset/meta.hpp:123
steam::asset::Meta::create
static MetaFactory create
storage for the static MetaFactory instance
Definition
asset/meta.hpp:114
steam::asset::Meta::Meta
Meta(lib::idi::EntryID< TY > const &nameID)
Definition
asset/meta.hpp:128
steam::asset::meta::Descriptor
Interface: the unspecific, reflective base of meta assets.
Definition
asset/meta.hpp:82
steam::asset::meta::Descriptor::~Descriptor
virtual ~Descriptor()
this is an Interface
Definition
asset/meta.cpp:38
util::NonCopyable
Any copy and copy construction prohibited.
Definition
nocopy.hpp:38
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
steam::asset
The asset subsystem of the Steam-Layer.
steam::asset::META
@ META
Definition
category.hpp:53
steam
Steam-Layer implementation namespace root.
nocopy.hpp
Mix-Ins to allow or prohibit various degrees of copying and cloning.
struct-scheme.hpp
Naming and labelling scheme for structural assets.
lib::idi::EntryID
typed symbolic and hash ID for asset-like position accounting.
Definition
entry-id.hpp:219
steam::asset::Asset::Ident
a POD comprised of all the information sufficiently identifying any given Asset.
Definition
asset.hpp:147
steam
asset
meta.hpp
Generated on Thu Dec 11 2025 for Lumiera by
1.9.8