Trait opencv::core::FileStorageTraitConst [−][src]
pub trait FileStorageTraitConst {
fn as_raw_FileStorage(&self) -> *const c_void;
fn state(&self) -> i32 { ... }
fn elname(&self) -> String { ... }
fn is_opened(&self) -> Result<bool> { ... }
fn get_first_top_level_node(&self) -> Result<FileNode> { ... }
fn root(&self, streamidx: i32) -> Result<FileNode> { ... }
fn get(&self, nodename: &str) -> Result<FileNode> { ... }
fn get_node(&self, nodename: &str) -> Result<FileNode> { ... }
fn get_format(&self) -> Result<i32> { ... }
}
Expand description
XML/YAML/JSON file storage class that encapsulates all the information necessary for writing or reading data to/from a file.
Required methods
fn as_raw_FileStorage(&self) -> *const c_void
Provided methods
Checks whether the file is opened.
Returns
true if the object is associated with the current file and false otherwise. It is a good practice to call this method after you tried to open a file.
fn get_first_top_level_node(&self) -> Result<FileNode>
fn get_first_top_level_node(&self) -> Result<FileNode>
Returns the first element of the top-level mapping.
Returns
The first element of the top-level mapping.
Returns the top-level mapping
Parameters
- streamidx: Zero-based index of the stream. In most cases there is only one stream in the file. However, YAML supports multiple streams and so there can be several.
Returns
The top-level mapping.
C++ default parameters
- streamidx: 0
Returns the specified element of the top-level mapping.
Parameters
- nodename: Name of the file node.
Returns
Node with the given name.
Returns the specified element of the top-level mapping.
Parameters
- nodename: Name of the file node.
Returns
Node with the given name.