IOConnections.hpp
1 /*---------------------------------------------------------------------------*\
2 *
3 * mimmo
4 *
5 * Copyright (C) 2015-2021 OPTIMAD engineering Srl
6 *
7 * -------------------------------------------------------------------------
8 * License
9 * This file is part of mimmo.
10 *
11 * mimmo is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License v3 (LGPL)
13 * as published by the Free Software Foundation.
14 *
15 * mimmo is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with mimmo. If not, see <http://www.gnu.org/licenses/>.
22 *
23 \*---------------------------------------------------------------------------*/
24 #ifndef __IOCONNECTIONS_HPP__
25 #define __IOCONNECTIONS_HPP__
26 
27 #include "BaseManipulation.hpp"
28 
29 namespace mimmo{
30 
54 
55 protected:
56  std::unordered_map<std::string, BaseManipulation * > m_mapConn;
57  std::unordered_map<BaseManipulation *, std::string > m_invMapConn;
59  bitpit::Logger* m_log;
61 public:
62  IOConnections_MIMMO(std::unordered_map<std::string, BaseManipulation * > mapConn);
63  virtual ~IOConnections_MIMMO();
64 
66 
67  //execution utils
68  void absorbConnections(const bitpit::Config & slotXML, bool debug = false);
69  void flushConnections(bitpit::Config & slotXML, bool debug = false);
70 };
71 
72 };
73 
74 #endif /* __IOCONNECTIONS_HPP__ */
void flushConnections(bitpit::Config &slotXML, bool debug=false)
void absorbConnections(const bitpit::Config &slotXML, bool debug=false)
std::unordered_map< BaseManipulation *, std::string > m_invMapConn
IOConnections_MIMMO(std::unordered_map< std::string, BaseManipulation * > mapConn)
std::unordered_map< std::string, BaseManipulation * > m_mapConn
IOConnections_MIMMO is a class to read/write mimmo pin connections from XML IO/parser defined in bitp...