forked from ossimlabs/ossim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImageHandlerStateRegistry.cpp
More file actions
43 lines (33 loc) · 1.26 KB
/
Copy pathImageHandlerStateRegistry.cpp
File metadata and controls
43 lines (33 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <ossim/support_data/ImageHandlerStateRegistry.h>
#include <ossim/support_data/ImageHandlerStateFactory.h>
ossim::ImageHandlerStateRegistry::ImageHandlerStateRegistry()
{
}
std::shared_ptr<ossim::ImageHandlerStateRegistry> ossim::ImageHandlerStateRegistry::instance()
{
static std::shared_ptr<ossim::ImageHandlerStateRegistry> imageHandlerStateRegistry = std::make_shared<ImageHandlerStateRegistry>();
return imageHandlerStateRegistry;
}
std::shared_ptr<ossim::ImageHandlerState> ossim::ImageHandlerStateRegistry::createState(const ossimKeywordlist& kwl,
const ossimString& prefix)const
{
ScopeReadLock scopedReadLock(m_rwlock);
std::shared_ptr<ossim::ImageHandlerState> result;
for(const auto& factory:m_factoryList)
{
result = factory->createState(kwl, prefix);
if(result) break;
}
return result;
}
std::shared_ptr<ossim::ImageHandlerState> ossim::ImageHandlerStateRegistry::createState(const ossimString& typeName)const
{
ScopeReadLock scopedReadLock(m_rwlock);
std::shared_ptr<ossim::ImageHandlerState> result;
for(const auto& factory:m_factoryList)
{
result = factory->createState(typeName);
if(result) break;
}
return result;
}