The path string may also have additional parts after it. For example,
if foo
is a vector, then foo.@size
returns the vectors
size, and foo.@elem.0
returns the first element.
- Metadata commands:
-
- @list
- list methods and attributes of this object
- @signature
- return a list of calling signatures (arguments and
return values) for all overloaded methods.
- @type
- type of the method or attribute referred to. May be a
complex C++ type.
- @enum
@enum.@list
returns a list of enums known about,
and @enum.<enum name>
may be used to get a list of
enumerators for that enum.
- Container commands:
-
- @size
- number of elements if a container, 0 if not.
- @keys
- return a list of keys of a map
- @elem,@elemNoThrow
- access an element of container — by position if a
sequence, by key if a map. @elemNoThrow returns a default
constructed object instead of throw an exception if the index is out
of range. Note the index appears after the .@elem, and is JSON encoded.
- @erase
- remove an element indexed by the next part of the path
string.
- @insert
- for sequences, pushes back a new element, intialised by
the argument string, for associative containers inserts the new
alement.