Merge pull request #12641 from dkurt:dnn_samples_args_autofill
This commit is contained in:
@@ -542,6 +542,11 @@ public:
|
||||
*/
|
||||
CV_WRAP_AS(at) FileNode operator[](int i) const;
|
||||
|
||||
/** @brief Returns keys of a mapping node.
|
||||
@returns Keys of a mapping node.
|
||||
*/
|
||||
CV_WRAP std::vector<String> keys() const;
|
||||
|
||||
/** @brief Returns type of the node.
|
||||
@returns Type of the node. See FileNode::Type
|
||||
*/
|
||||
|
||||
@@ -269,6 +269,20 @@ FileNode FileNode::operator[](int i) const
|
||||
i == 0 ? *this : FileNode();
|
||||
}
|
||||
|
||||
std::vector<String> FileNode::keys() const
|
||||
{
|
||||
std::vector<String> res;
|
||||
if (isMap())
|
||||
{
|
||||
res.reserve(size());
|
||||
for (FileNodeIterator it = begin(); it != end(); ++it)
|
||||
{
|
||||
res.push_back((*it).name());
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
String FileNode::name() const
|
||||
{
|
||||
const char* str;
|
||||
|
||||
Reference in New Issue
Block a user