42static const std::string SETUP_ASSISTANT_FILE =
".setup_assistant";
53 void loadPrevious(
const std::filesystem::path& package_path,
const YAML::Node& node)
override;
61 void loadExisting(
const std::string& package_path_or_name);
102 return SETUP_ASSISTANT_FILE;
107 return "MoveIt Setup Assistant's hidden settings file. You should not need to edit this file.";
116 bool writeYaml(YAML::Emitter& emitter)
override;
138 return "package.xml";
144 return getSharePath(
"moveit_setup_framework") /
"templates" /
"package.xml.template";
149 return "Defines a ROS package";
159 using TemplatedGeneratedFile::TemplatedGeneratedFile;
168 return "CMakeLists.txt";
173 return getSharePath(
"moveit_setup_framework") /
"templates" /
"CMakeLists.txt";
178 return "CMake build system configuration file";
183 std::vector<GeneratedFilePtr>& files)
override
185 files.push_back(std::make_shared<GeneratedSettings>(package_path, last_gen_time, *
this));
186 files.push_back(std::make_shared<GeneratedPackageXML>(package_path, last_gen_time, *
this));
187 files.push_back(std::make_shared<GeneratedCMake>(package_path, last_gen_time));
std::string getDescription() const override
Returns an English description of this file's purpose.
std::filesystem::path getTemplatePath() const override
Returns the full path to the template file.
std::filesystem::path getRelativePath() const override
Returns the path relative to the configuration package root.
bool hasChanges() const override
Returns true if this file will have changes when it is written to file.
std::string getDescription() const override
Returns an English description of this file's purpose.
PackageSettingsConfig & parent_
std::filesystem::path getRelativePath() const override
Returns the path relative to the configuration package root.
std::filesystem::path getTemplatePath() const override
Returns the full path to the template file.
bool hasChanges() const override
Returns true if this file will have changes when it is written to file.
GeneratedPackageXML(const std::filesystem::path &package_path, const GeneratedTime &last_gen_time, PackageSettingsConfig &parent)
GeneratedSettings(const std::filesystem::path &package_path, const GeneratedTime &last_gen_time, PackageSettingsConfig &parent)
std::filesystem::path getRelativePath() const override
Returns the path relative to the configuration package root.
PackageSettingsConfig & parent_
std::string getDescription() const override
Returns an English description of this file's purpose.
bool hasChanges() const override
Returns true if this file will have changes when it is written to file.
bool writeYaml(YAML::Emitter &emitter) override
void setAuthorName(const std::string &name)
bool isConfigured() const override
Return true if this part of the configuration is completely set up.
bool hasValidEmail() const
void collectVariables(std::vector< TemplateVariable > &variables) override
Collect key/value pairs for use in templates.
std::string author_name_
Name of the author of this config.
bool hasValidName() const
GeneratedTime config_pkg_generated_timestamp_
Timestamp when configuration package was generated, if it was previously generated.
const std::string & getPackageName() const
void setAuthorEmail(const std::string &email)
std::string getAuthorEmail() const
void setPackagePath(const std::filesystem::path &package_path)
bool author_info_changed_
std::string getAuthorName() const
void loadPrevious(const std::filesystem::path &package_path, const YAML::Node &node) override
Overridden method to load THIS config's data variables.
void collectFiles(const std::filesystem::path &package_path, const GeneratedTime &last_gen_time, std::vector< GeneratedFilePtr > &files) override
Collect the files generated by this configuration and add them to the vector.
void setPackageName(const std::string &package_name)
const GeneratedTime & getGenerationTime() const
std::string author_email_
Email of the author of this config.
std::set< std::string > package_dependencies_
YAML::Node saveToYaml() const override
Optionally save "meta" information for saving in the .setup_assistant yaml file.
void loadExisting(const std::string &package_path_or_name)
Method for loading the contents of the .setup_assistant file into all the configs.
std::string new_package_name_
Name of the new package that is being (or going) to be generated, based on user specified save path.
std::filesystem::path config_pkg_path_
Loaded configuration package path - if an existing package was loaded, holds that path.
const std::filesystem::path & getPackagePath() const
where all the data for each part of the configuration is stored.
Specialization of GeneratedFile for generating a text file from a template.
std::filesystem::path getSharePath(const std::string &package_name)
Return a path for the given package's share folder.
std::filesystem::file_time_type GeneratedTime