find and delete an existing operator extension

pull/1/head
Thorsten Liebig 2011-07-25 14:57:09 +02:00
parent 0fe63823d0
commit 01bdb9e03e
2 changed files with 13 additions and 0 deletions

View File

@ -1653,3 +1653,15 @@ void Operator::AddExtension(Operator_Extension* op_ext)
{
m_Op_exts.push_back(op_ext);
}
void Operator::DeleteExtension(Operator_Extension* op_ext)
{
for (size_t n=0;n<m_Op_exts.size();++n)
{
if (m_Op_exts.at(n)==op_ext)
{
m_Op_exts.erase(m_Op_exts.begin()+n);
return;
}
}
}

View File

@ -127,6 +127,7 @@ public:
virtual int SnapBox2Mesh(const double* start, const double* stop, unsigned int* uiStart, unsigned int* uiStop, bool dualMesh=false, int SnapMethod=0, bool* bStartIn=NULL, bool* bStopIn=NULL) const;
virtual void AddExtension(Operator_Extension* op_ext);
virtual void DeleteExtension(Operator_Extension* op_ext);
virtual size_t GetNumberOfExtentions() const {return m_Op_exts.size();}
virtual Operator_Extension* GetExtension(size_t index) const {return m_Op_exts.at(index);}