61 const std::set<std::string>& dependencies = {})
167 const std::filesystem::path& relative_path,
const std::string&
description)
198 std::vector<GeneratedFilePtr>& files)
const
200 files.push_back(std::make_shared<GenericLaunchTemplate>(package_path, last_gen_time, *
this));
205 std::make_shared<BonusTemplatedFile>(package_path, last_gen_time, bonus_file.path, bonus_file.description));
Specialization of GeneratedFile for generating a text file from a template.
static std::vector< TemplateVariable > variables
bool write() override
Writes the file to disk.
std::filesystem::path getTemplatePath() const override
Returns the full path to the template file.
std::string getDescription() const override
Returns an English description of this file's purpose.
BonusTemplatedFile(const std::filesystem::path &package_path, const GeneratedTime &last_gen_time, const std::filesystem::path &relative_path, const std::string &description)
std::filesystem::path relative_path_
bool hasChanges() const override
Returns true if this file will have changes when it is written to file.
std::filesystem::path getRelativePath() const override
Returns the path relative to the configuration package root.
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.
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.
std::filesystem::path template_path_
GenericLaunchTemplate(const std::filesystem::path &package_path, const GeneratedTime &last_gen_time, const LaunchBundle &parent)
const LaunchBundle & parent_
std::filesystem::path relative_path_
std::string function_name_
bool write() override
Writes the file to disk.
One launch file and any other bonus files that get bundled with it, i.e. the RViz launch file and its...
const std::set< std::string > getDependencies() const
const std::string & getDescription() const
const std::string & getTitle() const
bool operator<(const LaunchBundle &other) const
Defined so that LaunchBundles can be added to sets.
unsigned int getID() const
The ID is an index in a list, used for quick identification and argument passing.
LaunchBundle(const std::string &title, const std::string &description, const std::string &launch_name, const std::set< std::string > &dependencies={})
void setID(unsigned int id)
std::vector< BonusFile > bonus_files_
void collectFiles(const std::filesystem::path &package_path, const GeneratedTime &last_gen_time, std::vector< GeneratedFilePtr > &files) const
void addFile(const std::filesystem::path &relative_path, const std::string &description)
std::set< std::string > dependencies_
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
Simple Key/value pair for templates.
BonusFile(const std::filesystem::path &path, const std::string &description)
std::filesystem::path path