StateGroupDocGenerator.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
19 * @author
20 * @date
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24#pragma once
25
29
30#include "GroupXmlReader.h"
31
32namespace armarx
33{
34
36 {
37 struct StateInfo
38 {
39 StateInfo(std::string package, std::string group, std::string state) :
40 package(package), group(group), state(state)
41 {
42 }
43
44 std::string package, group, state;
45
46 std::string
47 toString() const
48 {
49 return package + "-" + group + "-" + state;
50 }
51 };
52
53 public:
55 std::string generateDocString(const StatechartGroupXmlReaderPtr& reader) const;
56 void generateDoxygenFile(const std::string& groupDefinitionFilePath);
57 void generateDoxygenFiles(const std::vector<std::string>& groups);
58
59 void setOutputpath(const std::string& outputPath);
60
61 static std::vector<std::string>
62 FindAllStatechartGroupDefinitions(const std::filesystem::path& path);
63
65
66 std::set<std::string> getUsedProfiles(const RapidXmlReaderNode& stateNode) const;
67 void buildReferenceIndex(const std::vector<std::string>& groups);
68
69 protected:
70 //std::map<std::string, StatechartGroupXmlReaderPtr> readers;
71 std::map<std::string, CMakePackageFinder> finders;
72 std::string outputPath;
73 std::map<std::string, StateInfo> uuidToStateInfoMap;
74 std::map<std::string, std::set<std::string>> usageMap;
75
76 private:
77 DoxTablePtr buildParameterTable(RapidXmlReaderNode parametersNode) const;
78 void addParameterTable(const DoxDocPtr& doc,
79 const RapidXmlReaderNode& stateNode,
80 std::string name,
81 const char* nodeName) const;
82 std::string unescapeString(std::string str) const;
83 std::string nToBr(std::string str) const;
84 std::string fmt(const std::string& fmt, const std::string& arg1) const;
85 std::string
86 fmt(const std::string& fmt, const std::string& arg1, const std::string& arg2) const;
87 std::string fmt(const std::string& fmt,
88 const std::string& arg1,
89 const std::string& arg2,
90 const std::string& arg3) const;
91 std::string fmt(const std::string& fmt,
92 const std::string& arg1,
93 const std::string& arg2,
94 const std::string& arg3,
95 const std::string& arg4) const;
96 std::string getNodeAttrsFromStateType(const std::string& nodeType) const;
97 };
98
99} // namespace armarx
std::string str(const T &t)
The CMakePackageFinder class provides an interface to the CMake Package finder capabilities.
void setOutputpath(const std::string &outputPath)
std::set< std::string > getUsedProfiles(const RapidXmlReaderNode &stateNode) const
std::map< std::string, StateInfo > uuidToStateInfoMap
void generateDoxygenFiles(const std::vector< std::string > &groups)
CMakePackageFinder getFinder(const StatechartGroupXmlReaderPtr &reader)
static std::vector< std::string > FindAllStatechartGroupDefinitions(const std::filesystem::path &path)
std::map< std::string, std::set< std::string > > usageMap
std::string generateDocString(const StatechartGroupXmlReaderPtr &reader) const
void buildReferenceIndex(const std::vector< std::string > &groups)
void generateDoxygenFile(const std::string &groupDefinitionFilePath)
std::map< std::string, CMakePackageFinder > finders
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< DoxDoc > DoxDocPtr
Definition DoxDoc.h:40
std::shared_ptr< StatechartGroupXmlReader > StatechartGroupXmlReaderPtr
std::shared_ptr< DoxTable > DoxTablePtr
Definition DoxTable.h:35