#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 | |
FileNode () | |
the default constructor More... | |
FileNode (const CvFileStorage *fs, const CvFileNode *node) | |
the full constructor wrapping CvFileNode structure. More... | |
FileNode (const FileNode &node) | |
the copy constructor More... | |
FileNode | operator[] (const string &nodename) const |
returns element of a mapping node More... | |
FileNode | operator[] (const char *nodename) const |
returns element of a mapping node More... | |
FileNode | operator[] (int i) const |
returns element of a sequence node More... | |
int | type () const |
returns type of the node More... | |
bool | empty () const |
returns true if the node is empty More... | |
bool | isNone () const |
returns true if the node is a "none" object More... | |
bool | isSeq () const |
returns true if the node is a sequence More... | |
bool | isMap () const |
returns true if the node is a mapping More... | |
bool | isInt () const |
returns true if the node is an integer More... | |
bool | isReal () const |
returns true if the node is a floating-point number More... | |
bool | isString () const |
returns true if the node is a text string More... | |
bool | isNamed () const |
returns true if the node has a name More... | |
string | name () const |
returns the node name or an empty string if the node is nameless More... | |
size_t | size () const |
returns the number of elements in the node, if it is a sequence or mapping, or 1 otherwise. More... | |
operator int () const | |
returns the node content as an integer. If the node stores floating-point number, it is rounded. More... | |
operator float () const | |
returns the node content as float More... | |
operator double () const | |
returns the node content as double More... | |
operator string () const | |
returns the node content as text string More... | |
CvFileNode * | operator* () |
returns pointer to the underlying file node More... | |
const CvFileNode * | operator* () const |
returns pointer to the underlying file node More... | |
FileNodeIterator | begin () const |
returns iterator pointing to the first node element More... | |
FileNodeIterator | end () const |
returns iterator pointing to the element following the last node element More... | |
void | readRaw (const string &fmt, uchar *vec, size_t len) const |
reads node elements to the buffer with the specified format More... | |
void * | readObj () const |
reads the registered object and returns pointer to it More... | |
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
|
inline |
the default constructor
|
inline |
the full constructor wrapping CvFileNode structure.
|
inline |
the copy constructor
|
inline |
returns iterator pointing to the first node element
|
inline |
returns true if the node is empty
|
inline |
returns iterator pointing to the element following the last node element
|
inline |
returns true if the node is an integer
|
inline |
returns true if the node is a mapping
|
inline |
returns true if the node has a name
|
inline |
returns true if the node is a "none" object
|
inline |
returns true if the node is a floating-point number
|
inline |
returns true if the node is a sequence
|
inline |
returns true if the node is a text string
string cv::FileNode::name | ( | ) | const |
returns the node name or an empty string if the node is nameless
|
inline |
returns the node content as double
|
inline |
returns the node content as float
|
inline |
returns the node content as an integer. If the node stores floating-point number, it is rounded.
|
inline |
returns the node content as text string
|
inline |
returns pointer to the underlying file node
|
inline |
returns pointer to the underlying file node
FileNode cv::FileNode::operator[] | ( | const string & | nodename | ) | const |
returns element of a mapping node
FileNode cv::FileNode::operator[] | ( | const char * | nodename | ) | const |
returns element of a mapping node
void* cv::FileNode::readObj | ( | ) | const |
reads the registered object and returns pointer to it
reads node elements to the buffer with the specified format
|
inline |
returns the number of elements in the node, if it is a sequence or mapping, or 1 otherwise.
|
inline |
returns type of the node
const CvFileStorage* cv::FileNode::fs |
const CvFileNode* cv::FileNode::node |