aboutsummaryrefslogtreecommitdiff
path: root/docs/source
diff options
context:
space:
mode:
authoriceboy <me@iceboy.org>2019-02-11 11:53:45 -0800
committerWouter van Oortmerssen <aardappel@gmail.com>2019-02-11 20:53:45 +0100
commit60e94cf08340abedb0624654381870edc70102c3 (patch)
treee6d1982db2138b1c29cae089eecec868801cafba /docs/source
parentcf47f27164972834177fcff4911ea8c1ae8ed645 (diff)
downloadflatbuffers-60e94cf08340abedb0624654381870edc70102c3.tar.gz
Implement (shared) attribute for C++ (#5157)
* Implement native_shared attribute for C++. Fixes #5141. See also #5145. * Refine comment in idl.h * Also refine docs * Revert "Also refine docs" This reverts commit 09dab7b45c56c2d17eac493203adc8caaa0df2cc. * Also refine docs again. * grumble
Diffstat (limited to 'docs/source')
-rw-r--r--docs/source/CppUsage.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/source/CppUsage.md b/docs/source/CppUsage.md
index 74045129..2808c49c 100644
--- a/docs/source/CppUsage.md
+++ b/docs/source/CppUsage.md
@@ -88,6 +88,14 @@ convenient accessors for all fields, e.g. `hp()`, `mana()`, etc:
*Note: That we never stored a `mana` value, so it will return the default.*
+The following attributes are supported:
+
+- `shared` (on a field): For string fields, this enables the usage of string
+ pooling (i.e. `CreateSharedString`) as default serialization behavior.
+
+ Specifically, `CreateXxxDirect` functions and `Pack` functions for object
+ based API (see below) will use `CreateSharedString` to create strings.
+
## Object based API. {#flatbuffers_cpp_object_based_api}
FlatBuffers is all about memory efficiency, which is why its base API is written