MCPcopy Create free account
hub / github.com/PDAL/PDAL / checkState_

Method checkState_

plugins/e57/libE57Format/src/SourceDestBufferImpl.cpp:280–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280void SourceDestBufferImpl::checkState_() const
281{
282 /// Implement checkImageFileOpen functionality for SourceDestBufferImpl ctors
283 /// Throw an exception if destImageFile (destImageFile_) isn't open
284 ImageFileImplSharedPtr destImageFile( destImageFile_ );
285 if ( !destImageFile->isOpen() )
286 {
287 throw E57_EXCEPTION2( ErrorImageFileNotOpen, "fileName=" + destImageFile->fileName() );
288 }
289
290 /// Check pathName is well formed (can't verify path is defined until
291 /// associate sdbuffer with CompressedVector later)
292 ImageFileImplSharedPtr imf( destImageFile_ );
293 imf->pathNameCheckWellFormed( pathName_ );
294
295 if ( memoryRepresentation_ != UString )
296 {
297 if ( base_ == nullptr )
298 {
299 throw E57_EXCEPTION2( ErrorBadBuffer, "pathName=" + pathName_ );
300 }
301 if ( stride_ == 0 )
302 {
303 throw E57_EXCEPTION2( ErrorBadBuffer, "pathName=" + pathName_ );
304 }
305 //??? check base alignment, depending on CPU type
306 //??? check if stride too small, positive or negative
307 }
308 else
309 {
310 if ( ustrings_ == nullptr )
311 {
312 throw E57_EXCEPTION2( ErrorBadBuffer, "pathName=" + pathName_ );
313 }
314 }
315}
316
317int64_t SourceDestBufferImpl::getNextInt64()
318{

Callers

nothing calls this directly

Calls 3

isOpenMethod · 0.45
fileNameMethod · 0.45

Tested by

no test coverage detected