1/****************************************************************************
2 * Copyright (C) 2018 Woboq GmbH
3 * Dominik Schmidt <dev at dominik-schmidt.de>
4 * https://woboq.com/codebrowser.html
5 *
6 * This file is part of the Woboq Code Browser.
7 *
8 * Commercial License Usage:
9 * Licensees holding valid commercial licenses provided by Woboq may use
10 * this file in accordance with the terms contained in a written agreement
11 * between the licensee and Woboq.
12 * For further information see https://woboq.com/codebrowser.html
13 *
14 * Alternatively, this work may be used under a Creative Commons
15 * Attribution-NonCommercial-ShareAlike 3.0 (CC-BY-NC-SA 3.0) License.
16 * http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US
17 * This license does not allow you to use the code browser to assist the
18 * development of your commercial software. If you intent to do so, consider
19 * purchasing a commercial licence.
20 ****************************************************************************/
21
22#include "projectmanager.h"
23
24#include <sstream>
25
26std::vector<ProjectInfo> ProjectManager::systemProjects()
27{
28 std::vector<ProjectInfo> projects;
29
30 std::istringstream stream("include;/usr/include/");
31 std::string current;
32 std::string name;
33
34 while (std::getline(stream, current, ';')) {
35 if(name.empty()) {
36 name = current;
37 } else {
38 projects.emplace_back(name, current, ProjectInfo::Internal);
39 name.clear();
40 }
41 }
42
43 return projects;
44}
45