Ocean
|
This class implements a medium reference manager. More...
Public Member Functions | |
MediumRef | registerMedium (Medium *medium) |
Registers a new medium. More... | |
MediumRef | medium (const std::string &url, const std::string &library, const Medium::Type type) |
Returns a medium by a given url. More... | |
Protected Types | |
typedef std::multimap< std::string, MediumRef > | MediumMap |
Map mapping urls to medium references. More... | |
Protected Member Functions | |
~MediumRefManager () | |
Destructs the manager. More... | |
MediumRef | medium (const std::string &url) |
Returns a medium by a given url. More... | |
MediumRef | medium (const std::string &url, const Medium::Type type) |
Returns a medium by a given url. More... | |
bool | isRegistered (const Medium *medium) |
Returns whether a medium is registered at this manager. More... | |
void | unregisterMedium (const Medium *medium) |
Unregisters a medium. More... | |
Protected Member Functions inherited from Ocean::Singleton< MediumRefManager > | |
Singleton ()=default | |
Default constructor. More... | |
Protected Attributes | |
MediumMap | mediumMap |
Map holding all medium references. More... | |
Lock | lock |
Lock for the medium map. More... | |
Friends | |
class | Singleton< MediumRefManager > |
class | ObjectRef< Medium > |
class | Medium |
class | Manager |
Additional Inherited Members | |
Static Public Member Functions inherited from Ocean::Singleton< MediumRefManager > | |
static MediumRefManager & | get () |
Returns a reference to the unique object. More... | |
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 |
|
friend |
|
friend |
|
protected |
Map holding all medium references.