Perform class specific initialization tasks. Link namespaces, call initPersistFields() and consoleInit().
| 85 | /// |
| 86 | /// Link namespaces, call initPersistFields() and consoleInit(). |
| 87 | void init() const |
| 88 | { |
| 89 | // Get handle to our parent class, if any, and ourselves (we are our parent's child). |
| 90 | AbstractClassRep *parent = T::getParentStaticClassRep(); |
| 91 | AbstractClassRep *child = T::getStaticClassRep (); |
| 92 | |
| 93 | // If we got reps, then link those namespaces! (To get proper inheritance.) |
| 94 | if( parent && child ) |
| 95 | Con::classLinkNamespaces( parent->getNameSpace(), child->getNameSpace() ); |
| 96 | |
| 97 | // Finally, do any class specific initialization... |
| 98 | T::initPersistFields(); |
| 99 | T::consoleInit(); |
| 100 | } |
| 101 | |
| 102 | /// Wrap constructor. |
| 103 | ConsoleObject *create() const { return new T; } |
nothing calls this directly
no test coverage detected