Ocean
|
This class implements a medium reference manager. More...
#include <MediumRef.h>
Public Member Functions | |
MediumRef | registerMedium (Medium *medium) |
Registers a new medium. | |
MediumRef | medium (const std::string &url, const std::string &library, const Medium::Type type) |
Returns a medium by a given url. | |
Protected Types | |
typedef std::multimap< std::string, MediumRef > | MediumMap |
Map mapping urls to medium references. | |
Protected Member Functions | |
~MediumRefManager () | |
Destructs the manager. | |
MediumRef | medium (const std::string &url) |
Returns a medium by a given url. | |
MediumRef | medium (const std::string &url, const Medium::Type type) |
Returns a medium by a given url. | |
bool | isRegistered (const Medium *medium) |
Returns whether a medium is registered at this manager. | |
void | unregisterMedium (const Medium *medium) |
Unregisters a medium. | |
![]() | |
Singleton ()=default | |
Default constructor. | |
Protected Attributes | |
MediumMap | mediumMap |
Map holding all medium references. | |
Lock | lock |
Lock for the medium map. | |
Friends | |
class | Singleton< MediumRefManager > |
class | ObjectRef< Medium > |
class | Medium |
class | Manager |
Additional Inherited Members | |
![]() | |
static MediumRefManager & | get () |
Returns a reference to the unique object. | |
This class implements a medium reference manager.
|
protected |
Map mapping urls to medium references.
|
protected |
Destructs the manager.
|
protected |
Returns whether a medium is registered at this manager.
medium | Medium to check |
|
protected |
Returns a medium by a given url.
If the medium does not exist an empty reference is returned.
url | Url of the medium that has to be returned |
|
protected |
Returns a medium by a given url.
If the medium does not exist an empty reference is returned.
url | Url of the requested medium |
type | Type of the expected medium |
MediumRef Ocean::Media::MediumRefManager::medium | ( | const std::string & | url, |
const std::string & | library, | ||
const Medium::Type | type | ||
) |
Returns a medium by a given url.
If the medium does not exist an empty reference is returned.
url | Url of the new medium |
library | Name of the owner library |
type | Type of the expected medium |
|
protected |
Unregisters a medium.
medium | Medium to unregister |
|
friend |
|
protected |
Map holding all medium references.