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 :
29 0 : bool SlaveConfig::mapData( const uint128_t& initID )
30 : {
31 0 : LBASSERT( !_objects );
32 :
33 0 : _objects = new ObjectMap( *this, *getApplication( ));
34 : const uint32_t request = mapObjectNB( _objects, initID, co::VERSION_OLDEST,
35 0 : getApplicationNode( ));
36 0 : return mapObjectSync( request );
37 : }
38 :
39 0 : void SlaveConfig::syncData( const uint128_t& version )
40 : {
41 0 : LBASSERT( _objects )
42 0 : _objects->sync( version );
43 0 : }
44 :
45 0 : void SlaveConfig::unmapData()
46 : {
47 0 : LBASSERT( _objects )
48 0 : unmapObject( _objects );
49 0 : delete _objects;
50 0 : _objects = 0;
51 0 : }
52 :
53 : }
54 42 : }
|