///类型转换
template <class T1,class T2>
vector<T2> ObjcetsSwap(vector<T1> objects)
{
vector<T2> returnObjects;
for (size_t i=0;i<objects.size();i++)
{
T2 temp=dynamic_cast<T2>(objects[i]);
if (temp!=NULL) { returnObjects.push_back(temp);
}
}
return returnObjects;
};