#include <core.hpp>
Public Types | |
enum | { NONE = 0, INT = 1, REAL = 2, FLOAT = REAL, STR = 3, STRING = STR, REF = 4, SEQ = 5, MAP = 6, TYPE_MASK = 7, FLOW = 8, USER = 16, EMPTY = 32, NAMED = 64 } |
type of the file storage node More... | |
Public Member Functions | |
FileNodeIterator | begin () const |
returns iterator pointing to the first node element | |
CV_WRAP bool | empty () const |
returns true if the node is empty | |
FileNodeIterator | end () const |
returns iterator pointing to the element following the last node element | |
FileNode (const FileNode &node) | |
the copy constructor | |
FileNode (const CvFileStorage *fs, const CvFileNode *node) | |
the full constructor wrapping CvFileNode structure. | |
CV_WRAP | FileNode () |
the default constructor | |
CV_WRAP bool | isInt () const |
returns true if the node is an integer | |
CV_WRAP bool | isMap () const |
returns true if the node is a mapping | |
CV_WRAP bool | isNamed () const |
returns true if the node has a name | |
CV_WRAP bool | isNone () const |
returns true if the node is a "none" object | |
CV_WRAP bool | isReal () const |
returns true if the node is a floating-point number | |
CV_WRAP bool | isSeq () const |
returns true if the node is a sequence | |
CV_WRAP bool | isString () const |
returns true if the node is a text string | |
CV_WRAP string | name () const |
returns the node name or an empty string if the node is nameless | |
operator double () const | |
returns the node content as double | |
operator float () const | |
returns the node content as float | |
operator int () const | |
returns the node content as an integer. If the node stores floating-point number, it is rounded. | |
operator string () const | |
returns the node content as text string | |
const CvFileNode * | operator* () const |
returns pointer to the underlying file node | |
CvFileNode * | operator* () |
returns pointer to the underlying file node | |
CV_WRAP FileNode | operator[] (int i) const |
returns element of a sequence node | |
CV_WRAP FileNode | operator[] (const char *nodename) const |
returns element of a mapping node | |
FileNode | operator[] (const string &nodename) const |
returns element of a mapping node | |
void * | readObj () const |
reads the registered object and returns pointer to it | |
void | readRaw (const string &fmt, uchar *vec, size_t len) const |
reads node elements to the buffer with the specified format | |
CV_WRAP size_t | size () const |
returns the number of elements in the node, if it is a sequence or mapping, or 1 otherwise. | |
CV_WRAP int | type () const |
returns type of the node | |
Public Attributes | |
const CvFileStorage * | fs |
const CvFileNode * | node |
File Storage Node class
The node is used to store each and every element of the file storage opened for reading - from the primitive objects, such as numbers and text strings, to the complex nodes: sequences, mappings and the registered objects.
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.
anonymous enum |
type of the file storage node
cv::FileNode::FileNode | ( | ) | [inline] |
the default constructor
cv::FileNode::FileNode | ( | const CvFileStorage * | fs, | |
const CvFileNode * | node | |||
) | [inline] |
the full constructor wrapping CvFileNode structure.
cv::FileNode::FileNode | ( | const FileNode & | node | ) | [inline] |
the copy constructor
FileNodeIterator cv::FileNode::begin | ( | ) | const [inline] |
returns iterator pointing to the first node element
bool cv::FileNode::empty | ( | ) | const [inline] |
returns true if the node is empty
FileNodeIterator cv::FileNode::end | ( | ) | const [inline] |
returns iterator pointing to the element following the last node element
bool cv::FileNode::isInt | ( | ) | const [inline] |
returns true if the node is an integer
bool cv::FileNode::isMap | ( | ) | const [inline] |
returns true if the node is a mapping
bool cv::FileNode::isNamed | ( | ) | const [inline] |
returns true if the node has a name
bool cv::FileNode::isNone | ( | ) | const [inline] |
returns true if the node is a "none" object
bool cv::FileNode::isReal | ( | ) | const [inline] |
returns true if the node is a floating-point number
bool cv::FileNode::isSeq | ( | ) | const [inline] |
returns true if the node is a sequence
bool cv::FileNode::isString | ( | ) | const [inline] |
returns true if the node is a text string
CV_WRAP string cv::FileNode::name | ( | ) | const |
returns the node name or an empty string if the node is nameless
cv::FileNode::operator double | ( | ) | const [inline] |
returns the node content as double
cv::FileNode::operator float | ( | ) | const [inline] |
returns the node content as float
cv::FileNode::operator int | ( | ) | const [inline] |
returns the node content as an integer. If the node stores floating-point number, it is rounded.
cv::FileNode::operator string | ( | ) | const [inline] |
returns the node content as text string
const CvFileNode * cv::FileNode::operator* | ( | ) | const [inline] |
returns pointer to the underlying file node
CvFileNode * cv::FileNode::operator* | ( | ) | [inline] |
returns pointer to the underlying file node
CV_WRAP FileNode cv::FileNode::operator[] | ( | int | i | ) | const |
returns element of a sequence node
CV_WRAP FileNode cv::FileNode::operator[] | ( | const char * | nodename | ) | const |
returns element of a mapping node
FileNode cv::FileNode::operator[] | ( | const string & | nodename | ) | const |
returns element of a mapping node
void* cv::FileNode::readObj | ( | ) | const |
reads the registered object and returns pointer to it
void cv::FileNode::readRaw | ( | const string & | fmt, | |
uchar * | vec, | |||
size_t | len | |||
) | const [inline] |
reads node elements to the buffer with the specified format
size_t cv::FileNode::size | ( | ) | const [inline] |
returns the number of elements in the node, if it is a sequence or mapping, or 1 otherwise.
int cv::FileNode::type | ( | ) | const [inline] |
returns type of the node
const CvFileStorage* cv::FileNode::fs |
const CvFileNode* cv::FileNode::node |