API Reference > OdDb Classes > OdDbLight Class > OdDbLight Methods > OdDbLight::subErase Method
OdDbLight::subErase Method
Syntax
C++
virtual OdResult subErase(bool erasing);
Parameters 
Description 
bool erasing 
[in] A copy of the erasing argument passed to erase(). 

Returns eOk if and only if erase() is to continue.

Called as the first operation when this object is being erased or unerased. 

 

This function is notified just before the current object is to be erased, giving this function the ability to cancel the erase. When overriding this function:

  1. If the OdDbObject's state is incorrect, return something other than eOk.
  2. If the parent class's subErase() returns anything other than eOk, immediately return it.
  3. If other actions are required before erase, do them.
  4. Return eOk.

If you must make changes to this object's state, either make them after step 2, or roll them back if step 2 returns anything other than eOk. Also the m_bHighlighted member of this object is set to false if 'erasing' is true.

Copyright © 2002–2020. Open Design Alliance. All rights reserved.