e57::CompressedVectorNodeImpl Class Reference

#include <CompressedVectorNodeImpl.h>

Public Member Functions

void checkLeavesInSet (const StringSet &pathNames, NodeImplSharedPtr origin) override
 
int64_t childCount () const
 
 CompressedVectorNodeImpl (ImageFileImplWeakPtr destImageFile)
 
uint64_t getBinarySectionLogicalStart () const
 
std::shared_ptr< VectorNodeImplgetCodecs () const
 
NodeImplSharedPtr getPrototype () const
 
int64_t getRecordCount () const
 
bool isDefined (const ustring &pathName) override
 
bool isTypeEquivalent (NodeImplSharedPtr ni) override
 
std::shared_ptr< CompressedVectorReaderImplreader (std::vector< SourceDestBuffer > dbufs)
 
void setAttachedRecursive () override
 
void setBinarySectionLogicalStart (uint64_t binarySectionLogicalStart)
 
void setCodecs (const std::shared_ptr< VectorNodeImpl > &codecs)
 
void setPrototype (const NodeImplSharedPtr &prototype)
 
void setRecordCount (int64_t recordCount)
 
NodeType type () const override
 
std::shared_ptr< CompressedVectorWriterImplwriter (std::vector< SourceDestBuffer > sbufs)
 Iterator constructors. More...
 
void writeXml (ImageFileImplSharedPtr imf, CheckedFile &cf, int indent, const char *forcedFieldName=nullptr) override
 
 ~CompressedVectorNodeImpl () 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
 

Friends

class CompressedVectorReaderImpl
 

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

◆ CompressedVectorNodeImpl()

e57::CompressedVectorNodeImpl::CompressedVectorNodeImpl ( ImageFileImplWeakPtr  destImageFile)

◆ ~CompressedVectorNodeImpl()

e57::CompressedVectorNodeImpl::~CompressedVectorNodeImpl ( )
overridedefault

Member Function Documentation

◆ checkLeavesInSet()

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

Since only called for prototype nodes, shouldn't be able to get here since CompressedVectors can't be in prototypes

Implements e57::NodeImpl.

References e57::E57_ERROR_INTERNAL, and e57::NodeImpl::pathName().

◆ childCount()

int64_t e57::CompressedVectorNodeImpl::childCount ( ) const

◆ getBinarySectionLogicalStart()

uint64_t e57::CompressedVectorNodeImpl::getBinarySectionLogicalStart ( ) const

◆ getCodecs()

std::shared_ptr< VectorNodeImpl > e57::CompressedVectorNodeImpl::getCodecs ( ) const

◆ getPrototype()

NodeImplSharedPtr e57::CompressedVectorNodeImpl::getPrototype ( ) const

◆ getRecordCount()

int64_t e57::CompressedVectorNodeImpl::getRecordCount ( ) const

◆ isDefined()

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

◆ isTypeEquivalent()

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

Same node type?

recordCount must match

Prototypes and codecs must match ???

Implements e57::NodeImpl.

References e57::E57_COMPRESSED_VECTOR.

◆ reader()

std::shared_ptr< CompressedVectorReaderImpl > e57::CompressedVectorNodeImpl::reader ( std::vector< SourceDestBuffer dbufs)

Check don't have any writers/readers open for this ImageFile

dbufs can't be empty

Can be read or write mode, but must be attached

Get pointer to me (really shared_ptr<CompressedVectorNodeImpl>)

Downcast pointer to right type

Return a shared_ptr to new object

References e57::NodeImpl::checkImageFileOpen(), CompressedVectorReaderImpl, e57::NodeImpl::destImageFile(), e57::NodeImpl::destImageFile_, e57::E57_ERROR_BAD_API_ARGUMENT, e57::E57_ERROR_NODE_UNATTACHED, e57::E57_ERROR_TOO_MANY_READERS, e57::E57_ERROR_TOO_MANY_WRITERS, e57::NodeImpl::isAttached(), and e57::toString().

◆ setAttachedRecursive()

void e57::CompressedVectorNodeImpl::setAttachedRecursive ( )
overridevirtual

Mark this node as attached to an ImageFile

Mark nodes in prototype tree, if defined

Mark nodes in codecs tree if defined

Reimplemented from e57::NodeImpl.

References e57::NodeImpl::isAttached_.

◆ setBinarySectionLogicalStart()

void e57::CompressedVectorNodeImpl::setBinarySectionLogicalStart ( uint64_t  binarySectionLogicalStart)

◆ setCodecs()

void e57::CompressedVectorNodeImpl::setCodecs ( const std::shared_ptr< VectorNodeImpl > &  codecs)

Can't set codecs twice.

codecs can't have a parent (must be a root node)

Verify that codecs is destined for same ImageFile as this is

Note that codecs is not attached to CompressedVector in a parent/child relationship. This means that codecs is a root node (has no parent).

References e57::NodeImpl::destImageFile(), e57::E57_ERROR_ALREADY_HAS_PARENT, e57::E57_ERROR_DIFFERENT_DEST_IMAGEFILE, e57::E57_ERROR_SET_TWICE, and e57::NodeImpl::pathName().

◆ setPrototype()

void e57::CompressedVectorNodeImpl::setPrototype ( const NodeImplSharedPtr prototype)

Can't set prototype twice.

prototype can't have a parent (must be a root node)

Verify that prototype is destined for same ImageFile as this is

!! check for incomplete CompressedVectors when closing file

Note that prototype is not attached to CompressedVector in a parent/child relationship. This means that prototype is a root node (has no parent).

References e57::NodeImpl::destImageFile(), e57::E57_ERROR_ALREADY_HAS_PARENT, e57::E57_ERROR_DIFFERENT_DEST_IMAGEFILE, e57::E57_ERROR_SET_TWICE, and e57::NodeImpl::pathName().

◆ setRecordCount()

void e57::CompressedVectorNodeImpl::setRecordCount ( int64_t  recordCount)

◆ type()

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

◆ writer()

std::shared_ptr< CompressedVectorWriterImpl > e57::CompressedVectorNodeImpl::writer ( std::vector< SourceDestBuffer sbufs)

Iterator constructors.

Check don't have any writers/readers open for this ImageFile

sbufs can't be empty

Get pointer to me (really shared_ptr<CompressedVectorNodeImpl>)

Downcast pointer to right type

Return a shared_ptr to new object

References e57::NodeImpl::checkImageFileOpen(), e57::NodeImpl::CompressedVectorWriterImpl, e57::NodeImpl::destImageFile(), e57::NodeImpl::destImageFile_, e57::E57_ERROR_BAD_API_ARGUMENT, e57::E57_ERROR_FILE_IS_READ_ONLY, e57::E57_ERROR_NODE_UNATTACHED, e57::E57_ERROR_TOO_MANY_READERS, e57::E57_ERROR_TOO_MANY_WRITERS, e57::NodeImpl::isAttached(), and e57::toString().

◆ writeXml()

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

Friends And Related Function Documentation

◆ CompressedVectorReaderImpl

Referenced by reader().


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