All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
DODBasicMapper.cpp
Go to the documentation of this file.
1 // Include files
2 
3 #include "GaudiKernel/HashMap.h"
4 #include "GaudiKernel/Parsers.h"
5 // Local implementation of parsers from HashMap
6 namespace Gaudi {
7  namespace Parsers {
10  template <typename K, typename V>
13  StatusCode sc = parse(tmp, input);
14  if (sc.isSuccess()) {
15  result.clear();
16  result.insert(tmp.begin(), tmp.end());
17  }
18  return sc;
19  }
20  }
21 }
22 
23 // local
24 #include "DODBasicMapper.h"
25 
26 // ----------------------------------------------------------------------------
27 // Implementation file for class: DODBasicMapper
28 //
29 // 16/01/2012: Marco Clemencic
30 // ----------------------------------------------------------------------------
32 
33 Gaudi::Utils::TypeNameString DODBasicMapper::algorithmForPath(const std::string & path)
34 {
35  auto alg = m_algMap.find(path);
36  return (alg != m_algMap.end()) ? alg->second : "";
37 }
38 
39 
41 {
42  auto node = m_nodeMap.find(path);
43  return (node != m_nodeMap.end()) ? node->second : "";
44 }
45 
46 // ============================================================================
Default implementation of a DataOnDemand mapper.
The declaration of major parsing functions used e.g for (re)implementation of new extended properties...
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
STL namespace.
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
T end(T...args)
std::string nodeTypeForPath(const std::string &path) override
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
T find(T...args)
T begin(T...args)
Common class providing an architecture-independent hash map.
Definition: HashMap.h:77
std::pair< iterator, bool > insert(ValueType &&val)
Definition: Map.h:168
void clear()
Definition: Map.h:178
Helper functions to set/get the application return code.
Definition: __init__.py:1