util.yaml
ICE-specific YAML utilities.
- YAMLNode loadYAML(VFSFile file);
Load a YAML file with support for ICE data types.
Parameters:Throws:VFSFile file File to load from. YAMLException if the YAML could not be parsed or other YAML related errors. VFSException if the file could not be read from.- YAMLNode loadYAML(string source);
Load YAML from a string.
Parameters:Throws:string source YAML source in string form. YAMLException on a parsing error.- void saveYAML(VFSFile file, ref YAMLNode yaml);
Save to a YAML file with support for ICE data types.
Parameters:VFSFile file File to save to. YAMLNode yaml YAML document to save. - Constructor iceConstructor();
Return a YAML constructor customized for ICE.
- Resolver iceResolver();
Return a YAML resolver customized for ICE.
- Representer iceRepresenter();
Return a YAML representer customized for ICE.
- class InvalidYAMLValueException: dyaml.exception.YAMLException;
Thrown when a YAML value is out of range or invalid.
- T fromYAML(T, string cond = "")(ref YAMLNode yaml, string context = "");
Utility function that loads a value froma YAML node, checking its validity.
If cond is specified, it is used to validate the value (e.g. whether it is positive).
Parameters:
Currently supported types: float, double, real, Vector2f.
For floating point types, NaN values are automatically considered invalid.Returns:yaml YAML node to load from. context Added to error message if the value if specified. Value loaded from YAML.Throws:YAMLException if the value is invalid or has unexpected type.