#pragma once#include "GeometricMacro.h"#include "GeometricEnum.h"#include "McGePoint2d.h"_GEOMETRIC_BEGINtemplateinline bool clearvct(std::vector & vctVal){ for(std::vector ::iterator p=vctVal.begin();p!=vctVal.end();++p) { delete static_cast (*p); *p=NULL; } vctVal.clear(); return true;}template inline bool clearlst(std::list & lstVal){ for(std::list ::iterator p=lstVal.begin();p!=lstVal.end();++p) { delete static_cast (*p); *p=NULL; } lstVal.clear(); return true;}template inline bool clearmap(std::map & mapVal){ for(std::map ::iterator p=mapVal.begin();p!=mapVal.end();++p) { delete static_cast (p->second); static_cast (p->second)=NULL; } mapVal.clear(); return true;}_GEOMETRIC_END
版权声明:本文博主原创文章,博客,未经同意不得转载。