Debian Codegraph @

Kernel/DataTypeCenter.cpp

raw symbols SCIP
1 /* This file is part of the FaCT++ DL reasoner
2 Copyright (C) 2003-2015 Dmitry Tsarkov and The University of Manchester
3 Copyright (C) 2015-2017 Dmitry Tsarkov
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #include "taxNamEntry.h"cxx . . $ `<file>/Kernel/taxNamEntry.h`/
21 #include "DataTypeCenter.h"cxx . . $ `<file>/Kernel/DataTypeCenter.h`/
22 #include "DataReasoning.h"cxx . . $ `<file>/Kernel/DataReasoning.h`/
23
24 DataTypeCentercxx . . $ DataTypeCenter# :: ~cxx . . $ DataTypeCenter#`~DataTypeCenter`(49f6e7a06ebc5aa8).DataTypeCentercxx . . $ DataTypeCenter#()
25 {
26 for ( iteratorcxx . . $ DataTypeCenter#iterator# p = begincxx . . $ DataTypeCenter#begin(99a336bd71a1b5e9).(), p_end = endcxx . . $ DataTypeCenter#end(99a336bd71a1b5e9).(); p <cxx . . $ __gnu_cxx/`operator<`(ef3c5749062e825c). p_end; ++cxx . . $ __gnu_cxx/__normal_iterator#operator++(93f2e9c3bc4efc49).p )
27 delete *cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(c076846f881f3e7e).p;
28 }
29
30 TDataTypecxx . . $ TDataType#*
31 DataTypeCentercxx . . $ DataTypeCenter# :: getTypeByNamecxx . . $ DataTypeCenter#getTypeByName(1a5dcb8288271487). ( const stdcxx . . $ std/::stringcxx . . $ std/string#& name ) const
32 {
33 // special case whatever you want here
34
35 // go through all types and check the name
36 for ( const_iteratorcxx . . $ DataTypeCenter#const_iterator# p = begincxx . . $ DataTypeCenter#begin(d46f38987ef461d7).(), p_end = endcxx . . $ DataTypeCenter#end(d46f38987ef461d7).(); p <cxx . . $ __gnu_cxx/`operator<`(ef3c5749062e825c). p_end; ++cxx . . $ __gnu_cxx/__normal_iterator#operator++(93f2e9c3bc4efc49).p )
37 if ( name ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). (*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(c076846f881f3e7e).p)->getTypecxx . . $ TDataType#getType(2a23bdf9a3864e65).()->getNamecxx . . $ TNamedEntry#getName(a9f41ea0e82d88cf).() )
38 return *cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(c076846f881f3e7e).p;
39
40 return nullptr;
41 }
42
43 void
44 DataTypeCentercxx . . $ DataTypeCenter# :: setLockedcxx . . $ DataTypeCenter#setLocked(b45ddcbc8423892c). ( bool val )
45 {
46 if ( val )
47 return;
48
49 for ( iteratorcxx . . $ DataTypeCenter#iterator# p = begincxx . . $ DataTypeCenter#begin(99a336bd71a1b5e9).(), p_end = endcxx . . $ DataTypeCenter#end(99a336bd71a1b5e9).(); p <cxx . . $ __gnu_cxx/`operator<`(ef3c5749062e825c). p_end; ++cxx . . $ __gnu_cxx/__normal_iterator#operator++(93f2e9c3bc4efc49).p )
50 (*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(c076846f881f3e7e).p)->setLockedcxx . . $ TNECollection#setLocked(efaadfb7dc14930a).(val);
51 }
52
53 void
54 DataTypeCentercxx . . $ DataTypeCenter# :: initDataTypeReasonercxx . . $ DataTypeCenter#initDataTypeReasoner(2eaf9760777a0523). ( DataTypeReasonercxx . . $ DataTypeReasoner#& DTReasoner ) const
55 {
56 for ( const_iteratorcxx . . $ DataTypeCenter#const_iterator# p = begincxx . . $ DataTypeCenter#begin(d46f38987ef461d7).(), p_end = endcxx . . $ DataTypeCenter#end(d46f38987ef461d7).(); p <cxx . . $ __gnu_cxx/`operator<`(ef3c5749062e825c). p_end; ++cxx . . $ __gnu_cxx/__normal_iterator#operator++(93f2e9c3bc4efc49).p )
57 {
58 TDataEntrycxx . . $ TDataEntry#* type = (*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(c076846f881f3e7e).p)->getTypecxx . . $ TDataType#getType(2a23bdf9a3864e65).();
59 if ( isValidcxx . . $ isValid(83c267b20bac841a).(type->getBPcxx . . $ TDataEntry#getBP(455f465bc33b4cdf).()) )
60 DTReasoner.registerDataTypecxx . . $ DataTypeReasoner#registerDataType(e6573819832c2575).(type);
61 }
62 }