Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120295541
BackendFactory.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 3, 09:06
Size
801 B
Mime Type
text/x-c
Expires
Sat, Jul 5, 09:06 (2 d)
Engine
blob
Format
Raw Data
Handle
27168641
Attached To
R6622 liboncilla
BackendFactory.cpp
View Options
/**
* \file BackendFactory.cpp
*
* \date Jun 21, 2012
* \author Alexandre Tuleu
*/
#include "BackendFactory.h"
namespace rci {
namespace oncilla {
BackendFactory & BackendFactory::Instance(){
static BackendFactory * s_rci_oncilla_backend_factory = new BackendFactory();
return *s_rci_oncilla_backend_factory;
}
void BackendFactory::RegisterBackend(Priority p, EntryPtr e){
EntryByPriority::const_iterator fi = d_entries.find(p);
if(fi != d_entries.end()){
return;
}
d_entries.insert(std::make_pair(p,e));
}
BackendFactory::EntryPtr BackendFactory::HighestPriorityBackend() const{
EntryByPriority::const_reverse_iterator fi = d_entries.rbegin();
if (fi == d_entries.rend()){
return 0;
}
return fi->second;
}
} /* namespace oncilla */
} /* namespace rci */
Event Timeline
Log In to Comment