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 
29 #include <string>
30 #include <map>
31 
33 {
34  using StringList = std::vector<std::string>;
35 
36  /**
37  * @class CMakeParser
38  * @ingroup parser
39  * @brief This class has multiple methods for extracting data out of packages, based on their name.
40  */
42  {
43 
44  public:
45  /**
46  * Parses the package of the given name and creates a Package out of the parsed data.
47  * @param name name of the package to be parsed
48  * @return a Package containing the data parsed out of the original package
49  */
51 
52  /**
53  * @brief Parses the package of the given name and creates a Package out of the parsed data.
54  * @param name name of the package to be parsed
55  * @param openedScenarios filters the package scenarios
56  * @return
57  */
58  ScenarioManager::Data_Structure::PackagePtr parsePackage(std::string name, StringList openedScenarios);
59 
60  /**
61  * @return {@code true} if a package with the given name was found
62  */
63  bool packageFound(std::string name);
64 
65  static StringList FilterPackagesForScenario(std::string scenario);
66 
68 
69  private:
70  static std::map<std::string, StringList> cachedTrees;
71  };
72 }
ScenarioManager::Parser::PackageBuilder::packageFound
bool packageFound(std::string name)
ScenarioManager::Parser::PackageBuilder::parsePackage
ScenarioManager::Data_Structure::PackagePtr parsePackage(std::string name)
Parses the package of the given name and creates a Package out of the parsed data.
Definition: PackageBuilder.cpp:45
ScenarioManager::Parser::PackageBuilder::GetDefaultPackages
static StringList GetDefaultPackages()
Definition: PackageBuilder.cpp:154
ScenarioManager::Parser::PackageBuilder
Definition: PackageBuilder.h:41
Package.h
ScenarioManager::Data_Structure::PackagePtr
std::shared_ptr< Package > PackagePtr
Definition: Package.h:121
ScenarioManager::Parser
Definition: DependenciesGenerator.h:34
ScenarioManager::Parser::PackageBuilder::FilterPackagesForScenario
static StringList FilterPackagesForScenario(std::string scenario)
Definition: PackageBuilder.cpp:133
ScenarioManager::Parser::StringList
std::vector< std::string > StringList
Definition: PackageBuilder.h:34