aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/lib/io
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-11-21 14:47:49 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-21 14:54:20 -0800
commitdb8447528c1f7d6055d9a0145aa35bbea7bfd810 (patch)
tree84a19637c47a9023a6cc4158a4c16e36b4f6fc0c /tensorflow/core/lib/io
parentf0d1abbf2389aa2a29fe6fd090ba68ab6b8fd76f (diff)
Removed forward declarations of tensorflow::StringPiece so that it may more easily be replaced with absl::string_view.
PiperOrigin-RevId: 176564520
Diffstat (limited to 'tensorflow/core/lib/io')
-rw-r--r--tensorflow/core/lib/io/path.h20
-rw-r--r--tensorflow/core/lib/io/proto_encode_helper.h2
2 files changed, 11 insertions, 11 deletions
diff --git a/tensorflow/core/lib/io/path.h b/tensorflow/core/lib/io/path.h
index 955098f5b5..8d02baa5bb 100644
--- a/tensorflow/core/lib/io/path.h
+++ b/tensorflow/core/lib/io/path.h
@@ -20,10 +20,9 @@ limitations under the License.
#include "tensorflow/core/lib/core/stringpiece.h"
namespace tensorflow {
-class StringPiece;
namespace io {
namespace internal {
-string JoinPathImpl(std::initializer_list<StringPiece> paths);
+string JoinPathImpl(std::initializer_list<tensorflow::StringPiece> paths);
}
// Utility routines for processing filenames
@@ -50,20 +49,20 @@ string JoinPath(const T&... args) {
#endif /* SWIG */
// Return true if path is absolute.
-bool IsAbsolutePath(StringPiece path);
+bool IsAbsolutePath(tensorflow::StringPiece path);
// Returns the part of the path before the final "/". If there is a single
// leading "/" in the path, the result will be the leading "/". If there is
// no "/" in the path, the result is the empty prefix of the input.
-StringPiece Dirname(StringPiece path);
+tensorflow::StringPiece Dirname(tensorflow::StringPiece path);
// Returns the part of the path after the final "/". If there is no
// "/" in the path, the result is the same as the input.
-StringPiece Basename(StringPiece path);
+tensorflow::StringPiece Basename(tensorflow::StringPiece path);
// Returns the part of the basename of path after the final ".". If
// there is no "." in the basename, the result is empty.
-StringPiece Extension(StringPiece path);
+tensorflow::StringPiece Extension(tensorflow::StringPiece path);
// Collapse duplicate "/"s, resolve ".." and "." path elements, remove
// trailing "/".
@@ -72,7 +71,7 @@ StringPiece Extension(StringPiece path);
// invoke any system calls (getcwd(2)) in order to resolve relative
// paths with respect to the actual working directory. That is, this is purely
// string manipulation, completely independent of process state.
-string CleanPath(StringPiece path);
+string CleanPath(tensorflow::StringPiece path);
// Populates the scheme, host, and path from a URI. scheme, host, and path are
// guaranteed by this function to point into the contents of uri, even if
@@ -82,12 +81,13 @@ string CleanPath(StringPiece path);
// - If the URI is invalid, scheme and host are set to empty strings and the
// passed string is assumed to be a path
// - If the URI omits the path (e.g. file://host), then the path is left empty.
-void ParseURI(StringPiece uri, StringPiece* scheme, StringPiece* host,
- StringPiece* path);
+void ParseURI(tensorflow::StringPiece uri, tensorflow::StringPiece* scheme,
+ tensorflow::StringPiece* host, tensorflow::StringPiece* path);
// Creates a URI from a scheme, host, and path. If the scheme is empty, we just
// return the path.
-string CreateURI(StringPiece scheme, StringPiece host, StringPiece path);
+string CreateURI(tensorflow::StringPiece scheme, tensorflow::StringPiece host,
+ tensorflow::StringPiece path);
} // namespace io
} // namespace tensorflow
diff --git a/tensorflow/core/lib/io/proto_encode_helper.h b/tensorflow/core/lib/io/proto_encode_helper.h
index 5d30dda901..f70e1cbaab 100644
--- a/tensorflow/core/lib/io/proto_encode_helper.h
+++ b/tensorflow/core/lib/io/proto_encode_helper.h
@@ -17,6 +17,7 @@ limitations under the License.
#define TENSORFLOW_LIB_IO_PROTO_ENCODE_HELPER_H_
#include "tensorflow/core/lib/core/coding.h"
+#include "tensorflow/core/lib/core/stringpiece.h"
#include "tensorflow/core/platform/protobuf.h"
// A helper class for appending various kinds of values in protocol
@@ -24,7 +25,6 @@ limitations under the License.
// a buffer and a maximum size guarantee for the number of bytes they
// will add to this buffer.
namespace tensorflow {
-class StringPiece;
namespace io {
class ProtoEncodeHelper {