summaryrefslogtreecommitdiff
path: root/src/idl_parser.cpp
diff options
context:
space:
mode:
authorEdward <ed.foux@gmail.com>2019-08-19 12:46:48 -0700
committerWouter van Oortmerssen <aardappel@gmail.com>2019-08-19 12:46:48 -0700
commita20e71ac96f87d3b3af9ffc070d0e3d9a421b1f9 (patch)
treea8570683b3a04d57e46557fb5564c5ff34da75be /src/idl_parser.cpp
parentacc9990abd2206491480291b0f85f925110102ea (diff)
downloadflatbuffers-a20e71ac96f87d3b3af9ffc070d0e3d9a421b1f9.tar.gz
flatbuffers-a20e71ac96f87d3b3af9ffc070d0e3d9a421b1f9.tar.bz2
flatbuffers-a20e71ac96f87d3b3af9ffc070d0e3d9a421b1f9.zip
has_method support for primitive fields in java runtime. Changed: idl.h, FlatBufferBuilder.java , idl_gen_general.cpp, idl_parser.cpp, flatc.cpp (#5468)
* has_method support for primitive fields in java runtime * adding the new flag to flatc * addressing the review comments
Diffstat (limited to 'src/idl_parser.cpp')
-rw-r--r--src/idl_parser.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp
index 31b315ca..c906d821 100644
--- a/src/idl_parser.cpp
+++ b/src/idl_parser.cpp
@@ -102,6 +102,18 @@ std::string MakeCamel(const std::string &in, bool first) {
return s;
}
+// Convert an underscore_based_identifier in to screaming snake case.
+std::string MakeScreamingCamel(const std::string &in) {
+ std::string s;
+ for (size_t i = 0; i < in.length(); i++) {
+ if (in[i] != '_')
+ s += static_cast<char>(toupper(in[i]));
+ else
+ s += in[i];
+ }
+ return s;
+}
+
void DeserializeDoc( std::vector<std::string> &doc,
const Vector<Offset<String>> *documentation) {
if (documentation == nullptr) return;