e57::BlobNodeImpl Class Reference

#include <BlobNodeImpl.h>

Public Member Functions

 BlobNodeImpl (ImageFileImplWeakPtr destImageFile, int64_t byteCount)
 
 BlobNodeImpl (ImageFileImplWeakPtr destImageFile, int64_t fileOffset, int64_t length)
 
int64_t byteCount ()
 
void checkLeavesInSet (const StringSet &pathNames, NodeImplSharedPtr origin) override
 
bool isDefined (const ustring &pathName) override
 
bool isTypeEquivalent (NodeImplSharedPtr ni) override
 
void read (uint8_t *buf, int64_t start, size_t count)
 
NodeType type () const override
 
void write (uint8_t *buf, int64_t start, size_t count)
 
void writeXml (ImageFileImplSharedPtr imf, CheckedFile &cf, int indent, const char *forcedFieldName=nullptr) override
 
 ~BlobNodeImpl () override=default
 
- Public Member Functions inherited from e57::NodeImpl
void checkBuffers (const std::vector< SourceDestBuffer > &sdbufs, bool allowMissing)
 
void checkImageFileOpen (const char *srcFileName, int srcLineNumber, const char *srcFunctionName) const
 
virtual void checkLeavesInSet (const StringSet &pathNames, NodeImplSharedPtr origin)=0
 
ImageFileImplSharedPtr destImageFile ()
 
ustring elementName () const
 
bool findTerminalPosition (const NodeImplSharedPtr &target, uint64_t &countFromLeft)
 
virtual NodeImplSharedPtr get (const ustring &pathName)
 
ustring imageFileName () const
 
bool isAttached () const
 
virtual bool isDefined (const ustring &pathName)=0
 
bool isRoot () const
 
bool isTypeConstrained ()
 
virtual bool isTypeEquivalent (NodeImplSharedPtr ni)=0
 
NodeImplSharedPtr parent ()
 
ustring pathName () const
 
ustring relativePathName (const NodeImplSharedPtr &origin, ustring childPathName=ustring()) const
 
virtual void set (const StringList &fields, unsigned level, NodeImplSharedPtr ni, bool autoPathCreate=false)
 
virtual void set (const ustring &pathName, NodeImplSharedPtr ni, bool autoPathCreate=false)
 
virtual void setAttachedRecursive ()
 
void setParent (NodeImplSharedPtr parent, const ustring &elementName)
 
virtual NodeType type () const =0
 
virtual void writeXml (ImageFileImplSharedPtr imf, CheckedFile &cf, int indent, const char *forcedFieldName=nullptr)=0
 
virtual ~NodeImpl ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from e57::NodeImpl
NodeImplSharedPtr getRoot ()
 
virtual NodeImplSharedPtr lookup (const ustring &)
 
 NodeImpl (ImageFileImplWeakPtr destImageFile)
 
NodeImploperator= (NodeImpl &n)
 
- Protected Attributes inherited from e57::NodeImpl
ImageFileImplWeakPtr destImageFile_
 
ustring elementName_
 
bool isAttached_
 
NodeImplWeakPtr parent_
 

Constructor & Destructor Documentation

◆ BlobNodeImpl() [1/2]

e57::BlobNodeImpl::BlobNodeImpl ( ImageFileImplWeakPtr  destImageFile,
int64_t  byteCount 
)

This what caller thinks blob length is

Round segment length up to multiple of 4 bytes

Reserve space for blob in file, extend with zeros since writes will happen at later time by caller

Prepare BlobSectionHeader

Write header at beginning of section

References byteCount(), e57::NodeImpl::destImageFile(), and e57::BlobSectionHeader::sectionLogicalLength.

◆ BlobNodeImpl() [2/2]

e57::BlobNodeImpl::BlobNodeImpl ( ImageFileImplWeakPtr  destImageFile,
int64_t  fileOffset,
int64_t  length 
)

Init blob object that already exists in E57 file currently reading.

Init state from values read from XML

References e57::NodeImpl::destImageFile().

◆ ~BlobNodeImpl()

e57::BlobNodeImpl::~BlobNodeImpl ( )
overridedefault

Member Function Documentation

◆ byteCount()

int64_t e57::BlobNodeImpl::byteCount ( )

◆ checkLeavesInSet()

void e57::BlobNodeImpl::checkLeavesInSet ( const StringSet pathNames,
NodeImplSharedPtr  origin 
)
overridevirtual

We are a leaf node, so verify that we are listed in set. ???true for blobs? what exception get if try blob in compressedvector?

Implements e57::NodeImpl.

References e57::E57_ERROR_NO_BUFFER_FOR_ELEMENT, e57::NodeImpl::pathName(), and e57::NodeImpl::relativePathName().

◆ isDefined()

bool e57::BlobNodeImpl::isDefined ( const ustring pathName)
overridevirtual

We have no sub-structure, so if path not empty return false

Implements e57::NodeImpl.

References e57::NodeImpl::pathName().

◆ isTypeEquivalent()

bool e57::BlobNodeImpl::isTypeEquivalent ( NodeImplSharedPtr  ni)
overridevirtual

Same node type?

Downcast to shared_ptr<BlobNodeImpl>

blob lengths must match

ignore blob contents, doesn't have to match

Types match

Implements e57::NodeImpl.

References e57::E57_BLOB.

◆ read()

void e57::BlobNodeImpl::read ( uint8_t *  buf,
int64_t  start,
size_t  count 
)

◆ type()

NodeType e57::BlobNodeImpl::type ( ) const
overridevirtual

◆ write()

◆ writeXml()

void e57::BlobNodeImpl::writeXml ( ImageFileImplSharedPtr  imf,
CheckedFile cf,
int  indent,
const char *  forcedFieldName = nullptr 
)
overridevirtual

The documentation for this class was generated from the following files: