diff options
author | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-08-30 00:45:36 -0400 |
---|---|---|
committer | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-08-30 00:45:36 -0400 |
commit | dc2493e7525bb7633f697ef10f72b72b46222249 (patch) | |
tree | 9816755219e65d3f47fdce81c78f3736a7ddb8ab /lib/sol2/docs/source/api/table_traversal_keys.rst | |
parent | 9d2b31797d0cfd130802b69261df2cd402e39b49 (diff) |
Forget what I said, I just need to change git attributes to mark for vendor
Diffstat (limited to 'lib/sol2/docs/source/api/table_traversal_keys.rst')
-rw-r--r-- | lib/sol2/docs/source/api/table_traversal_keys.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sol2/docs/source/api/table_traversal_keys.rst b/lib/sol2/docs/source/api/table_traversal_keys.rst new file mode 100644 index 0000000..9ad224c --- /dev/null +++ b/lib/sol2/docs/source/api/table_traversal_keys.rst @@ -0,0 +1,9 @@ +table traversal keys
+====================
+*the definitive way to get and set things easily*
+
+
+Objects ``sol::update_if_empty``, ``sol::create_if_nil``, and ``sol::override_value`` are special keys one can pass into a table traversal to enable creating tables as they go in ``nil``/empty spaces, optionally updating a value at the end of a chain of lookups if it is empty, or overriding the values and tables along a chain as they go. Each special key can be used in lookup and setting functionality on tables. It is primarily to enable easy use and creation of functionality like so:
+
+.. literalinclude:: ../../../examples/source/table_create_if_nil.cpp
+ :linenos:
|