@Namespace(value="cv")
@NoOffset
public static class opencv_core.FileNode
extends org.bytedeco.javacpp.Pointer
The node is used to store each and every element of the file storage opened for reading. When XML/YAML file is read, it is first parsed and stored in the memory as a hierarchical collection of nodes. Each node can be a "leaf" that is contain a single number or a string, or be a collection of other nodes. There can be named collections (mappings) where each element has a name and it is accessed by a name, and ordered collections (sequences) where elements do not have names but rather accessed by index. Type of the file node can be determined using FileNode::type method.
Note that file nodes are only used for navigating file storages opened for reading. When a file storage is opened for writing, no data is stored in memory after it is written.
| Modifier and Type | Field and Description |
|---|---|
static int |
EMPTY
enum cv::FileNode::Type
|
static int |
FLOAT
enum cv::FileNode::Type
|
static int |
FLOW
enum cv::FileNode::Type
|
static int |
INT
enum cv::FileNode::Type
|
static int |
MAP
enum cv::FileNode::Type
|
static int |
NAMED
enum cv::FileNode::Type
|
static int |
NONE
enum cv::FileNode::Type
|
static int |
REAL
enum cv::FileNode::Type
|
static int |
REF
enum cv::FileNode::Type
|
static int |
SEQ
enum cv::FileNode::Type
|
static int |
STR
enum cv::FileNode::Type
|
static int |
STRING
enum cv::FileNode::Type
|
static int |
TYPE_MASK
enum cv::FileNode::Type
|
static int |
USER
enum cv::FileNode::Type
|
| Constructor and Description |
|---|
FileNode()
\brief The constructors.
|
FileNode(long size)
Native array allocator.
|
FileNode(opencv_core.CvFileStorage fs,
opencv_core.CvFileNode node)
\overload
|
FileNode(opencv_core.FileNode node)
\overload
|
FileNode(org.bytedeco.javacpp.Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.bytedeco.javacpp.BytePointer |
asBytePointer()
returns the node content as text string
|
double |
asDouble()
returns the node content as double
|
float |
asFloat()
returns the node content as float
|
int |
asInt()
returns the node content as an integer.
|
opencv_core.FileNode |
at(int i)
\overload
|
opencv_core.FileNodeIterator |
begin()
returns iterator pointing to the first node element
|
boolean |
empty()
returns true if the node is empty
|
opencv_core.FileNodeIterator |
end()
returns iterator pointing to the element following the last node element
|
opencv_core.CvFileStorage |
fs() |
opencv_core.FileNode |
get(org.bytedeco.javacpp.BytePointer nodename)
\brief Returns element of a mapping node or a sequence node.
|
opencv_core.FileNode |
get(String nodename) |
opencv_core.FileNode |
getNode(org.bytedeco.javacpp.BytePointer nodename)
\overload
|
opencv_core.FileNode |
getNode(String nodename) |
boolean |
isInt()
returns true if the node is an integer
|
boolean |
isMap()
returns true if the node is a mapping
|
boolean |
isNamed()
returns true if the node has a name
|
boolean |
isNone()
returns true if the node is a "none" object
|
boolean |
isReal()
returns true if the node is a floating-point number
|
boolean |
isSeq()
returns true if the node is a sequence
|
boolean |
isString()
returns true if the node is a text string
|
opencv_core.Mat |
mat()
Simplified reading API to use with bindings.
|
opencv_core.CvFileNode |
multiply()
returns pointer to the underlying file node
|
org.bytedeco.javacpp.BytePointer |
name()
returns the node name or an empty string if the node is nameless
|
opencv_core.CvFileNode |
node() |
opencv_core.FileNode |
position(long position) |
org.bytedeco.javacpp.Pointer |
readObj()
reads the registered object and returns pointer to it
|
void |
readRaw(org.bytedeco.javacpp.BytePointer fmt,
byte[] vec,
long len) |
void |
readRaw(org.bytedeco.javacpp.BytePointer fmt,
ByteBuffer vec,
long len) |
void |
readRaw(org.bytedeco.javacpp.BytePointer fmt,
org.bytedeco.javacpp.BytePointer vec,
long len)
\brief Reads node elements to the buffer with the specified format.
|
void |
readRaw(String fmt,
byte[] vec,
long len) |
void |
readRaw(String fmt,
ByteBuffer vec,
long len) |
void |
readRaw(String fmt,
org.bytedeco.javacpp.BytePointer vec,
long len) |
double |
real()
Simplified reading API to use with bindings.
|
long |
size()
returns the number of elements in the node, if it is a sequence or mapping, or 1 otherwise.
|
org.bytedeco.javacpp.BytePointer |
string()
Simplified reading API to use with bindings.
|
int |
type()
\brief Returns type of the node.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic static final int NONE
public static final int INT
public static final int REAL
public static final int FLOAT
public static final int STR
public static final int STRING
public static final int REF
public static final int SEQ
public static final int MAP
public static final int TYPE_MASK
public static final int FLOW
public static final int USER
public static final int EMPTY
public static final int NAMED
public FileNode(org.bytedeco.javacpp.Pointer p)
Pointer.Pointer(Pointer).public FileNode(long size)
Pointer.position(long).public FileNode()
These constructors are used to create a default file node, construct it from obsolete structures or from the another file node.
public FileNode(@Const
opencv_core.CvFileStorage fs,
@Const
opencv_core.CvFileNode node)
fs - Pointer to the obsolete file storage structure.node - File node to be used as initialization for the created file node.public FileNode(@Const @ByRef
opencv_core.FileNode node)
node - File node to be used as initialization for the created file node.public opencv_core.FileNode position(long position)
position in class org.bytedeco.javacpp.Pointer@ByVal @Name(value="operator []") public opencv_core.FileNode get(@opencv_core.Str org.bytedeco.javacpp.BytePointer nodename)
nodename - Name of an element in the mapping node.@ByVal @Name(value="operator []") public opencv_core.FileNode get(@opencv_core.Str String nodename)
@ByVal @Name(value="operator []") public opencv_core.FileNode getNode(@Cast(value="const char*") org.bytedeco.javacpp.BytePointer nodename)
nodename - Name of an element in the mapping node.@ByVal @Name(value="operator []") public opencv_core.FileNode getNode(String nodename)
@ByVal @Name(value="operator []") public opencv_core.FileNode at(int i)
i - Index of an element in the sequence node.public int type()
@Cast(value="bool") public boolean empty()
@Cast(value="bool") public boolean isNone()
@Cast(value="bool") public boolean isSeq()
@Cast(value="bool") public boolean isMap()
@Cast(value="bool") public boolean isInt()
@Cast(value="bool") public boolean isReal()
@Cast(value="bool") public boolean isString()
@Cast(value="bool") public boolean isNamed()
@opencv_core.Str public org.bytedeco.javacpp.BytePointer name()
@Cast(value="size_t") public long size()
@Name(value="operator int") public int asInt()
@Name(value="operator float") public float asFloat()
@Name(value="operator double") public double asDouble()
@Name(value="operator cv::String") @opencv_core.Str public org.bytedeco.javacpp.BytePointer asBytePointer()
@Name(value="operator *") public opencv_core.CvFileNode multiply()
@ByVal public opencv_core.FileNodeIterator begin()
@ByVal public opencv_core.FileNodeIterator end()
public void readRaw(@opencv_core.Str org.bytedeco.javacpp.BytePointer fmt, @Cast(value="uchar*") org.bytedeco.javacpp.BytePointer vec, @Cast(value="size_t") long len)
Usually it is more convenient to use operator >> instead of this method.
fmt - Specification of each array element. See \ref format_spec "format specification"vec - Pointer to the destination array.len - Number of elements to read. If it is greater than number of remaining elements then all
of them will be read.public void readRaw(@opencv_core.Str String fmt, @Cast(value="uchar*") ByteBuffer vec, @Cast(value="size_t") long len)
public void readRaw(@opencv_core.Str org.bytedeco.javacpp.BytePointer fmt, @Cast(value="uchar*") byte[] vec, @Cast(value="size_t") long len)
public void readRaw(@opencv_core.Str String fmt, @Cast(value="uchar*") org.bytedeco.javacpp.BytePointer vec, @Cast(value="size_t") long len)
public void readRaw(@opencv_core.Str org.bytedeco.javacpp.BytePointer fmt, @Cast(value="uchar*") ByteBuffer vec, @Cast(value="size_t") long len)
public void readRaw(@opencv_core.Str String fmt, @Cast(value="uchar*") byte[] vec, @Cast(value="size_t") long len)
public org.bytedeco.javacpp.Pointer readObj()
public double real()
@opencv_core.Str public org.bytedeco.javacpp.BytePointer string()
@ByVal public opencv_core.Mat mat()
@MemberGetter @Const public opencv_core.CvFileStorage fs()
@MemberGetter @Const public opencv_core.CvFileNode node()
Copyright © 2018. All rights reserved.