PackageBuilder.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package ArmarXCore::core
19 * @author Cedric Seehausen (usdnr at kit dot edu)
20 * @date 2016
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25
26#pragma once
27
28#include <map>
29#include <string>
30
32
34{
35 using StringList = std::vector<std::string>;
36
37 /**
38 * @class CMakeParser
39 * @ingroup parser
40 * @brief This class has multiple methods for extracting data out of packages, based on their name.
41 */
43 {
44
45 public:
46 /**
47 * Parses the package of the given name and creates a Package out of the parsed data.
48 * @param name name of the package to be parsed
49 * @return a Package containing the data parsed out of the original package
50 */
52
53 /**
54 * @brief Parses the package of the given name and creates a Package out of the parsed data.
55 * @param name name of the package to be parsed
56 * @param openedScenarios filters the package scenarios
57 * @return
58 */
60 StringList openedScenarios);
61
62 /**
63 * @return {@code true} if a package with the given name was found
64 */
65 bool packageFound(std::string name);
66
67 static StringList FilterPackagesForScenario(std::string scenario);
68
70
71 private:
72 static std::map<std::string, StringList> cachedTrees;
73 };
74} // namespace ScenarioManager::Parser
ScenarioManager::Data_Structure::PackagePtr parsePackage(std::string name)
Parses the package of the given name and creates a Package out of the parsed data.
static StringList FilterPackagesForScenario(std::string scenario)
std::shared_ptr< Package > PackagePtr
Definition Package.h:122
std::vector< std::string > StringList