summaryrefslogtreecommitdiff
path: root/src/idl_gen_text.cpp
diff options
context:
space:
mode:
authorWouter van Oortmerssen <wvo@google.com>2014-09-16 17:37:17 -0700
committerWouter van Oortmerssen <wvo@google.com>2014-09-18 12:29:31 -0700
commit557c88c0396220e79e9a43c07f8393a5c68b739d (patch)
tree1e837db4c944197b63dd7a6547ae5eb0adc166d4 /src/idl_gen_text.cpp
parentd01b30cdd688166caa93df67546191543892453a (diff)
downloadflatbuffers-557c88c0396220e79e9a43c07f8393a5c68b739d.tar.gz
flatbuffers-557c88c0396220e79e9a43c07f8393a5c68b739d.tar.bz2
flatbuffers-557c88c0396220e79e9a43c07f8393a5c68b739d.zip
Refactored the Java and C# code generators into one.
Also made the C# implementation support unsigned types, and made it more like the Java version. Bug: 17359988 Change-Id: If5305c08cd5c97f35426639516ce05e53bbec36c Tested: on Linux and Windows.
Diffstat (limited to 'src/idl_gen_text.cpp')
-rw-r--r--src/idl_gen_text.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/idl_gen_text.cpp b/src/idl_gen_text.cpp
index cbcd1719..e0299379 100644
--- a/src/idl_gen_text.cpp
+++ b/src/idl_gen_text.cpp
@@ -159,7 +159,7 @@ template<> void Print<const void *>(const void *val,
type = type.VectorType();
// Call PrintVector above specifically for each element type:
switch (type.base_type) {
- #define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, JTYPE, GTYPE) \
+ #define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, JTYPE, GTYPE, NTYPE) \
case BASE_TYPE_ ## ENUM: \
PrintVector<CTYPE>( \
*reinterpret_cast<const Vector<CTYPE> *>(val), \
@@ -225,7 +225,7 @@ static void GenStruct(const StructDef &struct_def, const Table *table,
OutputIdentifier(fd.name, opts, _text);
text += ": ";
switch (fd.value.type.base_type) {
- #define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, JTYPE, GTYPE) \
+ #define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, JTYPE, GTYPE, NTYPE) \
case BASE_TYPE_ ## ENUM: \
GenField<CTYPE>(fd, table, struct_def.fixed, \
opts, indent + Indent(opts), _text); \
@@ -233,7 +233,7 @@ static void GenStruct(const StructDef &struct_def, const Table *table,
FLATBUFFERS_GEN_TYPES_SCALAR(FLATBUFFERS_TD)
#undef FLATBUFFERS_TD
// Generate drop-thru case statements for all pointer types:
- #define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, JTYPE, GTYPE) \
+ #define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, JTYPE, GTYPE, NTYPE) \
case BASE_TYPE_ ## ENUM:
FLATBUFFERS_GEN_TYPES_POINTER(FLATBUFFERS_TD)
#undef FLATBUFFERS_TD