OpenCV453
公開メンバ関数 | 限定公開変数類 | 全メンバ一覧
cv::FileNodeIterator クラス

used to iterate through sequences and mappings. [詳解]

#include <persistence.hpp>

公開メンバ関数

 FileNodeIterator ()
 The constructors. [詳解]
 
 FileNodeIterator (const FileNode &node, bool seekEnd)
 
 FileNodeIterator (const FileNodeIterator &it)
 
FileNodeIteratoroperator= (const FileNodeIterator &it)
 
FileNode operator* () const
 returns the currently observed element
 
FileNodeIteratoroperator++ ()
 moves iterator to the next node
 
FileNodeIterator operator++ (int)
 moves iterator to the next node
 
FileNodeIteratoroperator+= (int ofs)
 moves iterator forward by the specified offset (possibly negative)
 
FileNodeIteratorreadRaw (const String &fmt, void *vec, size_t len=(size_t) INT_MAX)
 Reads node elements to the buffer with the specified format. [詳解]
 
size_t remaining () const
 returns the number of remaining (not read yet) elements
 
bool equalTo (const FileNodeIterator &it) const
 

限定公開変数類

FileStorage::Impl * fs
 
size_t blockIdx
 
size_t ofs
 
size_t blockSize
 
size_t nodeNElems
 
size_t idx
 

関連関数

(これらはメソッドではありません)

template<typename _Tp >
static FileNodeIteratoroperator>> (FileNodeIterator &it, _Tp &value)
 Reads data from a file storage.
 
template<typename _Tp >
static FileNodeIteratoroperator>> (FileNodeIterator &it, std::vector< _Tp > &vec)
 Reads data from a file storage.
 
CV_EXPORTS bool operator== (const FileNodeIterator &it1, const FileNodeIterator &it2)
 
CV_EXPORTS bool operator!= (const FileNodeIterator &it1, const FileNodeIterator &it2)
 
static ptrdiff_t operator- (const FileNodeIterator &it1, const FileNodeIterator &it2)
 
static bool operator< (const FileNodeIterator &it1, const FileNodeIterator &it2)
 

詳解

used to iterate through sequences and mappings.

A standard STL notation, with node.begin(), node.end() denoting the beginning and the end of a sequence, stored in node. See the data reading sample in the beginning of the section.

構築子と解体子

◆ FileNodeIterator() [1/3]

cv::FileNodeIterator::FileNodeIterator ( )

The constructors.

These constructors are used to create a default iterator, set it to specific element in a file node or construct it from another iterator.

◆ FileNodeIterator() [2/3]

cv::FileNodeIterator::FileNodeIterator ( const FileNode node,
bool  seekEnd 
)

これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。

引数
nodeFile node - the collection to iterate over; it can be a scalar (equivalent to 1-element collection) or "none" (equivalent to empty collection).
seekEnd- true if iterator needs to be set after the last element of the node; that is: node.begin() => FileNodeIterator(node, false) node.end() => FileNodeIterator(node, true)

◆ FileNodeIterator() [3/3]

cv::FileNodeIterator::FileNodeIterator ( const FileNodeIterator it)

これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。

引数
itIterator to be used as initialization for the created iterator.

関数詳解

◆ readRaw()

FileNodeIterator & cv::FileNodeIterator::readRaw ( const String &  fmt,
void *  vec,
size_t  len = (size_t) INT_MAX 
)

Reads node elements to the buffer with the specified format.

Usually it is more convenient to use operator >> instead of this method.

引数
fmtSpecification of each array element. See format specification
vecPointer to the destination array.
lenNumber of bytes to read (buffer size limit). If it is greater than number of remaining elements then all of them will be read.

このクラス詳解は次のファイルから抽出されました: