convenience lookup function for pipes
This commit is contained in:
parent
b42e5c859f
commit
0866d2c191
2 changed files with 19 additions and 4 deletions
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
|
||||
#include "proc/asset/pipe.hpp"
|
||||
#include "proc/assetmanager.hpp"
|
||||
#include "lib/util.hpp"
|
||||
|
||||
using util::isnil;
|
||||
|
|
@ -57,9 +58,20 @@ namespace asset {
|
|||
|
||||
PPipe
|
||||
Pipe::query (string properties)
|
||||
{
|
||||
return Struct::retrieve (Query<Pipe> (properties));
|
||||
}
|
||||
{
|
||||
return Struct::retrieve (Query<Pipe> (properties));
|
||||
}
|
||||
|
||||
|
||||
/** @param id asset-ID of the pipe to retrieve
|
||||
* @throw error::Invalid when not found
|
||||
*/
|
||||
PPipe
|
||||
Pipe::lookup (ID<Pipe> id)
|
||||
{
|
||||
return AssetManager::instance().getAsset(id);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Pipe::switchProcPatt (PProcPatt& another)
|
||||
|
|
|
|||
|
|
@ -86,7 +86,10 @@ namespace asset {
|
|||
void switchProcPatt (PProcPatt& another);
|
||||
|
||||
/** convenience shortcut for retrieving default configured pipes */
|
||||
static PPipe query (string properties) ;
|
||||
static PPipe query (string properties);
|
||||
|
||||
/** convenience shortcut for lookup by id */
|
||||
static PPipe lookup (ID<Pipe> id);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue