55 #ifndef STEAM_INTERFACE_ASSET_H 56 #define STEAM_INTERFACE_ASSET_H 66 #include <boost/type_traits/is_base_of.hpp> 67 #include <boost/operators.hpp> 87 using std::static_pointer_cast;
113 ID (
const KIND&
asset) : hash_(asset.getID()) {}
114 operator HashVal()
const {
return hash_; }
149 :
public boost::totally_ordered1< Asset
150 , util::NonCopyable >
159 : boost::totally_ordered<Ident>
187 Ident (
const string& n,
189 const string& o =
"lumi",
193 int compare (
Ident const& other)
const;
196 bool operator== (
Ident const& oi)
const {
return compare (oi) ==0; }
197 bool operator< (
Ident const& oi)
const {
return compare (oi) < 0; }
199 operator string ()
const;
201 bool isValid()
const;
210 virtual const ID<Asset>& getID()
const {
return id; }
213 bool operator== (
Asset const& oa)
const {
return ident == oa.
ident; }
214 bool operator< (
Asset const& oa)
const {
return ident < oa.
ident; }
216 virtual operator string ()
const;
235 vector<PAsset> parents;
236 vector<PAsset> dependants;
248 virtual ~
Asset() = 0;
261 virtual void unlink ();
265 virtual void unlink (IDA target);
269 void defineDependency (PAsset parent);
270 void defineDependency (
Asset& parent);
276 void unregister (PAsset& other);
285 const vector<PAsset>&
getParents ()
const {
return parents; }
296 bool isActive ()
const;
304 bool enable (
bool on=
true);
324 if (0 != (res=category.compare (oi.
category)))
return res;
325 if (0 != (res=org.compare (oi.
org)))
return res;
335 return static_pointer_cast<
const Asset,A> (subPtr);
345 : 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.