Example #1
0
	Data::VectorData DataUtility::getChildsByType(DataPtr _parent, const std::string& _type, bool _friend)
	{
		Data::VectorData result;
		result.reserve(_parent->getChilds().size());

		for (Data::VectorData::const_iterator child = _parent->getChilds().begin(); child != _parent->getChilds().end(); child ++)
		{
			if ((*child)->getType()->getName() == _type || (_friend && (*child)->getType()->getFriend() == _type))
				result.push_back((*child));
		}

		return result;
	}
	void SkinExportSerializer::moveToEnd(Data::VectorData& childs, size_t _index)
	{
		DataPtr data = childs[_index];
		childs.erase(childs.begin() + _index);
		childs.push_back(data);
	}