34 #ifndef GRPCXX_SLICE_H
35 #define GRPCXX_SLICE_H
37 #include <grpc/support/slice.h>
38 #include <grpc++/config.h>
49 enum AddRef { ADD_REF };
52 enum StealRef { STEAL_REF };
55 Slice(
const Slice& other);
57 Slice& operator=(Slice other) {
58 std::swap(slice_, other.slice_);
62 size_t size()
const {
return GPR_SLICE_LENGTH(slice_); }
63 const gpr_uint8* begin()
const {
return GPR_SLICE_START_PTR(slice_); }
64 const gpr_uint8* end()
const {
return GPR_SLICE_END_PTR(slice_); }
67 friend class ByteBuffer;
74 #endif // GRPCXX_SLICE_H
Definition: proto_utils.cc:45