Line data Source code
1 :
2 : /* Copyright (c) 2011-2015, Stefan Eilemann <eile@eyescale.ch>
3 : *
4 : * This library is free software; you can redistribute it and/or modify it under
5 : * the terms of the GNU Lesser General Public License version 2.1 as published
6 : * by the Free Software Foundation.
7 : *
8 : * This library is distributed in the hope that it will be useful, but WITHOUT
9 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 : * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11 : * details.
12 : *
13 : * You should have received a copy of the GNU Lesser General Public License
14 : * along with this library; if not, write to the Free Software Foundation, Inc.,
15 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 : */
17 :
18 : #include "slaveConfig.h"
19 :
20 : #include "objectMap.h"
21 :
22 : #include <seq/application.h>
23 :
24 : namespace seq
25 : {
26 : namespace detail
27 : {
28 0 : bool SlaveConfig::mapData(const uint128_t& initID)
29 : {
30 0 : LBASSERT(!_objects);
31 :
32 0 : _objects = new ObjectMap(*this, *getApplication());
33 : const uint32_t request =
34 0 : mapObjectNB(_objects, initID, co::VERSION_OLDEST, getApplicationNode());
35 0 : return mapObjectSync(request);
36 : }
37 :
38 0 : void SlaveConfig::syncData(const uint128_t& version)
39 : {
40 0 : LBASSERT(_objects)
41 0 : _objects->sync(version);
42 0 : }
43 :
44 0 : void SlaveConfig::unmapData()
45 : {
46 0 : LBASSERT(_objects)
47 0 : unmapObject(_objects);
48 0 : delete _objects;
49 0 : _objects = 0;
50 0 : }
51 : }
52 30 : }
|