mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Expose type validator from Dictionary and allow testing without error
- Now you can get the ContainerTypeValidate from a Dictionary (both for keys and for values). - ContainerTypeValidate exposes a validator function that does not show any error in case of failure. This allows testing values before trying to use them in Dictionary.
This commit is contained in:
parent
e0603aeda3
commit
28d3214acd
3 changed files with 121 additions and 69 deletions
|
|
@ -40,6 +40,7 @@
|
|||
class Variant;
|
||||
|
||||
struct ContainerType;
|
||||
struct ContainerTypeValidate;
|
||||
struct DictionaryPrivate;
|
||||
struct StringLikeVariantComparator;
|
||||
struct VariantHasher;
|
||||
|
|
@ -121,6 +122,8 @@ public:
|
|||
StringName get_typed_value_class_name() const;
|
||||
Variant get_typed_key_script() const;
|
||||
Variant get_typed_value_script() const;
|
||||
const ContainerTypeValidate &get_key_validator() const;
|
||||
const ContainerTypeValidate &get_value_validator() const;
|
||||
|
||||
void make_read_only();
|
||||
bool is_read_only() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue