46 #ifndef STEAM_INTERFACE_ASSET_H 47 #define STEAM_INTERFACE_ASSET_H 57 #include <boost/type_traits/is_base_of.hpp> 58 #include <boost/operators.hpp> 78 using std::static_pointer_cast;
104 ID (
const KIND&
asset) : hash_(asset.getID()) {}
105 operator HashVal()
const {
return hash_; }
140 :
public boost::totally_ordered1< Asset
141 , util::NonCopyable >
150 : boost::totally_ordered<Ident>
178 Ident (
const string& n,
180 const string& o =
"lumi",
184 int compare (
Ident const& other)
const;
187 bool operator== (
Ident const& oi)
const {
return compare (oi) ==0; }
188 bool operator< (
Ident const& oi)
const {
return compare (oi) < 0; }
190 operator string ()
const;
192 bool isValid()
const;
201 virtual const ID<Asset>& getID()
const {
return id; }
204 bool operator== (
Asset const& oa)
const {
return ident == oa.
ident; }
205 bool operator< (
Asset const& oa)
const {
return ident < oa.
ident; }
207 virtual operator string ()
const;
226 vector<PAsset> parents;
227 vector<PAsset> dependants;
239 virtual ~
Asset() = 0;
252 virtual void unlink ();
256 virtual void unlink (IDA target);
260 void defineDependency (PAsset parent);
261 void defineDependency (
Asset& parent);
267 void unregister (PAsset& other);
276 const vector<PAsset>&
getParents ()
const {
return parents; }
287 bool isActive ()
const;
295 bool enable (
bool on=
true);
315 if (0 != (res=category.compare (oi.
category)))
return res;
316 if (0 != (res=org.compare (oi.
org)))
return res;
326 return static_pointer_cast<
const Asset,A> (subPtr);
336 : boost::is_base_of<Asset, A> {};
string name
element ID, comprehensible but sanitised.
int compare(Ident const &other) const
ordering of Assets is based on the ordering of Ident tuples, which are supposed to be unique...
Tree like classification of Assets.
const Ident ident
Asset identification tuple.
Customised refcounting smart pointer.
Facade for the Asset subsystem.
This header is for including and configuring NoBug.
Steam-Layer implementation namespace root.
const PcAsset pAsset(shared_ptr< A > const &subPtr)
promote subtype-ptr to PAsset, e.g.
const ID< Asset > id
Asset primary key.
Implementation of the registry holding all Asset instances known to the Asset Manager subsystem...
Mix-Ins to allow or prohibit various degrees of copying and cloning.
a POD comprised of all the information sufficiently identifying any given Asset.
const vector< PAsset > & getDependant() const
All the other assets requiring this asset to be functional.
type trait for detecting a shared-ptr-to-asset
Superinterface describing especially bookkeeping properties.
set< string > groups
additional classification, selections or departments this asset belongs to.
const string longDesc
user visible qualification of the thing, unit or concept represented by this asset.
static ID INVALID
marker constant denoting a NIL asset
Lumiera error handling (C++ interface).
const vector< PAsset > & getParents() const
List of entities this asset depends on or requires to be functional.
Hash value types and utilities.
const string org
origin or authorship id.
size_t HashVal
a STL compatible hash value
const string shortDesc
user visible Name-ID.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
const uint version
version number of the thing or concept represented by this asset.
asset::Category category
primary tree like classification of the asset.
The asset subsystem of the Steam-Layer.
Definition of Asset categorisation.
thin wrapper around a size_t hash ID used as primary key for all Asset objects.