Commit bbb1864a authored by Pierre Kraemer's avatar Pierre Kraemer

fin modif CellMarker

parent fea93fec
...@@ -143,6 +143,15 @@ public: ...@@ -143,6 +143,15 @@ public:
* unmark all the cells * unmark all the cells
*/ */
virtual void unmarkAll() = 0 ; virtual void unmarkAll() = 0 ;
bool isAllUnmarked()
{
AttributeContainer& cont = m_map.getAttributeContainer(m_cell) ;
for (unsigned int i = cont.begin(); i != cont.end(); cont.next(i))
if(m_map.getMarkVector(m_cell, m_thread)->operator[](i).testMark(m_mark))
return false ;
return true ;
}
}; };
/** /**
...@@ -190,6 +199,7 @@ public: ...@@ -190,6 +199,7 @@ public:
virtual ~CellMarkerStore() virtual ~CellMarkerStore()
{ {
unmarkAll() ; unmarkAll() ;
assert(isAllUnmarked());
} }
protected: protected:
...@@ -225,9 +235,7 @@ class CellMarkerNoUnmark: public CellMarkerGen ...@@ -225,9 +235,7 @@ class CellMarkerNoUnmark: public CellMarkerGen
{ {
public: public:
CellMarkerNoUnmark(AttribMap& map, unsigned int cell, unsigned int thread = 0) : CellMarkerGen(map, cell, thread) CellMarkerNoUnmark(AttribMap& map, unsigned int cell, unsigned int thread = 0) : CellMarkerGen(map, cell, thread)
{ {}
std::cout << "CellMarkerNoUnmark.." << std::endl ;
}
virtual ~CellMarkerNoUnmark() virtual ~CellMarkerNoUnmark()
{ {
...@@ -238,15 +246,6 @@ protected: ...@@ -238,15 +246,6 @@ protected:
CellMarkerNoUnmark(const CellMarkerNoUnmark& cm) : CellMarkerGen(cm) CellMarkerNoUnmark(const CellMarkerNoUnmark& cm) : CellMarkerGen(cm)
{} {}
bool isAllUnmarked()
{
AttributeContainer& cont = m_map.getAttributeContainer(m_cell) ;
for (unsigned int i = cont.begin(); i != cont.end(); cont.next(i))
if(m_map.getMarkVector(m_cell, m_thread)->operator[](i).testMark(m_mark))
return false ;
return true ;
}
public: public:
void unmarkAll() void unmarkAll()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment