forked from BigfootDev/flatbuffers
Added --filename-suffix and --filename-ext to flatc (#5778)
* Fixed refractoring issue in reflection/generate_code.sh. Also, mv deletes the original file, so I don't need to clean it up manually in that case. * Added --filename-suffix and --filename-ext to flatc * Fixed typo and added example generation of suffix and extension for C++ * Removed extra ; * Removed clang-format block from a region that didn't need it. Fixed an auto format of another clang-format block * Added docs, fixed pointer alignment, removed suffix test file
This commit is contained in:
@@ -145,6 +145,14 @@ std::string BaseGenerator::GetNameSpace(const Definition &def) const {
|
||||
return qualified_name;
|
||||
}
|
||||
|
||||
std::string BaseGenerator::GeneratedFileName(const std::string &path,
|
||||
const std::string &file_name,
|
||||
const IDLOptions &options) const {
|
||||
return path + file_name + options.filename_suffix + "." +
|
||||
(options.filename_extension.empty() ? default_extension_
|
||||
: options.filename_extension);
|
||||
}
|
||||
|
||||
// Generate a documentation comment, if available.
|
||||
void GenComment(const std::vector<std::string> &dc, std::string *code_ptr,
|
||||
const CommentConfig *config, const char *prefix) {
|
||||
|
||||
Reference in New Issue
Block a user