ArmarXPackageToolInterface.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 ArmarX::
19 * @author Mirko Waechter ( mirko.waechter at kit dot edu)
20 * @date 2014
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 <memory>
29 
30 #include "CMakePackageFinder.h"
31 
32 namespace armarx
33 {
34 
35  /**
36  * @class ArmarXPackageToolInterface
37  * @ingroup core-utility
38  * @brief The ArmarXPackageToolInterface class
39  */
41  {
42  public:
44  bool checkPackagePath(const std::string& pathToPackageRoot, std::string& output) const;
45  bool checkPackagePath(const std::string& pathToPackageRoot) const;
46  bool addStatechart(const std::string& statechartGroupName,
47  const std::string& statePath,
48  const std::string& packagePath = "") const;
49  bool addFullXmlStatechart(const std::string& statechartGroupName,
50  const std::string& statePath,
51  const std::string& packagePath) const;
52  bool addXmlOnlyXmlStatechart(const std::string& statechartGroupName,
53  const std::string& statePath,
54  const std::string& packagePath) const;
55  bool addCppOnlyXmlStatechart(const std::string& statechartGroupName,
56  const std::string& statePath,
57  const std::string& packagePath) const;
58  std::string getLastOutput() const;
59 
60  private:
61  bool addXmlStatechart(const std::string& componentType,
62  const std::string& replacementStrategyType,
63  const std::string& statechartGroupName,
64  const std::string& statePath,
65  const std::string& packagePath) const;
66  mutable std::string lastOutput;
67  CMakePackageFinder finder;
68  std::string packageToolPath;
69  };
70 
71  using ArmarXPackageToolInterfacePtr = std::shared_ptr<ArmarXPackageToolInterface>;
72 
73 } // namespace armarx
armarx::ArmarXPackageToolInterface::getLastOutput
std::string getLastOutput() const
Definition: ArmarXPackageToolInterface.cpp:137
armarx::ArmarXPackageToolInterfacePtr
std::shared_ptr< ArmarXPackageToolInterface > ArmarXPackageToolInterfacePtr
Definition: ArmarXPackageToolInterface.h:71
armarx::CMakePackageFinder
The CMakePackageFinder class provides an interface to the CMake Package finder capabilities.
Definition: CMakePackageFinder.h:52
armarx::ArmarXPackageToolInterface
The ArmarXPackageToolInterface class.
Definition: ArmarXPackageToolInterface.h:40
armarx::ArmarXPackageToolInterface::addStatechart
bool addStatechart(const std::string &statechartGroupName, const std::string &statePath, const std::string &packagePath="") const
Definition: ArmarXPackageToolInterface.cpp:87
armarx::ArmarXPackageToolInterface::addCppOnlyXmlStatechart
bool addCppOnlyXmlStatechart(const std::string &statechartGroupName, const std::string &statePath, const std::string &packagePath) const
Definition: ArmarXPackageToolInterface.cpp:129
armarx::ArmarXPackageToolInterface::checkPackagePath
bool checkPackagePath(const std::string &pathToPackageRoot, std::string &output) const
Definition: ArmarXPackageToolInterface.cpp:57
armarx::ArmarXPackageToolInterface::ArmarXPackageToolInterface
ArmarXPackageToolInterface()
Definition: ArmarXPackageToolInterface.cpp:39
CMakePackageFinder.h
armarx::ArmarXPackageToolInterface::addXmlOnlyXmlStatechart
bool addXmlOnlyXmlStatechart(const std::string &statechartGroupName, const std::string &statePath, const std::string &packagePath) const
Definition: ArmarXPackageToolInterface.cpp:120
armarx::ArmarXPackageToolInterface::addFullXmlStatechart
bool addFullXmlStatechart(const std::string &statechartGroupName, const std::string &statePath, const std::string &packagePath) const
Definition: ArmarXPackageToolInterface.cpp:112
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27