Debian Codegraph @

src/internal/types-by-name.cpp

raw symbols SCIP
1 /*
2 * %injeqt copyright begin%
3 * Copyright 2014 Rafał Malinowski ([email protected])
4 * %injeqt copyright end%
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #include "types-by-name.h"cxx . . $ `<file>/src/internal/types-by-name.h`/
22
23 namespace injeqtcxx . . $ injeqt/ { namespace internalcxx . . $ injeqt/internal/ {
24
25 typecxx . . $ injeqt/v1/type# type_by_pointercxx . . $ injeqt/internal/type_by_pointer(d5fc4731e87e33af).(const types_by_namecxx . . $ injeqt/internal/types_by_name# &known_types, const stdcxx . . $ std/::stringcxx . . $ std/string# &pointer_name)
26 {
27 if (pointer_name.lengthcxx . . $ std/__cxx11/basic_string#length(48278e53df7b52a5).() < 2)
28 return typecxx . . $ injeqt/v1/type#type(49f6e7a06ebc5aa8).{};
29 if (pointer_name[cxx . . $ std/__cxx11/basic_string#`operator[]`(fe0a407a03ea4a2d).pointer_name.lengthcxx . . $ std/__cxx11/basic_string#length(48278e53df7b52a5).() - 1] != '*')
30 return typecxx . . $ injeqt/v1/type#type(49f6e7a06ebc5aa8).{};
31 auto name = pointer_namecxx . . $ std/__cxx11/basic_string#basic_string(3bc0f77cdfbaa67f)..substrcxx . . $ std/__cxx11/basic_string#substr(149c655009c9bbd2).(0, pointer_name.lengthcxx . . $ std/__cxx11/basic_string#length(48278e53df7b52a5).() - 1);
32 auto item = known_types.getcxx . . $ injeqt/internal/sorted_unique_vector#get(f1b725e3c61eba).(name);
33 if (item ==cxx . . $ __gnu_cxx/`operator==`(d99b0194e00bfb5f). stdcxx . . $ std/::endcxx . . $ std/end(c459d8867450f8b2).(known_types))
34 return typecxx . . $ injeqt/v1/type#type(49f6e7a06ebc5aa8).{};
35 else
36 return *cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(c076846f881f3e7e).item;
37 }
38
39 }}