Example #1
0
GLC_3DRep::~GLC_3DRep()
{
    if (isTheLast())
    {
        clear3DRepGeom();

        delete m_pGeomList;
        m_pGeomList= NULL;

        delete m_pType;
        m_pType= NULL;
    }
}
Example #2
0
// Clear the 3D representation
void GLC_3DRep::clear()
{
	if (isTheLast())
	{
		const int size= m_pGeomList->size();
		for (int i= 0; i < size; ++i)
		{
			delete (*m_pGeomList)[i];
		}
		delete m_pGeomList;
		m_pGeomList= NULL;

		delete m_pType;
		m_pType= NULL;
	}
}
Example #3
0
GLC_3DRep& GLC_3DRep::operator=(const GLC_Rep& rep)
{
	const GLC_3DRep* p3DRep= dynamic_cast<const GLC_3DRep*>(&rep);
	Q_ASSERT(NULL != p3DRep);
	if (this != &rep)
	{
        if (isTheLast())
        {
            GLC_Rep::operator=(rep);
            clear3DRepGeom();
            delete m_pGeomList;
            m_pGeomList= NULL;
            delete m_pType;
            m_pType= NULL;
        }

		m_pGeomList= p3DRep->m_pGeomList;
		m_pType= p3DRep->m_pType;        
	}

	return *this;
}