class InlineData
Defined at line 481 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
Public Members
static const cordz_info_t kNullCordzInfo
static const size_t kTagOffset
Public Methods
void InlineData ()
Defined at line 504 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void InlineData (DefaultInitType )
Defined at line 506 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void InlineData (CordRep * rep)
Defined at line 510 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void InlineData (absl::string_view sv, CordRep * rep)
Explicit constexpr constructor to create a constexpr InlineData
value. Creates an inlined SSO value if `rep` is null, otherwise
creates a tree instance value.
Defined at line 517 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
bool is_empty ()
Returns true if the current instance is empty.
The 'empty value' is an inlined data value of zero length.
Defined at line 551 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
bool is_tree ()
Returns true if the current instance holds a tree value.
Defined at line 554 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
bool is_profiled ()
Returns true if the current instance holds a cordz_info value.
Requires the current instance to hold a tree value.
Defined at line 558 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
bool is_either_profiled (const InlineData & data1, const InlineData & data2)
Returns true if either of the provided instances hold a cordz_info value.
This method is more efficient than the equivalent `data1.is_profiled() ||
data2.is_profiled()`. Requires both arguments to hold a tree.
Defined at line 566 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
CordzInfo * cordz_info ()
Returns the cordz_info sampling instance for this instance, or nullptr
if the current instance is not sampled and does not have CordzInfo data.
Requires the current instance to hold a tree value.
Defined at line 576 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void set_cordz_info (CordzInfo * cordz_info)
Sets the current cordz_info sampling instance for this instance, or nullptr
if the current instance is not sampled and does not have CordzInfo data.
Requires the current instance to hold a tree value.
Defined at line 587 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void clear_cordz_info ()
Resets the current cordz_info to null / empty.
Defined at line 595 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
const char * as_chars ()
Returns a read only pointer to the character data inside this instance.
Requires the current instance to hold inline data.
Defined at line 602 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
char * as_chars ()
Returns a mutable pointer to the character data inside this instance.
Should be used for 'write only' operations setting an inlined value.
Applications can set the value of inlined data either before or after
setting the inlined size, i.e., both of the below are valid:
// Set inlined data and inline size
memcpy(data_.as_chars(), data, size);
data_.set_inline_size(size);
// Set inlined size and inline data
data_.set_inline_size(size);
memcpy(data_.as_chars(), data, size);
It's an error to read from the returned pointer without a preceding write
if the current instance does not hold inline data, i.e.: is_tree() == true.
Defined at line 622 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
CordRep * as_tree ()
Returns the tree value of this value.
Requires the current instance to hold a tree value.
Defined at line 626 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void set_inline_data (const char * data, size_t n)
Defined at line 631 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void copy_max_inline_to (char * dst)
Defined at line 639 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void make_tree (CordRep * rep)
Initialize this instance to holding the tree value `rep`,
initializing the cordz_info to null, i.e.: 'not profiled'.
Defined at line 646 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void set_tree (CordRep * rep)
Set the tree value of this instance to 'rep`.
Requires the current instance to already hold a tree value.
Does not affect the value of cordz_info.
Defined at line 654 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
size_t inline_size ()
Returns the size of the inlined character data inside this instance.
Requires the current instance to hold inline data.
Defined at line 661 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void set_inline_size (size_t size)
Sets the size of the inlined character data inside this instance.
Requires `size` to be
<
= kMaxInline.
See the documentation on 'as_chars()' for more information and examples.
Defined at line 666 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
int Compare (const InlineData & rhs)
Compares 'this' inlined data with rhs. The comparison is a straightforward
lexicographic comparison. `Compare()` returns values as follows:
-1 'this' InlineData instance is smaller
0 the InlineData instances are equal
1 'this' InlineData instance larger
Defined at line 678 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void InlineData (const InlineData & rhs)
Defined at line 849 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
InlineData & operator= (const InlineData & rhs)
Defined at line 850 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void poison ()
Poisons the unused inlined SSO data if the current instance
is inlined, else un-poisons the entire instance.
Defined at line 854 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void unpoison ()
Un-poisons this instance.
Defined at line 853 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
void poison_this ()
Poisons the current instance. This is used on default initialization.
Defined at line 852 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
Enumerations
enum DefaultInitType
| Name | Value |
|---|---|
| kDefaultInit | 0 |
DefaultInitType forces the use of the default initialization constructor.
Defined at line 484 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
Friends
bool InlineData (const InlineData & lhs, const InlineData & rhs)
bool InlineData (const InlineData & lhs, const InlineData & rhs)
void InlineData (InlineData & lhsInlineData & rhs)