| 317 | //----------------------------------------------------------------------------- |
| 318 | |
| 319 | bool SimDataBlock::onAdd() |
| 320 | { |
| 321 | Parent::onAdd(); |
| 322 | |
| 323 | // This initialization is done here, and not in the constructor, |
| 324 | // because some jokers like to construct and destruct objects |
| 325 | // (without adding them to the manager) to check what class |
| 326 | // they are. |
| 327 | modifiedKey = ++sNextModifiedKey; |
| 328 | AssertFatal(sNextObjectId <= DataBlockObjectIdLast, |
| 329 | "Exceeded maximum number of data blocks"); |
| 330 | |
| 331 | // add DataBlock to the DataBlockGroup unless it is client side ONLY DataBlock |
| 332 | if ( !isClientOnly() ) |
| 333 | if (SimGroup* grp = Sim::getDataBlockGroup()) |
| 334 | grp->addObject(this); |
| 335 | |
| 336 | Sim::getDataBlockSet()->addObject( this ); |
| 337 | |
| 338 | return true; |
| 339 | } |
| 340 | |
| 341 | //----------------------------------------------------------------------------- |
| 342 |
nothing calls this directly
no test coverage detected