本文整理汇总了C++中SerializationNode::getChildren方法的典型用法代码示例。如果您正苦于以下问题:C++ SerializationNode::getChildren方法的具体用法?C++ SerializationNode::getChildren怎么用?C++ SerializationNode::getChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SerializationNode
的用法示例。
在下文中一共展示了SerializationNode::getChildren方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadGrid
static void loadGrid(const SerializationNode& grid, std::vector< std::vector< std::vector<double> > >& gridVector) {
const std::vector<SerializationNode>& gridSerializationRows = grid.getChildren();
gridVector.resize(gridSerializationRows.size());
for (unsigned int ii = 0; ii < gridSerializationRows.size(); ii++) {
const std::vector<SerializationNode>& gridSerializationColumns = gridSerializationRows[ii].getChildren();
gridVector[ii].resize(gridSerializationColumns.size());
for (unsigned int jj = 0; jj < gridSerializationColumns.size(); jj++) {
const SerializationNode& gridSerializationColumnNode = gridSerializationColumns[jj];
gridVector[ii][jj].resize(6);
gridVector[ii][jj][0] = gridSerializationColumnNode.getDoubleProperty("x");
gridVector[ii][jj][1] = gridSerializationColumnNode.getDoubleProperty("y");
gridVector[ii][jj][2] = gridSerializationColumnNode.getDoubleProperty("f");
gridVector[ii][jj][3] = gridSerializationColumnNode.getDoubleProperty("fx");
gridVector[ii][jj][4] = gridSerializationColumnNode.getDoubleProperty("fy");
gridVector[ii][jj][5] = gridSerializationColumnNode.getDoubleProperty("fxy");
}
}
}
示例2: loadCovalentMap
void loadCovalentMap(const SerializationNode& map, std::vector< int >& covalentMap) {
for (unsigned int ii = 0; ii < map.getChildren().size(); ii++) {
covalentMap.push_back(map.getChildren()[ii].getIntProperty("v"));
}
}