Lumiera  0.pre.03
»edit your freedom«
Category Class Reference

#include "steam/asset/category.hpp"

Description

Tree like classification of Assets.

By virtue of the Category, Assets can be organised in nested bins (folders). This includes the distinction of different kinds of Assets, like Audio, Video, Effects...

Remarks
the path in the tree constitutes a type classification scheme
Todo:
could be far more elaborate. could be a singleton like centralised tree, while just holding references to Category nodes in the individual Asset. At the moment, we just use the most simplistic implementation and handle Category objects using value semantics.

Definition at line 75 of file category.hpp.

Public Member Functions

 Category (const Kind root, Literal subfolder="")
 
int compare (Category const &co) const
 
bool hasKind (Kind refKind) const
 
bool isWithin (Category const &) const
 hierarchical inclusion test. More...
 
 operator string () const
 human readable representation of the asset::Category. More...
 
bool operator!= (Category const &other) const
 
bool operator== (Category const &other) const
 
void setPath (string const &newpath)
 

Friends

size_t hash_value (Category const &)
 

Private Attributes

Kind kind_
 
string path_
 

Member Function Documentation

◆ isWithin()

bool isWithin ( Category const &  ref) const

hierarchical inclusion test.

Returns
true if this can be considered a subcategory of the given reference

Definition at line 69 of file category.cpp.

◆ operator string()

operator string ( ) const

human readable representation of the asset::Category.

Todo:
to be localized.

Definition at line 44 of file category.cpp.

+ Collaboration diagram for Category:

The documentation for this class was generated from the following files: