UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
resource Class Reference
Inheritance diagram for resource:
Inheritance graph
Collaboration diagram for resource:
Collaboration graph

Public Member Functions

virtual ~resource ()
 

Static Public Member Functions

static resource * create (type_t type, options_t const &options)
 
static string get_suffix (type_t type)
 

Detailed Description

Definition at line 99 of file resource_manager.cpp.

Constructor & Destructor Documentation

◆ ~resource()

virtual resource::~resource ( )
inlinevirtual

Definition at line 101 of file resource_manager.cpp.

101{}

Member Function Documentation

◆ create()

resource * resource::create ( type_t type,
options_t const & options )
static

Definition at line 233 of file resource_manager.cpp.

234{
235 if(type == TYPE_LOCK) {
236 return new lock;
237 } else if(type == TYPE_SHM) {
238 return new shm(dynamic_cast<const shm_opts &>(options));
239 } else if(type == TYPE_SINGLETON) {
240 return new singleton(dynamic_cast<const singleton_opts &>(options));
241 } else {
242 throw logic_error("Wrong typeid");
243 }
244}
#define TYPE_LOCK
#define TYPE_SHM
#define TYPE_SINGLETON
Option::OptType type
Definition settings.cpp:194
Definition rtp.c:253

References type, TYPE_LOCK, TYPE_SHM, and TYPE_SINGLETON.

Referenced by resource_manager_t::acquire().

◆ get_suffix()

string resource::get_suffix ( type_t type)
static

Definition at line 246 of file resource_manager.cpp.

247{
248 if(type == TYPE_LOCK) {
249 return string("mutex");
250 } else if(type == TYPE_SHM) {
251 return string("SHM");
252 } else if(type == TYPE_SINGLETON) {
253 return string("singleton");
254 } else {
255 throw logic_error("Wrong typeid");
256 }
257}

References type, TYPE_LOCK, TYPE_SHM, and TYPE_SINGLETON.

Referenced by resource_manager_t::acquire(), and resource_manager_t::release().


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