107 constexpr
char E57_V1_0_URI[] =
"http://www.astm.org/COMMIT/E57/2010-e57-v1.0";
111 constexpr int8_t E57_INT8_MIN = -128;
112 constexpr int8_t E57_INT8_MAX = 127;
113 constexpr int16_t E57_INT16_MIN = -32768;
114 constexpr int16_t E57_INT16_MAX = 32767;
115 constexpr int32_t E57_INT32_MIN = -2147483647 - 1;
116 constexpr int32_t E57_INT32_MAX = 2147483647;
117 constexpr int64_t E57_INT64_MIN = -9223372036854775807LL - 1;
118 constexpr int64_t E57_INT64_MAX = 9223372036854775807LL;
119 constexpr uint8_t E57_UINT8_MIN = 0U;
120 constexpr uint8_t E57_UINT8_MAX = 0xffU;
121 constexpr uint16_t E57_UINT16_MIN = 0U;
122 constexpr uint16_t E57_UINT16_MAX = 0xffffU;
123 constexpr uint32_t E57_UINT32_MIN = 0U;
124 constexpr uint32_t E57_UINT32_MAX = 0xffffffffU;
125 constexpr uint64_t E57_UINT64_MIN = 0ULL;
126 constexpr uint64_t E57_UINT64_MAX = 0xffffffffffffffffULL;
128 constexpr
float E57_FLOAT_MIN = -FLT_MAX;
129 constexpr
float E57_FLOAT_MAX = FLT_MAX;
130 constexpr
double E57_DOUBLE_MIN = -DBL_MAX;
131 constexpr
double E57_DOUBLE_MAX = DBL_MAX;
140 #ifdef E57_INTERNAL_IMPLEMENTATION_ENABLE
141 #define E57_OBJECT_IMPLEMENTATION( T ) \
143 std::shared_ptr<T##Impl> impl() const \
149 std::shared_ptr<T##Impl> impl_;
151 #define E57_OBJECT_IMPLEMENTATION( T ) \
153 std::shared_ptr<T##Impl> impl_;
195 bool isAttached()
const;
196 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
197 void checkInvariant(
bool doRecurse =
true,
bool doDowncast =
true );
203 #ifdef E57_INTERNAL_IMPLEMENTATION_ENABLE
204 explicit Node( std::shared_ptr<NodeImpl> );
210 E57_OBJECT_IMPLEMENTATION(
Node )
221 int64_t childCount()
const;
222 bool isDefined(
const ustring &pathName )
const;
223 Node get( int64_t index )
const;
225 void set(
const ustring &pathName,
const Node &n );
228 operator Node()
const;
237 bool isAttached()
const;
240 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
241 void checkInvariant(
bool doRecurse =
true,
bool doUpcast =
true );
262 bool allowHeteroChildren()
const;
264 int64_t childCount()
const;
265 bool isDefined(
const ustring &pathName )
const;
266 Node get( int64_t index )
const;
268 void append(
const Node &n );
271 operator Node()
const;
280 bool isAttached()
const;
283 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
284 void checkInvariant(
bool doRecurse =
true,
bool doUpcast =
true );
291 VectorNode( std::shared_ptr<VectorNodeImpl> ni );
303 bool doConversion =
false,
bool doScaling =
false,
size_t stride =
sizeof( int8_t ) );
305 bool doConversion =
false,
bool doScaling =
false,
size_t stride =
sizeof( uint8_t ) );
307 bool doConversion =
false,
bool doScaling =
false,
size_t stride =
sizeof( int16_t ) );
309 bool doConversion =
false,
bool doScaling =
false,
size_t stride =
sizeof( uint16_t ) );
311 bool doConversion =
false,
bool doScaling =
false,
size_t stride =
sizeof( int32_t ) );
313 bool doConversion =
false,
bool doScaling =
false,
size_t stride =
sizeof( uint32_t ) );
315 bool doConversion =
false,
bool doScaling =
false,
size_t stride =
sizeof( int64_t ) );
317 bool doConversion =
false,
bool doScaling =
false,
size_t stride =
sizeof(
bool ) );
319 bool doConversion =
false,
bool doScaling =
false,
size_t stride =
sizeof(
float ) );
321 bool doConversion =
false,
bool doScaling =
false,
size_t stride =
sizeof(
double ) );
326 size_t capacity()
const;
327 bool doConversion()
const;
328 bool doScaling()
const;
332 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
333 void checkInvariant(
bool doRecurse =
true )
const;
349 unsigned read( std::vector<SourceDestBuffer> &dbufs );
350 void seek( int64_t recordNumber );
355 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
356 void checkInvariant(
bool doRecurse =
true );
375 void write(
const size_t recordCount );
376 void write( std::vector<SourceDestBuffer> &sbufs,
const size_t recordCount );
381 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
382 void checkInvariant(
bool doRecurse =
true );
402 int64_t childCount()
const;
403 Node prototype()
const;
411 operator Node()
const;
420 bool isAttached()
const;
423 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
424 void checkInvariant(
bool doRecurse =
true,
bool doUpcast =
true );
444 explicit IntegerNode(
ImageFile destImageFile, int64_t value = 0, int64_t minimum = E57_INT64_MIN,
445 int64_t maximum = E57_INT64_MAX );
447 int64_t value()
const;
448 int64_t minimum()
const;
449 int64_t maximum()
const;
452 operator Node()
const;
461 bool isAttached()
const;
464 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
465 void checkInvariant(
bool doRecurse =
true,
bool doUpcast =
true );
470 IntegerNode( std::shared_ptr<IntegerNodeImpl> ni );
482 double scale = 1.0,
double offset = 0.0 );
484 double scale = 1.0,
double offset = 0.0 );
488 double scaledMaximum,
double scale = 1.0,
double offset = 0.0 );
490 int64_t rawValue()
const;
491 double scaledValue()
const;
492 int64_t minimum()
const;
493 double scaledMinimum()
const;
494 int64_t maximum()
const;
495 double scaledMaximum()
const;
496 double scale()
const;
500 operator Node()
const;
509 bool isAttached()
const;
512 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
513 void checkInvariant(
bool doRecurse =
true,
bool doUpcast =
true );
530 double minimum = E57_DOUBLE_MIN,
double maximum = E57_DOUBLE_MAX );
532 double value()
const;
534 double minimum()
const;
535 double maximum()
const;
538 operator Node()
const;
547 bool isAttached()
const;
550 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
551 void checkInvariant(
bool doRecurse =
true,
bool doUpcast =
true );
556 FloatNode( std::shared_ptr<FloatNodeImpl> ni );
572 operator Node()
const;
581 bool isAttached()
const;
584 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
585 void checkInvariant(
bool doRecurse =
true,
bool doUpcast =
true );
591 StringNode( std::shared_ptr<StringNodeImpl> ni );
604 int64_t byteCount()
const;
605 void read( uint8_t *buf, int64_t start,
size_t count );
606 void write( uint8_t *buf, int64_t start,
size_t count );
609 operator Node()
const;
618 bool isAttached()
const;
621 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
622 void checkInvariant(
bool doRecurse =
true,
bool doUpcast =
true );
629 BlobNode( std::shared_ptr<BlobNodeImpl> ni );
634 E57_OBJECT_IMPLEMENTATION(
BlobNode )
650 bool isWritable()
const;
652 int writerCount()
const;
653 int readerCount()
const;
657 bool extensionsLookupPrefix(
const ustring &prefix,
ustring &uri )
const;
658 bool extensionsLookupUri(
const ustring &uri,
ustring &prefix )
const;
659 size_t extensionsCount()
const;
660 ustring extensionsPrefix(
const size_t index )
const;
661 ustring extensionsUri(
const size_t index )
const;
664 bool isElementNameExtended(
const ustring &elementName )
const;
668 void dump(
int indent = 0, std::ostream &os = std::cout )
const;
669 void checkInvariant(
bool doRecurse =
true )
const;
689 ImageFile( std::shared_ptr<ImageFileImpl> imfi );
CompressedVectorNode()=delete
CompressedVectorReader()=delete
CompressedVectorWriter()=delete
ScaledIntegerNode()=delete
SourceDestBuffer()=delete
SourceDestBuffer(ImageFile destImageFile, const ustring &pathName, std::vector< ustring > *b)
__host__ __device__ float length(float2 v)
constexpr bool operator!=(const optional< T > &x, const optional< T > &y)
constexpr bool operator==(const optional< T > &x, const optional< T > &y)
constexpr char E57_V1_0_URI[]
Verify all checksums. This is the default. (slow)
constexpr ReadChecksumPolicy CHECKSUM_POLICY_ALL
Only verify 50% of the checksums. The last block is always verified.
int ReadChecksumPolicy
Specifies the percentage of checksums which are verified when reading an ImageFile (0-100%).
FloatPrecision
The IEEE floating point number precisions supported.
@ E57_SINGLE
32 bit IEEE floating point number format
@ E57_DOUBLE
64 bit IEEE floating point number format
constexpr ReadChecksumPolicy CHECKSUM_POLICY_HALF
Only verify 25% of the checksums. The last block is always verified.
std::string ustring
UTF-8 encodeded Unicode string.
constexpr ReadChecksumPolicy CHECKSUM_POLICY_SPARSE
Do not verify the checksums. (fast)
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.
constexpr ReadChecksumPolicy CHECKSUM_POLICY_NONE