aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/proto_text
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <nobody@tensorflow.org>2016-04-15 18:19:33 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-04-15 19:22:09 -0700
commit78eba877100165ac0eff954a3f9ac87c0afccfca (patch)
treed8456ebf24e9b7f34b951a557d23b2db0182fef8 /tensorflow/tools/proto_text
parent9eb5d4223ab4a229b674e40d8fefb021b888aea8 (diff)
In tools/proto_text, move comment describing API to the header.
Also clarify that google.any expansion is not supported. Change: 120013039
Diffstat (limited to 'tensorflow/tools/proto_text')
-rw-r--r--tensorflow/tools/proto_text/gen_proto_text_functions_lib.cc9
-rw-r--r--tensorflow/tools/proto_text/gen_proto_text_functions_lib.h11
2 files changed, 11 insertions, 9 deletions
diff --git a/tensorflow/tools/proto_text/gen_proto_text_functions_lib.cc b/tensorflow/tools/proto_text/gen_proto_text_functions_lib.cc
index a8e3437296..cce483c717 100644
--- a/tensorflow/tools/proto_text/gen_proto_text_functions_lib.cc
+++ b/tensorflow/tools/proto_text/gen_proto_text_functions_lib.cc
@@ -45,15 +45,6 @@ namespace {
// Note that on the generated code, various pieces are not optimized - for
// example: map input and output, Cord input and output, comparisons against
// the field names (it's a loop over all names), and tracking of has_seen.
-//
-// The generated API has, for enums and messages defined in the proto file:
-// 1. For each message:
-// * ProtoDebugString(m): same as msg.DebugString()
-// * ProtoShortDebugString(m): same as msg.ShorDebugString()
-// * ProtoParseFromString(s, m): same as TextFormat.ParseFromString(s, &m);
-// 2. For each enum:
-// * EnumName_<EnumTypeName>(enum_value): same as <EnumTypeName>(enum_value)
-// in proto.
class Generator {
public:
Generator(const string& tf_header_prefix)
diff --git a/tensorflow/tools/proto_text/gen_proto_text_functions_lib.h b/tensorflow/tools/proto_text/gen_proto_text_functions_lib.h
index f538275ec8..73ab2f6987 100644
--- a/tensorflow/tools/proto_text/gen_proto_text_functions_lib.h
+++ b/tensorflow/tools/proto_text/gen_proto_text_functions_lib.h
@@ -33,6 +33,17 @@ struct ProtoTextFunctionCode {
// tensorflow library headers.
//
// Only works for proto3 messages.
+//
+// The generated API has, for enums and messages defined in the proto file:
+// 1. For each message:
+// * ProtoDebugString(m): same as msg.DebugString(), except that google.any
+// is not expanded.
+// * ProtoShortDebugString(m): same as msg.ShorDebugString(), except that
+// google.any is not expanded.
+// * ProtoParseFromString(s, m): same as TextFormat.ParseFromString(s, &m);
+// 2. For each enum:
+// * EnumName_<EnumTypeName>(enum_value): same as <EnumTypeName>(enum_value)
+// in proto.
ProtoTextFunctionCode GetProtoTextFunctionCode(
const tensorflow::protobuf::FileDescriptor& fd,
const string& tf_header_prefix);