96 if ( *
this == imf.
root() )
200 if ( n == imf.
root() )
387 if (
static_cast<Node>( *
this ) != child.
parent() )
436 if (
static_cast<Node>( *
this ) != child.
parent() )
608 if (
static_cast<float>(
minimum() ) < E57_FLOAT_MIN ||
static_cast<float>(
maximum() ) > E57_FLOAT_MAX )
783 if ( !
root().isRoot() )
833 for (
size_t i = 0; i < eCount; i++ )
835 for (
size_t j = i + 1; j < eCount; j++ )
849 for (
size_t i = 0; i < eCount; i++ )
859 if ( uri != goodUri )
867 if ( prefix != goodPrefix )
884 size_t min_stride = 0;
918 min_stride =
sizeof(
ustring );
923 if (
stride() < min_stride )
944 return impl_->type();
967 return impl_->isRoot();
999 return Node( impl_->parent() );
1032 return impl_->pathName();
1062 return impl_->elementName();
1085 return ImageFile( impl_->destImageFile() );
1107 return impl_->isAttached();
1131 impl_->dump( indent, os );
1134 void Node::dump(
int indent, std::ostream &os )
const
1148 return ( impl_ == n2.impl_ );
1160 return ( impl_ != n2.impl_ );
1226 return impl_->isRoot();
1233 return Node( impl_->parent() );
1240 return impl_->pathName();
1247 return impl_->elementName();
1255 return ImageFile( impl_->destImageFile() );
1262 return impl_->isAttached();
1277 return impl_->childCount();
1299 return impl_->isDefined(
pathName );
1321 return Node( impl_->get( index ) );
1390 impl_->set(
pathName, n.impl(),
false );
1399 impl_->dump( indent, os );
1415 StructureNode::operator
Node()
const
1419 return Node( impl_ );
1442 impl_ = std::static_pointer_cast<StructureNodeImpl>( n.impl() );
1525 impl_( new
VectorNodeImpl( destImageFile.impl(), allowHeteroChildren ) )
1533 return impl_->isRoot();
1540 return Node( impl_->parent() );
1547 return impl_->pathName();
1554 return impl_->elementName();
1562 return ImageFile( impl_->destImageFile() );
1569 return impl_->isAttached();
1587 return impl_->allowHeteroChildren();
1601 return impl_->childCount();
1626 return impl_->isDefined(
pathName );
1643 return Node( impl_->get( index ) );
1703 impl_->append( n.impl() );
1712 impl_->dump( indent, os );
1732 return Node( impl_ );
1755 impl_ = std::static_pointer_cast<VectorNodeImpl>( n.impl() );
1861 bool doConversion,
bool doScaling,
size_t stride ) :
1862 impl_( new
SourceDestBufferImpl( destImageFile.impl(), pathName, capacity, doConversion, doScaling ) )
1864 impl_->setTypeInfo<int8_t>( b,
stride );
1872 bool doConversion,
bool doScaling,
size_t stride ) :
1873 impl_( new
SourceDestBufferImpl( destImageFile.impl(), pathName, capacity, doConversion, doScaling ) )
1875 impl_->setTypeInfo<uint8_t>( b,
stride );
1883 bool doConversion,
bool doScaling,
size_t stride ) :
1884 impl_( new
SourceDestBufferImpl( destImageFile.impl(), pathName, capacity, doConversion, doScaling ) )
1886 impl_->setTypeInfo<int16_t>( b,
stride );
1894 const size_t capacity,
bool doConversion,
bool doScaling,
size_t stride ) :
1895 impl_( new
SourceDestBufferImpl( destImageFile.impl(), pathName, capacity, doConversion, doScaling ) )
1897 impl_->setTypeInfo<uint16_t>( b,
stride );
1905 bool doConversion,
bool doScaling,
size_t stride ) :
1906 impl_( new
SourceDestBufferImpl( destImageFile.impl(), pathName, capacity, doConversion, doScaling ) )
1908 impl_->setTypeInfo<int32_t>( b,
stride );
1916 const size_t capacity,
bool doConversion,
bool doScaling,
size_t stride ) :
1917 impl_( new
SourceDestBufferImpl( destImageFile.impl(), pathName, capacity, doConversion, doScaling ) )
1919 impl_->setTypeInfo<uint32_t>( b,
stride );
1927 bool doConversion,
bool doScaling,
size_t stride ) :
1928 impl_( new
SourceDestBufferImpl( destImageFile.impl(), pathName, capacity, doConversion, doScaling ) )
1930 impl_->setTypeInfo<int64_t>( b,
stride );
1938 bool doConversion,
bool doScaling,
size_t stride ) :
1939 impl_( new
SourceDestBufferImpl( destImageFile.impl(), pathName, capacity, doConversion, doScaling ) )
1941 impl_->setTypeInfo<
bool>( b,
stride );
1949 bool doConversion,
bool doScaling,
size_t stride ) :
1950 impl_( new
SourceDestBufferImpl( destImageFile.impl(), pathName, capacity, doConversion, doScaling ) )
1952 impl_->setTypeInfo<
float>( b,
stride );
1960 bool doConversion,
bool doScaling,
size_t stride ) :
1961 impl_( new
SourceDestBufferImpl( destImageFile.impl(), pathName, capacity, doConversion, doScaling ) )
1963 impl_->setTypeInfo<
double>( b,
stride );
2032 return impl_->pathName();
2057 return impl_->memoryRepresentation();
2072 return impl_->capacity();
2106 return impl_->doConversion();
2143 return impl_->doScaling();
2160 return impl_->stride();
2169 impl_->dump( indent, os );
2287 return impl_->read();
2357 return impl_->read( dbufs );
2385 impl_->seek( recordNumber );
2414 return impl_->isOpen();
2430 return impl_->compressedVectorNode();
2439 impl_->dump( indent, os );
2565 impl_->write( recordCount );
2635 impl_->write( sbufs, recordCount );
2680 return impl_->isOpen();
2694 return impl_->compressedVectorNode();
2703 impl_->dump( indent, os );
2835 impl_->setPrototype(
prototype.impl() );
2836 impl_->setCodecs(
codecs.impl() );
2843 return impl_->isRoot();
2850 return Node( impl_->parent() );
2857 return impl_->pathName();
2864 return impl_->elementName();
2872 return ImageFile( impl_->destImageFile() );
2879 return impl_->isAttached();
2896 return impl_->childCount();
2911 return Node( impl_->getPrototype() );
2936 impl_->dump( indent, os );
2952 CompressedVectorNode::operator
Node()
const
2956 return Node( impl_ );
2977 impl_ = std::static_pointer_cast<CompressedVectorNodeImpl>( n.impl() );
3143 impl_( new
IntegerNodeImpl( destImageFile.impl(), value, minimum, maximum ) )
3151 return impl_->isRoot();
3158 return Node( impl_->parent() );
3165 return impl_->pathName();
3172 return impl_->elementName();
3180 return ImageFile( impl_->destImageFile() );
3187 return impl_->isAttached();
3201 return impl_->value();
3215 return impl_->minimum();
3229 return impl_->maximum();
3238 impl_->dump( indent, os );
3258 return Node( impl_ );
3279 impl_ = std::static_pointer_cast<IntegerNodeImpl>( n.impl() );
3369 double scale,
double offset ) :
3374 double scale,
double offset ) :
3375 impl_( new
ScaledIntegerNodeImpl( destImageFile.impl(), static_cast<int64_t>( rawValue ), minimum, maximum, scale,
3382 static_cast<int64_t>( minimum ), static_cast<int64_t>( maximum ), scale,
offset ) )
3424 double scaledMaximum,
double scale,
double offset ) :
3432 return impl_->isRoot();
3439 return Node( impl_->parent() );
3446 return impl_->pathName();
3453 return impl_->elementName();
3461 return ImageFile( impl_->destImageFile() );
3468 return impl_->isAttached();
3482 return impl_->rawValue();
3497 return impl_->scaledValue();
3511 return impl_->minimum();
3524 return impl_->scaledMinimum();
3537 return impl_->maximum();
3550 return impl_->scaledMaximum();
3563 return impl_->scale();
3577 return impl_->offset();
3586 impl_->dump( indent, os );
3602 ScaledIntegerNode::operator
Node()
const
3606 return Node( impl_ );
3627 impl_ = std::static_pointer_cast<ScaledIntegerNodeImpl>( n.impl() );
3728 impl_( new
FloatNodeImpl( destImageFile.impl(), value, precision, minimum, maximum ) )
3736 return impl_->isRoot();
3743 return Node( impl_->parent() );
3750 return impl_->pathName();
3757 return impl_->elementName();
3765 return ImageFile( impl_->destImageFile() );
3772 return impl_->isAttached();
3789 return impl_->value();
3804 return impl_->precision();
3822 return impl_->minimum();
3840 return impl_->maximum();
3849 impl_->dump( indent, os );
3869 return Node( impl_ );
3890 impl_ = std::static_pointer_cast<FloatNodeImpl>( n.impl() );
3966 return impl_->isRoot();
3973 return Node( impl_->parent() );
3980 return impl_->pathName();
3987 return impl_->elementName();
3995 return ImageFile( impl_->destImageFile() );
4002 return impl_->isAttached();
4015 return impl_->value();
4024 impl_->dump( indent, os );
4044 return Node( impl_ );
4065 impl_ = std::static_pointer_cast<StringNodeImpl>( n.impl() );
4162 impl_( new
BlobNodeImpl( destImageFile.impl(), byteCount ) )
4170 return impl_->isRoot();
4177 return Node( impl_->parent() );
4184 return impl_->pathName();
4191 return impl_->elementName();
4199 return ImageFile( impl_->destImageFile() );
4206 return impl_->isAttached();
4220 return impl_->byteCount();
4252 impl_->read( buf, start,
count );
4294 impl_->write( buf, start,
count );
4303 impl_->dump( indent, os );
4323 return Node( impl_ );
4344 impl_ = std::static_pointer_cast<BlobNodeImpl>( n.impl() );
4502 impl_->construct2( fname, mode );
4508 impl_->construct2( input,
size );
4588 return impl_->isOpen();
4600 return impl_->isWriter();
4612 return impl_->fileName();
4632 return impl_->writerCount();
4652 return impl_->readerCount();
4699 impl_->extensionsAdd( prefix, uri );
4723 return impl_->extensionsLookupPrefix( prefix, uri );
4748 return impl_->extensionsLookupUri( uri, prefix );
4764 return impl_->extensionsCount();
4785 return impl_->extensionsPrefix( index );
4806 return impl_->extensionsUri( index );
4822 return impl_->isElementNameExtended( elementName );
4843 impl_->elementNameParse( elementName, prefix, localPart );
4854 impl_->dump( indent, os );
4871 return ( impl_ == imf2.impl_ );
4883 return ( impl_ != imf2.impl_ );
bool isRoot() const
Is this a root node.
ustring pathName() const
Get absolute pathname of node.
int64_t byteCount() const
Get size of blob declared when it was created.
Node parent() const
Return parent of node, or self if a root node.
void checkInvariant(bool doRecurse=true, bool doUpcast=true)
Check whether BlobNode class invariant is true.
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
void write(uint8_t *buf, int64_t start, size_t count)
Write a buffer of bytes to a blob.
ustring elementName() const
Get elementName string, that identifies the node in its parent..
ImageFile destImageFile() const
Get the ImageFile that was declared as the destination for the node when it was created.
void read(uint8_t *buf, int64_t start, size_t count)
Read a buffer of bytes from a blob.
bool isAttached() const
Has node been attached into the tree of an ImageFile.
bool isRoot() const
Is this a root node.
Node parent() const
Return parent of node, or self if a root node.
CompressedVectorReader reader(const std::vector< SourceDestBuffer > &dbufs)
Create an iterator object for reading a series of blocks of data from a CompressedVectorNode.
Node prototype() const
Get the prototype tree that describes the types in the record.
ImageFile destImageFile() const
Get the ImageFile that was declared as the destination for the node when it was created.
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
int64_t childCount() const
Get current number of records in a CompressedVectorNode.
CompressedVectorWriter writer(std::vector< SourceDestBuffer > &sbufs)
Create an iterator object for writing a series of blocks of data to a CompressedVectorNode.
ustring elementName() const
Get elementName string, that identifies the node in its parent..
bool isAttached() const
Has node been attached into the tree of an ImageFile.
ustring pathName() const
Get absolute pathname of node.
void checkInvariant(bool doRecurse=true, bool doUpcast=true)
Check whether CompressedVectorNode class invariant is true.
VectorNode codecs() const
Get the codecs tree that describes the encoder/decoder configuration of the CompressedVectorNode.
CompressedVectorNode()=delete
void checkInvariant(bool doRecurse=true)
Check whether CompressedVectorReader class invariant is true.
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
CompressedVectorReader()=delete
unsigned read()
Request transfer of blocks of data from CompressedVectorNode into previously designated destination b...
void close()
End the read operation.
CompressedVectorNode compressedVectorNode() const
Return the CompressedVectorNode being read.
void seek(int64_t recordNumber)
Set record number of CompressedVectorNode where next read will start.
bool isOpen()
Test whether CompressedVectorReader is still open for reading.
bool isOpen()
Test whether CompressedVectorWriter is still open for writing.
void write(const size_t recordCount)
Request transfer of blocks of data to CompressedVectorNode from previously designated source buffers.
void close()
End the write operation.
void checkInvariant(bool doRecurse=true)
Check whether CompressedVectorWriter class invariant is true.
CompressedVectorWriter()=delete
CompressedVectorNode compressedVectorNode() const
Return the CompressedVectorNode being written to.
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
double minimum() const
Get the declared minimum that the value may take.
ustring elementName() const
Get elementName string, that identifies the node in its parent..
double maximum() const
Get the declared maximum that the value may take.
Node parent() const
Return parent of node, or self if a root node.
bool isAttached() const
Has node been attached into the tree of an ImageFile.
bool isRoot() const
Is this a root node.
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
ustring pathName() const
Get absolute pathname of node.
double value() const
Get IEEE floating point value stored.
ImageFile destImageFile() const
Get the ImageFile that was declared as the destination for the node when it was created.
void checkInvariant(bool doRecurse=true, bool doUpcast=true)
Check whether FloatNode class invariant is true.
FloatPrecision precision() const
Get declared precision of the floating point number.
StructureNode root() const
Get the pre-established root StructureNode of the E57 ImageFile.
bool isOpen() const
Test whether ImageFile is still open for accessing.
size_t extensionsCount() const
Get number of E57 extensions declared in the ImageFile.
bool extensionsLookupPrefix(const ustring &prefix, ustring &uri) const
Get URI associated with an E57 extension prefix in the ImageFile.
void elementNameParse(const ustring &elementName, ustring &prefix, ustring &localPart) const
Parse element name into prefix and localPart substrings.
bool extensionsLookupUri(const ustring &uri, ustring &prefix) const
Get an E57 extension prefix associated with a URI in the ImageFile.
int writerCount() const
Get current number of open CompressedVectorWriter objects writing to ImageFile.
void cancel()
Stop I/O operations and delete a partially written ImageFile on the disk.
void checkInvariant(bool doRecurse=true) const
Check whether ImageFile class invariant is true.
ustring extensionsUri(const size_t index) const
Get an E57 extension URI declared in an ImageFile by index.
bool operator!=(ImageFile imf2) const
Test if two ImageFile handles refer to different underlying ImageFile.
bool operator==(ImageFile imf2) const
Test if two ImageFile handles refer to the same underlying ImageFile.
ustring fileName() const
Get the file name the ImageFile was created with.
int readerCount() const
Get current number of open CompressedVectorReader objects reading from ImageFile.
void extensionsAdd(const ustring &prefix, const ustring &uri)
Declare the use of an E57 extension in an ImageFile being written.
void close()
Complete any write operations on an ImageFile, and close the file on the disk.
ustring extensionsPrefix(const size_t index) const
Get an E57 extension prefix declared in an ImageFile by index.
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
bool isWritable() const
Test whether ImageFile was opened in write mode.
bool isElementNameExtended(const ustring &elementName) const
Test whether an E57 element name has an extension prefix.
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
ustring pathName() const
Get absolute pathname of node.
void checkInvariant(bool doRecurse=true, bool doUpcast=true)
Check whether IntegerNode class invariant is true.
bool isAttached() const
Has node been attached into the tree of an ImageFile.
int64_t value() const
Get integer value stored.
int64_t maximum() const
Get the declared maximum that the value may take.
ImageFile destImageFile() const
Get the ImageFile that was declared as the destination for the node when it was created.
Node parent() const
Return parent of node, or self if a root node.
int64_t minimum() const
Get the declared minimum that the value may take.
ustring elementName() const
Get elementName string, that identifies the node in its parent..
bool isRoot() const
Is this a root node.
ustring elementName() const
Get element name of node.
bool isRoot() const
Is this a root node.
ustring pathName() const
Get absolute pathname of node.
bool operator==(Node n2) const
Test if two node handles refer to the same underlying node.
Node parent() const
Return parent of node, or self if a root node.
NodeType type() const
Return the NodeType of a generic Node.
ImageFile destImageFile() const
Get the ImageFile that was declared as the destination for the node when it was created.
bool isAttached() const
Has node been attached into the tree of an ImageFile.
bool operator!=(Node n2) const
Test if two node handles refer to different underlying nodes.
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
void checkInvariant(bool doRecurse=true, bool doDowncast=true)
Check whether Node class invariant is true.
int64_t rawValue() const
Get raw unscaled integer value of element.
ImageFile destImageFile() const
Get the ImageFile that was declared as the destination for the node when it was created.
ScaledIntegerNode()=delete
double scaledMinimum() const
Get the declared scaled minimum that the scaled value may take.
bool isRoot() const
Is this a root node.
ustring elementName() const
Get elementName string, that identifies the node in its parent..
void checkInvariant(bool doRecurse=true, bool doUpcast=true)
Check whether ScaledIntegerNode class invariant is true.
double scaledValue() const
Get scaled value of element.
double scale() const
Get declared scaling factor.
int64_t minimum() const
Get the declared minimum that the raw value may take.
ustring pathName() const
Get absolute pathname of node.
int64_t maximum() const
Get the declared maximum that the raw value may take.
double scaledMaximum() const
Get the declared scaled maximum that the scaled value may take.
double offset() const
Get declared offset.
bool isAttached() const
Has node been attached into the tree of an ImageFile.
Node parent() const
Return parent of node, or self if a root node.
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
SourceDestBuffer()=delete
bool doScaling() const
Get whether scaling will be performed for ScaledIntegerNode transfers.
bool doConversion() const
Get whether conversions will be performed to match the memory type of buffer.
ustring pathName() const
Get path name in prototype that this SourceDestBuffer will transfer data to/from.
enum MemoryRepresentation memoryRepresentation() const
Get memory representation of the elements in this SourceDestBuffer.
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
size_t stride() const
Get number of bytes between consecutive memory elements in buffer.
void checkInvariant(bool doRecurse=true) const
Check whether SourceDestBuffer class invariant is true.
size_t capacity() const
Get total capacity of buffer.
Node parent() const
Return parent of node, or self if a root node.
ustring pathName() const
Get absolute pathname of node.
bool isAttached() const
Has node been attached into the tree of an ImageFile.
ustring value() const
Get Unicode character string value stored.
void checkInvariant(bool doRecurse=true, bool doUpcast=true)
Check whether StringNode class invariant is true.
ImageFile destImageFile() const
Get the ImageFile that was declared as the destination for the node when it was created.
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
ustring elementName() const
Get elementName string, that identifies the node in its parent..
bool isRoot() const
Is this a root node.
ustring elementName() const
Get elementName string, that identifies the node in its parent.
bool isDefined(const ustring &pathName) const
Is the given pathName defined relative to this node.
ustring pathName() const
Get absolute pathname of node.
bool isRoot() const
Is this a root node.
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
void checkInvariant(bool doRecurse=true, bool doUpcast=true)
Check whether StructureNode class invariant is true.
void set(const ustring &pathName, const Node &n)
Add a new child at a given path.
Node get(int64_t index) const
Get a child element by positional index.
Node parent() const
Return parent of node, or self if a root node.
bool isAttached() const
Has node been attached into the tree of an ImageFile.
int64_t childCount() const
Return number of child nodes contained by this StructureNode.
ImageFile destImageFile() const
Get the ImageFile that was declared as the destination for the node when it was created.
bool isRoot() const
Is this a root node.
bool isAttached() const
Has node been attached into the tree of an ImageFile.
bool allowHeteroChildren() const
Get whether child elements are allowed to be different types?
Node get(int64_t index) const
Get a child element by positional index.
bool isDefined(const ustring &pathName) const
Is the given pathName defined relative to this node.
void append(const Node &n)
Append a child element to end of VectorNode.
ustring pathName() const
Get absolute pathname of node.
void checkInvariant(bool doRecurse=true, bool doUpcast=true)
Check whether VectorNode class invariant is true.
Node parent() const
Return parent of node, or self if a root node.
ImageFile destImageFile() const
Get the ImageFile that was declared as the destination for the node when it was created.
int64_t childCount() const
Get number of child elements in this VectorNode.
ustring elementName() const
Get elementName string, that identifies the node in its parent..
void dump(int indent=0, std::ostream &os=std::cout) const
Diagnostic function to print internal state of object to output stream in an indented format.
__host__ __device__ float length(float2 v)
int ReadChecksumPolicy
Specifies the percentage of checksums which are verified when reading an ImageFile (0-100%).
std::shared_ptr< class NodeImpl > NodeImplSharedPtr
std::shared_ptr< class ImageFileImpl > ImageFileImplSharedPtr
FloatPrecision
The IEEE floating point number precisions supported.
@ E57_SINGLE
32 bit IEEE floating point number format
@ E57_ERROR_BAD_NODE_DOWNCAST
bad downcast from Node to specific node type
@ E57_ERROR_INVARIANCE_VIOLATION
class invariance constraint violation in debug mode
std::string ustring
UTF-8 encodeded Unicode string.
MemoryRepresentation
Identifies the representations of memory elements API can transfer data to/from.
@ E57_USTRING
Unicode UTF-8 std::string.
@ E57_UINT32
32 bit unsigned integer
@ E57_INT32
32 bit signed integer
@ E57_UINT8
8 bit unsigned integer
@ E57_INT64
64 bit signed integer
@ E57_INT8
8 bit signed integer
@ E57_REAL32
C++ float type.
@ E57_UINT16
16 bit unsigned integer
@ E57_BOOL
C++ boolean type.
@ E57_INT16
16 bit signed integer
@ E57_REAL64
C++ double type.
NodeType
Identifiers for types of E57 elements.
@ E57_COMPRESSED_VECTOR
CompressedVectorNode class.
@ E57_BLOB
BlobNode class.
@ E57_STRUCTURE
StructureNode class.
@ E57_VECTOR
VectorNode class.
@ E57_INTEGER
IntegerNode class.
@ E57_SCALED_INTEGER
ScaledIntegerNode class.
@ E57_FLOAT
FloatNode class.
@ E57_STRING
StringNode class.
std::string toString(T x)
std::vector< std::string > StringList