| 189 | } |
| 190 | |
| 191 | int cDataMemory::myFinaliseInstance() |
| 192 | { |
| 193 | // now finalise the levels (allocate storage memory and finalise config): |
| 194 | if (!levels.empty()) { |
| 195 | int i; |
| 196 | for (i=0; i<levels.size(); i++) { |
| 197 | // actually finalise now |
| 198 | SMILE_DBG(3,"finalising level %i (allocating buffer, etc.)",i); |
| 199 | int ret = levels[i]->finaliseLevel(); |
| 200 | if (!ret) { |
| 201 | SMILE_IERR(1,"level '%s' could not be finalised!"); |
| 202 | return 0; |
| 203 | } |
| 204 | } |
| 205 | // allocate reader config array |
| 206 | SMILE_DBG(4,"allocating reader positions in %i level(s)",levels.size()); |
| 207 | for (i=0; i<levels.size(); i++) { |
| 208 | levels[i]->allocReaders(); |
| 209 | } |
| 210 | } else { |
| 211 | SMILE_ERR(1,"it makes no sense to finalise a dataMemory without levels! cannot finalise dataMemory '%s'!",getInstName()); |
| 212 | return 0; |
| 213 | } |
| 214 | return 1; |
| 215 | } |
| 216 | |
| 217 | const sDmLevelConfig * cDataMemory::queryReadConfig(int llevel, long blocksizeReader) |
| 218 | { |
nothing calls this directly
no test coverage detected