MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / checkIn

Function checkIn

src/OpenFOAM/db/regIOobject/regIOobject.C:167–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
166
167bool 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
203bool Foam::regIOobject::checkOut()

Callers 3

regIOobject.CFile · 0.70
renameFunction · 0.70
Callback.CFile · 0.50

Calls 2

nameFunction · 0.50
abortFunction · 0.50

Tested by

no test coverage detected