#include <ArrayHandlerFactory.h>
Factory class for IArrayHandler objects.
Definition at line 17 of file ArrayHandlerFactory.h.
ora::IArrayHandler * ora::ArrayHandlerFactory::newArrayHandler |
( |
const Reflex::Type & |
arrayType | ) |
|
|
static |
Definition at line 10 of file ArrayHandlerFactory.cc.
References AlCaHLTBitMon_QueryRunRegistry::string, and ora::throwException().
Referenced by ora::CArrayWriter::build(), ora::STLContainerWriter::build(), ora::QVQueryMaker::build(), ora::CArrayReader::build(), and ora::STLContainerReader::build().
12 if(arrayType.IsArray()){
13 return new CArrayHandler( arrayType );
15 Reflex::TypeTemplate templ = arrayType.TemplateFamily();
17 std::string contName = templ.Name(Reflex::SCOPED|Reflex::FINAL);
18 if( contName ==
"std::vector" ||
19 contName ==
"std::list" ||
20 contName ==
"std::set" ||
21 contName ==
"std::multiset" ||
22 contName ==
"std::deque" ||
23 contName ==
"__gnu_cxx::hash_set" ||
24 contName ==
"__gnu_cxx::hash_multiset" ||
25 contName ==
"std::map" ||
26 contName ==
"std::multimap" ||
27 contName ==
"__gnu_cxx::hash_map" ||
28 contName ==
"__gnu_cxx::hash_multimap" ){
29 return new STLContainerHandler( arrayType );
30 }
else if ( contName ==
"std::stack" ||
31 contName ==
"std::queue" ){
32 return new SpecialSTLContainerHandler( arrayType );
33 }
else if ( contName ==
"ora::PVector" ) {
34 return new PVectorHandler( arrayType );
39 throwException(
"No Array Handler available for class \""+arrayType.Name(Reflex::SCOPED)+
"\"",
40 "ArrayHandlerFactory::newArrayHandler");
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))