ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
e57::FloatNodeImpl Class Reference

#include <FloatNodeImpl.h>

Inheritance diagram for e57::FloatNodeImpl:
Collaboration diagram for e57::FloatNodeImpl:

Public Member Functions

 FloatNodeImpl (ImageFileImplWeakPtr destImageFile, double value=0, FloatPrecision precision=E57_DOUBLE, double minimum=E57_DOUBLE_MIN, double maximum=E57_DOUBLE_MAX)
 
 ~FloatNodeImpl () override=default
 
NodeType type () const override
 
bool isTypeEquivalent (NodeImplSharedPtr ni) override
 
bool isDefined (const ustring &pathName) override
 
double value () const
 
FloatPrecision precision () const
 
double minimum () const
 
double maximum () const
 
void checkLeavesInSet (const StringSet &pathNames, NodeImplSharedPtr origin) override
 
void writeXml (ImageFileImplSharedPtr imf, CheckedFile &cf, int indent, const char *forcedFieldName=nullptr) override
 
void dump (int indent=0, std::ostream &os=std::cout) const override
 
- Public Member Functions inherited from e57::NodeImpl
void checkImageFileOpen (const char *srcFileName, int srcLineNumber, const char *srcFunctionName) const
 
bool isRoot () const
 
NodeImplSharedPtr parent ()
 
ustring pathName () const
 
ustring relativePathName (const NodeImplSharedPtr &origin, ustring childPathName=ustring()) const
 
ustring elementName () const
 
ImageFileImplSharedPtr destImageFile ()
 
ustring imageFileName () const
 
bool isAttached () const
 
virtual void setAttachedRecursive ()
 
void setParent (NodeImplSharedPtr parent, const ustring &elementName)
 
bool isTypeConstrained ()
 
virtual NodeImplSharedPtr get (const ustring &pathName)
 
virtual void set (const ustring &pathName, NodeImplSharedPtr ni, bool autoPathCreate=false)
 
virtual void set (const StringList &fields, unsigned level, NodeImplSharedPtr ni, bool autoPathCreate=false)
 
void checkBuffers (const std::vector< SourceDestBuffer > &sdbufs, bool allowMissing)
 
bool findTerminalPosition (const NodeImplSharedPtr &target, uint64_t &countFromLeft)
 
virtual ~NodeImpl ()=default
 

Additional Inherited Members

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

Detailed Description

Definition at line 33 of file FloatNodeImpl.h.

Constructor & Destructor Documentation

◆ FloatNodeImpl()

e57::FloatNodeImpl::FloatNodeImpl ( ImageFileImplWeakPtr  destImageFile,
double  value = 0,
FloatPrecision  precision = E57_DOUBLE,
double  minimum = E57_DOUBLE_MIN,
double  maximum = E57_DOUBLE_MAX 
)

Since this ctor also used to construct single precision, and defaults for minimum/maximum are for double precision, adjust bounds smaller if single.

Enforce the given bounds on raw value

Definition at line 33 of file FloatNodeImpl.cpp.

References e57::E57_ERROR_VALUE_OUT_OF_BOUNDS, E57_EXCEPTION2, e57::E57_SINGLE, maximum(), minimum(), e57::NodeImpl::pathName(), e57::toString(), and value().

◆ ~FloatNodeImpl()

e57::FloatNodeImpl::~FloatNodeImpl ( )
overridedefault

Member Function Documentation

◆ checkLeavesInSet()

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

We are a leaf node, so verify that we are listed in set (either relative or absolute form)

Implements e57::NodeImpl.

Definition at line 132 of file FloatNodeImpl.cpp.

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

◆ dump()

void e57::FloatNodeImpl::dump ( int  indent = 0,
std::ostream &  os = std::cout 
) const
overridevirtual

Save old stream config

Restore old stream config

Reimplemented from e57::NodeImpl.

Definition at line 212 of file FloatNodeImpl.cpp.

References e57::NodeImpl::dump(), e57::E57_SINGLE, QtCompat::endl(), precision(), e57::space(), and type().

◆ isDefined()

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

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

Implements e57::NodeImpl.

Definition at line 100 of file FloatNodeImpl.cpp.

References e57::NodeImpl::pathName().

◆ isTypeEquivalent()

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

Same node type?

Downcast to shared_ptr<FloatNodeImpl>

precision must match

minimum must match

maximum must match

ignore value_, doesn't have to match

Types match

Implements e57::NodeImpl.

Definition at line 63 of file FloatNodeImpl.cpp.

References e57::E57_FLOAT.

◆ maximum()

double e57::FloatNodeImpl::maximum ( ) const

Definition at line 126 of file FloatNodeImpl.cpp.

References e57::NodeImpl::checkImageFileOpen().

Referenced by FloatNodeImpl().

◆ minimum()

double e57::FloatNodeImpl::minimum ( ) const

Definition at line 120 of file FloatNodeImpl.cpp.

References e57::NodeImpl::checkImageFileOpen().

Referenced by FloatNodeImpl().

◆ precision()

FloatPrecision e57::FloatNodeImpl::precision ( ) const

Definition at line 114 of file FloatNodeImpl.cpp.

References e57::NodeImpl::checkImageFileOpen().

Referenced by dump().

◆ type()

NodeType e57::FloatNodeImpl::type ( ) const
inlineoverridevirtual

Implements e57::NodeImpl.

Definition at line 40 of file FloatNodeImpl.h.

References e57::E57_FLOAT.

Referenced by dump().

◆ value()

double e57::FloatNodeImpl::value ( ) const

Definition at line 108 of file FloatNodeImpl.cpp.

References e57::NodeImpl::checkImageFileOpen().

Referenced by FloatNodeImpl().

◆ writeXml()

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

Don't need to write if are default values

Write value as child text, unless it is the default value

Don't need to write precision="double", because that's the default

Don't need to write if are default values

Write value as child text, unless it is the default value

Implements e57::NodeImpl.

Definition at line 145 of file FloatNodeImpl.cpp.

References e57::E57_SINGLE, e57::NodeImpl::elementName_, and e57::space().


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