| 165 | // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // |
| 166 | |
| 167 | bool Foam::regIOobject::checkIn() |
| 168 | { |
| 169 | if (!registered_) |
| 170 | { |
| 171 | // multiple checkin of same object is disallowed - this would mess up |
| 172 | // any mapping |
| 173 | registered_ = db().checkIn(*this); |
| 174 | |
| 175 | // check-in on defaultRegion is allowed to fail, since subsetted meshes |
| 176 | // are created with the same name as their originating mesh |
| 177 | if (!registered_ && debug && name() != polyMesh::defaultRegion) |
| 178 | { |
| 179 | if (debug == 2) |
| 180 | { |
| 181 | // for ease of finding where attempted duplicate check-in |
| 182 | // originated |
| 183 | FatalErrorInFunction |
| 184 | << "failed to register object " << objectPath() |
| 185 | << " the name already exists in the objectRegistry" << endl |
| 186 | << "Contents:" << db().sortedToc() |
| 187 | << abort(FatalError); |
| 188 | } |
| 189 | else |
| 190 | { |
| 191 | WarningInFunction |
| 192 | << "failed to register object " << objectPath() |
| 193 | << " the name already exists in the objectRegistry" |
| 194 | << endl; |
| 195 | } |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | return registered_; |
| 200 | } |
| 201 | |
| 202 | |
| 203 | bool Foam::regIOobject::checkOut() |
no test coverage detected