ResourceAccess.inl
Go to the documentation of this file.
1 namespace iv
2 {
3 
4 template< class TResource >
6 {
7  if( !this->rms )
8  return false;
9 
10  return this->rms->has_path< TResource >( path );
11 }
12 
13 template< class TResource >
14 TResource const * ResourceAccess::get( ResourcePath const & path )
15 {
16  if( !this->rms )
17  {
18  this->cm.warning( SRC_INFO, "ResourceManagementSystem does not exist." );
19  return nullptr;
20  }
21 
22  Resource_LogTrace _trace( path );
23  return this->rms->get< TResource >( path );
24 }
25 
26 template< class TResource >
27 void ResourceAccess::each_resource( std::function< void( ResourcePath const & path ) > const & )
28 {
29  if( !this->rms )
30  {
31  this->cm.warning( SRC_INFO, "ResourceManagementSystem does not exist." );
32  return;
33  }
34 
35  return this->rms->each_resource< TResource >();
36 }
37 
38 }