#include <switches.h>
Definition at line 19 of file switches.h.
◆ Switches() [1/2]
impeller::scene::importer::Switches::Switches |
( |
| ) |
|
|
default |
◆ ~Switches()
impeller::scene::importer::Switches::~Switches |
( |
| ) |
|
|
default |
◆ Switches() [2/2]
impeller::scene::importer::Switches::Switches |
( |
const fml::CommandLine & |
command_line | ) |
|
|
explicit |
Definition at line 54 of file switches.cc.
57 false,
63 return;
64 }
65}
std::string GetOptionValueWithDefault(std::string_view name, std::string_view default_value) const
fml::UniqueFD OpenDirectory(const char *path, bool create_if_necessary, FilePermission permission)
std::string Utf8FromPath(const std::filesystem::path &path)
Converts a native format path to a utf8 string.
static SourceType SourceTypeFromCommandLine(const fml::CommandLine &command_line)
std::shared_ptr< fml::UniqueFD > working_directory
std::string output_file_name
std::string source_file_name
◆ AreValid()
bool impeller::scene::importer::Switches::AreValid |
( |
std::ostream & |
explain | ) |
const |
Definition at line 67 of file switches.cc.
67 {
68 bool valid = true;
69
71 explain << "Unknown input type." << std::endl;
72 valid = false;
73 }
74
76 explain << "Could not figure out working directory." << std::endl;
77 valid = false;
78 }
79
81 explain << "Input file name was empty." << std::endl;
82 valid = false;
83 }
84
86 explain << "Target output file name was empty." << std::endl;
87 valid = false;
88 }
89
90 return valid;
91}
◆ PrintHelp()
void impeller::scene::importer::Switches::PrintHelp |
( |
std::ostream & |
stream | ) |
|
|
static |
Definition at line 24 of file switches.cc.
24 {
26 stream <<
"SceneC is an offline 3D geometry file parser." << std::endl;
27 stream <<
"---------------------------------------------------------------"
28 << std::endl;
29 stream <<
"Valid Argument are:" << std::endl;
30 stream <<
"--input=<source_file>" << std::endl;
31 stream <<
"[optional] --input-kind={";
33 stream << source_type.first <<
", ";
34 }
35 stream <<
"} (default: gltf)" << std::endl;
36 stream <<
"--output=<output_file>" << std::endl;
37}
static const std::map< std::string, SourceType > kKnownSourceTypes
◆ input_type
SourceType impeller::scene::importer::Switches::input_type |
◆ output_file_name
std::string impeller::scene::importer::Switches::output_file_name |
◆ source_file_name
std::string impeller::scene::importer::Switches::source_file_name |
◆ working_directory
std::shared_ptr<fml::UniqueFD> impeller::scene::importer::Switches::working_directory |
The documentation for this struct was generated from the following files: