| 56 | //----------------------------------------------------------------------------- |
| 57 | |
| 58 | bool SimDataBlock::onAdd() |
| 59 | { |
| 60 | Parent::onAdd(); |
| 61 | |
| 62 | // This initialization is done here, and not in the constructor, |
| 63 | // because some jokers like to construct and destruct objects |
| 64 | // (without adding them to the manager) to check what class |
| 65 | // they are. |
| 66 | modifiedKey = ++sNextModifiedKey; |
| 67 | AssertFatal(sNextObjectId <= DataBlockObjectIdLast, |
| 68 | "Exceeded maximum number of data blocks"); |
| 69 | |
| 70 | // add DataBlock to the DataBlockGroup unless it is client side ONLY DataBlock |
| 71 | if ( !isClientOnly() ) |
| 72 | if (SimGroup* grp = Sim::getDataBlockGroup()) |
| 73 | grp->addObject(this); |
| 74 | |
| 75 | Sim::getDataBlockSet()->addObject( this ); |
| 76 | |
| 77 | return true; |
| 78 | } |
| 79 | |
| 80 | //----------------------------------------------------------------------------- |
| 81 |
nothing calls this directly
no test coverage detected