NDEVR
API Documentation
DesignObject

A low-level database object that can be used to access general stored properties within the NDEVR Model hierarchy or 3D environment. More...

Inheritance diagram for DesignObject:
[legend]
Collaboration diagram for DesignObject:
[legend]

Public Member Functions

 DesignObject ()=default
 Creates an "invalid" design object.
 DesignObject (const DesignInfo &info)
 Constructs a DesignObject from an existing DesignInfo, sharing the same base and indices.
 DesignObject (DesignObjectBase *base)
 Creates an new design object within the given DesignObjectBase.
 DesignObject (uint04 index, DesignObjectBase *base)
 Sets a DesignObject up to be a pointer to an existing object in the database.
JSONNode activeFilters () const
 Retrieves the active filters applied to this design object as a JSON structure.
void appendData (const StringView &data, bool compressed)
 Appends data to this design object's data storage.
DesignObjectBasebase () const
 Returns a reference to the underlying DesignObjectBase database.
void clearAllMetaData ()
 Removes all metadata entries from this design object.
void clearMetaData (const StringView &index)
 Removes a specific metadata entry by key.
void copyFrom (const DesignObject &object)
 Copies all properties from the given design object into this one.
uint04 designIndex () const
 Returns the design-specific index used to access type-specific properties (e.g., model, geometry, material properties).
bool doesPropertyBeginWith (NDPO property, const StringView &value, bool ignore_case) const
 Checks whether a string property's value begins with the given substring.
bool doesPropertyContain (NDPO property, const StringView &value, bool ignore_case) const
 Checks whether a string property's value contains the given substring.
File file () const
 Returns the file path associated with this design object as a File object.
template<auto t_property>
constexpr decltype(auto) get () const
 Retrieves a property value using a compile-time property constant, with the type deduced from PropertySpec.
template<auto t_property, class t_type>
constexpr decltype(auto) get () const
 Retrieves a property value using a compile-time property constant, cast to the requested type.
template<class t_type, class t_property_type>
constexpr decltype(auto) get (t_property_type property) const
 Retrieves a property value from the database, cast to the requested type.
DesignObject getDesignParent () const
 Retrieves the parent design object of this object in the model hierarchy.
StringView getIcon () const
 Retrieves the icon identifier string associated with this design object.
template<class t_type>
decltype(auto) getInheritedProperty (NDPO property) const
 Retrieves a property value, walking up the parent hierarchy if the property is not set on this object.
Scene getScene () const
 Retrieves the Scene that this design object belongs to.
bool hasMetaData (const StringView &index) const
 Checks whether a metadata entry exists for the given key.
template<class t_type, class t_design_type>
bool hasProperty (t_design_type property) const
 Checks whether a property has a valid (non-default) value.
uint04 index () const
 Returns the primary row index of this object within the DesignObjectBase property table.
template<auto t_property>
bool is (const char *value) const
 Checks whether a compile-time property matches the given C-string value.
template<auto t_property>
bool is (const String &value) const
 Checks whether a compile-time property matches the given String value.
template<auto t_property>
bool is (const StringView &value) const
 Checks whether a compile-time property matches the given StringView value.
template<auto t_property, class t_type>
std::enable_if<!ObjectInfo< t_type >::String, bool >::type is (const t_type &value) const
 Checks whether a compile-time property matches a non-string value using equality comparison.
template<class t_property_type>
bool is (t_property_type property, const char *value) const
 Checks whether a string property matches the given C-string value.
template<class t_property_type>
bool is (t_property_type property, const String &value) const
 Checks whether a string property matches the given String value.
template<class t_property_type>
bool is (t_property_type property, const StringView &value) const
 Checks whether a string property matches the given StringView value.
template<class t_property_type, class t_type>
std::enable_if<!ObjectInfo< t_type >::String, bool >::type is (t_property_type property, const t_type &value) const
 Checks whether a non-string property matches the given value using equality comparison.
bool isDesignType (DesignObjectType mode) const
 Checks whether this object has the specified design type flag set.
bool isDesignType (uint04 mode) const
 Checks whether this object has the specified design type flag set, using a raw integer value.
bool isValid () const
 Checks whether this design object has a valid index into the database.
const JSONNodemetaData () const
 Retrieves the entire metadata tree for this design object.
const JSONNodemetaData (const StringView &index) const
 Retrieves a specific metadata entry by key.
void offsetDesign (const Vector< 3, fltp08 > &offset)
 Translates this design object by the given offset vector.
 operator bool () const
 Bool conversion operator.
bool operator!= (const DesignObject &object) const
 Checks inequality with another DesignObject.
bool operator< (const DesignObject &object) const
 Less-than comparison for ordering DesignObjects (e.g., for sorted containers).
bool operator== (const DesignObject &object) const
 Checks equality with another DesignObject by comparing base pointers and indices.
bool operator> (const DesignObject &object) const
 Greater-than comparison for ordering DesignObjects (e.g., for sorted containers).
Table & propertyTable ()
 Returns a mutable reference to the property table that stores this object's properties.
const Table & propertyTable () const
 Returns a const reference to the property table that stores this object's properties.
void removeMetaData (const StringView &index, const void *lock_ptr=nullptr)
 Removes a metadata entry by key, with optional write lock support.
void scale (Vector< 3, fltp08 > scale, Vertex< 3, fltp08 > center_of_scale, const Matrix< fltp08 > &transform)
 Scales this design object's geometry by the given scale factors around a center point, applying an additional transform.
void scale (Vector< 3, fltp08 > scale, Vertex< 3, fltp08 > center_of_scale=Constant< Vertex< 3, fltp08 > >::Invalid)
 Scales this design object's geometry and transform by the given scale factors around a center point.
template<auto t_property, class t_type>
void set (const t_type &value)
 Sets a property value in the database using a compile-time property constant.
template<class t_type, class t_property_type>
void set (t_property_type property, const t_type &value)
 Sets a property value in the database.
void setActiveFilters (const JSONNode &node)
 Sets the active filters on this design object from a JSON structure.
void setDesignType (DesignObjectType mode, bool is_type)
 Sets or clears a design type flag on this object.
void setMetaData (const JSONNode &node)
 Replaces the entire metadata tree with the given JSON node.
void setMetaData (const StringView &index, const bool &data)
 Sets a metadata entry at the given key to a boolean value.
void setMetaData (const StringView &index, const fltp08 &data)
 Sets a metadata entry at the given key to a 64-bit floating point value.
void setMetaData (const StringView &index, const JSONNode &node)
 Sets a metadata entry at the given key to the specified JSON node value.
void setMetaData (const StringView &index, const String &data)
 Sets a metadata entry at the given key to a String value.
void setMetaData (const StringView &index, const StringView &data)
 Sets a metadata entry at the given key to a StringView value.
void setMetaData (const StringView &index, const uint01 &data)
 Sets a metadata entry at the given key to a uint01 value.
void setMetaData (const StringView &index, const uint04 &data)
 Sets a metadata entry at the given key to a uint04 value.
template<auto t_property, class t_type>
bool update (const t_type &value, const void *lock=nullptr)
 Updates a property using a compile-time property constant, only if the new value differs.
template<class t_type, class t_property_type>
bool update (t_property_type property, const t_type &value, const void *lock=nullptr)
 Updates a property only if the new value differs from the current value.
void updateCreatedTime ()
 Sets the creation time stamp for this design object to the current system time.
void updateDesignModifiedTime (Time time=Time::SystemTime())
 Updates the modified time stamp for this design object.
void updateDesignTransform (const Matrix< fltp08 > &transform, const void *lock=nullptr)
 Updates the transform of this design object if it differs from the current value.
bool updateDesignVisible (bool is_visible, const void *lock=nullptr)
 Updates the spatial visibility of this design object if it differs from the current value.
void updateMetaData (const StringView &index, const bool &data, const void *lock_ptr=nullptr)
 Updates a metadata entry only if the new value differs from the current value.
void updateMetaData (const StringView &index, const fltp08 &data, const void *lock_ptr=nullptr)
 Updates a metadata entry only if the new value differs from the current value.
void updateMetaData (const StringView &index, const String &data, const void *lock_ptr=nullptr)
 Updates a metadata entry only if the new value differs from the current value.
void updateMetaData (const StringView &index, const StringView &data, const void *lock_ptr=nullptr)
 Updates a metadata entry only if the new value differs from the current value.
bool validateDesignObject () const
 Validates the internal state of this design object, ensuring indices and base pointer are consistent.

Static Public Member Functions

static constexpr StringView FilePathDesignNameVariable ()
 Returns the placeholder variable string used in file paths to represent the design name.

Protected Member Functions

template<class t_type>
void _setProperty (NDPO property, const t_type &value)
 Low-level property setter that directly writes to the design properties table without triggering side effects such as transform or visibility updates.
void initDesignObject ()
 Initializes default property values for this design object after construction.
Protected Member Functions inherited from DesignInfo
 DesignInfo (DesignObjectBase *base)
 Creates an new design object within the given DesignObjectBase.
 DesignInfo (uint04 index, DesignObjectBase *base)
 Sets a DesignObject up to be a pointer to an existing object in the database.
void _setDesignVisible (bool is_visible)
 Sets the spatial visibility of this design object and propagates the change through the design hierarchy.
void _setTransform (const Matrix< fltp08 > &transform)
 Sets the 4x4 transform matrix for this design object and propagates the change through the design hierarchy.

Additional Inherited Members

Public Types inherited from DesignInfo
enum  DesignObjectType : uint01
Protected Attributes inherited from DesignInfo
DesignObjectBasem_base = nullptr
 Pointer to the owning DesignObjectBase property database.
uint04 m_design_index = Constant<uint04>::Invalid
 Index of the parent design that owns this object.
uint04 m_index = Constant<uint04>::Invalid
 Row index of this object within the property database.

Detailed Description

A low-level database object that can be used to access general stored properties within the NDEVR Model hierarchy or 3D environment.


Can represent a geometry, model, material, bone, or effect. The object itself can be thought of as pointer to an entity in the database, and in general its destruction, will have no impact on the database itself.

This object stores a pointer to a DesignObjectBase object which is the database containing all properties which are retrieved via an index (for general properties) or a design index, for properties specific to models, geometries, etc

Warning
Access to these members and data should be made in a thread-safe manner using DesignObjectLookup read and write locks. Author: Tyler Parke

Date: 2018-03-22

See also
Model, Geometry, Material, Effect, DesignObjectLookup

Definition at line 73 of file DesignObject.h.

Constructor & Destructor Documentation

◆ DesignObject() [1/4]

DesignObject::DesignObject ( )
default

Creates an "invalid" design object.


This object does not have a backing database, and all indices will be Invalid. Checking properties on this object is not permitted but you may use the '=' to set this model to a different model.

Author: Tyler Parke

Date: 2018-03-22

Referenced by Effect::Effect(), Geometry::Geometry(), Material::Material(), Effect::addTarget(), Effect::addTarget(), copyFrom(), getDesignParent(), getInheritedProperty(), Effect::getTarget(), operator!=(), operator<(), operator==(), operator>(), and Effect::setTarget().

◆ DesignObject() [2/4]

DesignObject::DesignObject ( DesignObjectBase * base)
explicit

Creates an new design object within the given DesignObjectBase.


This object is appended to the end of the DesignObjectBase data structure and values are setup to defaults.

Author: Tyler Parke

Date: 2018-03-22

References base().

◆ DesignObject() [3/4]

DesignObject::DesignObject ( uint04 index,
DesignObjectBase * base )

Sets a DesignObject up to be a pointer to an existing object in the database.


If the index is invalid behavior is undefined.

Author: Tyler Parke

Date: 2018-03-22

References base(), and index().

◆ DesignObject() [4/4]

DesignObject::DesignObject ( const DesignInfo & info)

Constructs a DesignObject from an existing DesignInfo, sharing the same base and indices.


Parameters
[in]infoThe DesignInfo to copy base pointer and index information from.

Member Function Documentation

◆ _setProperty()

template<class t_type>
void DesignObject::_setProperty ( NDPO property,
const t_type & value )
inlineprotected

Low-level property setter that directly writes to the design properties table without triggering side effects such as transform or visibility updates.


Template Parameters
t_typeThe type of the value to set.
Parameters
[in]propertyThe NDPO property to set.
[in]valueThe value to assign.

Definition at line 730 of file DesignObject.h.

References DesignInfo::m_base, and DesignInfo::m_index.

◆ activeFilters()

JSONNode DesignObject::activeFilters ( ) const

Retrieves the active filters applied to this design object as a JSON structure.


Returns
A JSONNode containing the currently active filter configuration.

◆ appendData()

void DesignObject::appendData ( const StringView & data,
bool compressed )

Appends data to this design object's data storage.


Parameters
[in]dataThe data string to append.
[in]compressedWhether the data should be stored in compressed form.

◆ base()

DesignObjectBase & DesignObject::base ( ) const
inlinenodiscard

Returns a reference to the underlying DesignObjectBase database.


Returns
A reference to the DesignObjectBase that stores this object's data.

Definition at line 682 of file DesignObject.h.

References DesignInfo::m_base.

Referenced by DesignObject(), DesignObject(), Geometry::Geometry(), Geometry::Geometry(), Model::Model(), Model::Model(), Scene::Scene(), Scene::Scene(), Scene::Scene(), Scene::Scene(), Scene::Scene(), and Model::setChildApplicationConstructed().

◆ clearAllMetaData()

void DesignObject::clearAllMetaData ( )

Removes all metadata entries from this design object.


Referenced by DesignObjectResourceCache::setModelToDefaults().

◆ clearMetaData()

void DesignObject::clearMetaData ( const StringView & index)

Removes a specific metadata entry by key.


Parameters
[in]indexThe metadata key to remove.

References index().

◆ copyFrom()

void DesignObject::copyFrom ( const DesignObject & object)

Copies all properties from the given design object into this one.


Parameters
[in]objectThe source DesignObject to copy properties from.

References DesignObject().

◆ designIndex()

uint04 DesignObject::designIndex ( ) const
inline

Returns the design-specific index used to access type-specific properties (e.g., model, geometry, material properties).


Returns
The design-specific row index.

Definition at line 631 of file DesignObject.h.

References DesignInfo::m_design_index.

◆ doesPropertyBeginWith()

bool DesignObject::doesPropertyBeginWith ( NDPO property,
const StringView & value,
bool ignore_case ) const
inlinenodiscard

Checks whether a string property's value begins with the given substring.


Parameters
[in]propertyThe NDPO property to check.
[in]valueThe prefix substring to search for.
[in]ignore_caseWhether to perform a case-insensitive comparison.
Returns
True if the property value begins with the given substring.

Definition at line 388 of file DesignObject.h.

References index(), and DesignInfo::m_base.

◆ doesPropertyContain()

bool DesignObject::doesPropertyContain ( NDPO property,
const StringView & value,
bool ignore_case ) const
inlinenodiscard

Checks whether a string property's value contains the given substring.


Parameters
[in]propertyThe NDPO property to check.
[in]valueThe substring to search for.
[in]ignore_caseWhether to perform a case-insensitive comparison.
Returns
True if the property value contains the given substring.

Definition at line 400 of file DesignObject.h.

References index(), and DesignInfo::m_base.

◆ file()

File DesignObject::file ( ) const
inlinenodiscard

Returns the file path associated with this design object as a File object.


Returns
A File constructed from the object's file property.

Definition at line 432 of file DesignObject.h.

References file, and get().

Referenced by Scene::Scene(), Scene::Scene(), MadgwickSimulator::readFile(), BuildActionDefinition::readFromLogFile(), GPSSensor::requestUseFile(), and MadgwickSimulator::saveStats().

◆ FilePathDesignNameVariable()

constexpr StringView DesignObject::FilePathDesignNameVariable ( )
inlinestaticnodiscardconstexpr

Returns the placeholder variable string used in file paths to represent the design name.


Returns
A StringView containing "[DESIGN_NAME]".

Definition at line 715 of file DesignObject.h.

◆ get() [1/3]

template<auto t_property>
decltype(auto) DesignObject::get ( ) const
inlinenodiscardconstexpr

Retrieves a property value using a compile-time property constant, with the type deduced from PropertySpec.


Template Parameters
t_propertyThe compile-time property constant whose type is deduced via PropertySpec.
Returns
The property value in its default type as defined by PropertySpec.

Definition at line 186 of file DesignObject.h.

◆ get() [2/3]

template<auto t_property, class t_type>
decltype(auto) DesignObject::get ( ) const
inlinenodiscardconstexpr

Retrieves a property value using a compile-time property constant, cast to the requested type.


Template Parameters
t_propertyThe compile-time property constant.
t_typeThe type to retrieve the property as.
Returns
The property value cast to t_type.

Definition at line 173 of file DesignObject.h.

Referenced by Customer::firstName(), SpeedLimit::getSpeedLimit(), StreetName::getStreet(), SurfaceType::getSurface(), SurfaceCondition::getSurfaceCondition(), CustomerJob::isActive(), Password::password(), and Customer::surname().

◆ get() [3/3]

◆ getDesignParent()

DesignObject DesignObject::getDesignParent ( ) const
nodiscard

Retrieves the parent design object of this object in the model hierarchy.


Returns
The parent DesignObject, or an invalid DesignObject if this object has no parent.

References DesignObject().

Referenced by getInheritedProperty().

◆ getIcon()

StringView DesignObject::getIcon ( ) const
nodiscard

Retrieves the icon identifier string associated with this design object.


Returns
A StringView of the icon name or path.

Referenced by BuildActionProgramLogic::createButton().

◆ getInheritedProperty()

template<class t_type>
decltype(auto) DesignObject::getInheritedProperty ( NDPO property) const
inlinenodiscard

Retrieves a property value, walking up the parent hierarchy if the property is not set on this object.


If no ancestor has the property set, returns the (invalid) value from this object.

Template Parameters
t_typeThe type to retrieve the property as.
Parameters
[in]propertyThe NDPO property to retrieve.
Returns
The property value from this object or the nearest ancestor that has it set.

Definition at line 413 of file DesignObject.h.

References DesignObject(), get(), getDesignParent(), hasProperty(), and isValid().

◆ getScene()

Scene DesignObject::getScene ( ) const
nodiscard

Retrieves the Scene that this design object belongs to.


Returns
The Scene containing this design object.

Referenced by SetLayerCommand::execute().

◆ hasMetaData()

bool DesignObject::hasMetaData ( const StringView & index) const

Checks whether a metadata entry exists for the given key.


Parameters
[in]indexThe metadata key to look up.
Returns
True if metadata with the given key exists.

References index().

Referenced by Customer::company(), Customer::email(), DesignObjectComboWidget::onObjectUpdatedSlot(), and DesignObjectToggleWidget::onObjectUpdatedSlot().

◆ hasProperty()

template<class t_type, class t_design_type>
bool DesignObject::hasProperty ( t_design_type property) const
inlinenodiscard

Checks whether a property has a valid (non-default) value.


Template Parameters
t_typeThe type to retrieve the property as for validation.
t_design_typeThe property enum type.
Parameters
[in]propertyThe property identifier to check.
Returns
True if the property value is valid (not equal to the invalid sentinel).

Definition at line 271 of file DesignObject.h.

References get(), and IsValid().

Referenced by getInheritedProperty().

◆ index()

uint04 DesignObject::index ( ) const
inline

Returns the primary row index of this object within the DesignObjectBase property table.


Returns
The row index used to access general design properties.

Definition at line 624 of file DesignObject.h.

References DesignInfo::m_index.

Referenced by DesignObject(), Effect::Effect(), Geometry::Geometry(), Material::Material(), Model::Model(), RealSenseScannerConnection::RealSenseScannerConnection(), Effect::addTarget(), OptechScannerPositionSensor::calculateAndRemoveSegment(), clearMetaData(), Model::copyMaterialProperties(), doesPropertyBeginWith(), doesPropertyContain(), Geometry::faceCenter(), Geometry::faceEdges(), Model::getEffect(), Model::getFamilyMember(), Geometry::getParent(), Geometry::getParents(), Model::getSceneGeometry(), Model::getSceneMaterial(), Material::hasActiveUVImage(), Model::hasEffect(), hasMetaData(), Material::hasUVColor(), Material::hasUVIntensity(), Material::hasUVLayer(), metaData(), Effect::operator!=(), Effect::operator==(), Geometry::OptimizedGetPrimitiveVec(), Geometry::OptimizedSetPrimitive(), Geometry::OptimizedSetPrimitiveVec(), Geometry::polygons(), Geometry::polylines(), Geometry::primitive(), Geometry::primitive(), Geometry::primitive(), LocationOperations::prismLocation(), PositionSensor::removeDeploymentSegment(), removeMetaData(), Effect::removeTarget(), Model::restoreModel(), LocationOperations::setActivePrismIndex(), setMetaData(), setMetaData(), setMetaData(), setMetaData(), setMetaData(), setMetaData(), setMetaData(), Geometry::setPrimitive(), Geometry::setPrimitive(), Geometry::setPrimitive(), Geometry::setPrimitive(), Geometry::setPrimitiveVec(), LocationOperations::setPrismLocation(), Effect::setTarget(), Geometry::setVertex(), Geometry::setVertex(), Geometry::setVertexProperty(), Geometry::setVertexProperty(), Geometry::setVertexProperty(), Geometry::setVertexProperty(), updateMetaData(), updateMetaData(), updateMetaData(), updateMetaData(), Geometry::updateVertexColumn(), Geometry::updateVertexColumn(), Geometry::updateVertexColumn(), Geometry::updateVertexColumns(), and Geometry::vertex().

◆ initDesignObject()

void DesignObject::initDesignObject ( )
protected

Initializes default property values for this design object after construction.


◆ is() [1/8]

template<auto t_property>
bool DesignObject::is ( const char * value) const
inlinenodiscard

Checks whether a compile-time property matches the given C-string value.


Template Parameters
t_propertyThe compile-time property constant.
Parameters
[in]valueThe C-string value to compare against.
Returns
True if the property value matches the given value.

Definition at line 349 of file DesignObject.h.

References PropertyInterface< t_property_enum >::IsSame().

◆ is() [2/8]

template<auto t_property>
bool DesignObject::is ( const String & value) const
inlinenodiscard

Checks whether a compile-time property matches the given String value.


Template Parameters
t_propertyThe compile-time property constant.
Parameters
[in]valueThe String value to compare against.
Returns
True if the property value matches the given value.

Definition at line 362 of file DesignObject.h.

References PropertyInterface< t_property_enum >::IsSame().

◆ is() [3/8]

template<auto t_property>
bool DesignObject::is ( const StringView & value) const
inlinenodiscard

Checks whether a compile-time property matches the given StringView value.


Template Parameters
t_propertyThe compile-time property constant.
Parameters
[in]valueThe StringView value to compare against.
Returns
True if the property value matches the given value.

Definition at line 336 of file DesignObject.h.

References PropertyInterface< t_property_enum >::IsSame().

◆ is() [4/8]

template<auto t_property, class t_type>
std::enable_if<!ObjectInfo< t_type >::String, bool >::type DesignObject::is ( const t_type & value) const
inlinenodiscard

Checks whether a compile-time property matches a non-string value using equality comparison.


Template Parameters
t_propertyThe compile-time property constant.
t_typeThe value type (must not be a string type).
Parameters
[in]valueThe value to compare against.
Returns
True if the property value equals the given value.

Definition at line 376 of file DesignObject.h.

References get().

◆ is() [5/8]

template<class t_property_type>
bool DesignObject::is ( t_property_type property,
const char * value ) const
inlinenodiscard

Checks whether a string property matches the given C-string value.


Template Parameters
t_property_typeThe property enum type.
Parameters
[in]propertyThe property identifier to compare.
[in]valueThe C-string value to compare against.
Returns
True if the property value matches the given value.

Definition at line 297 of file DesignObject.h.

References PropertyInterface< t_property_enum >::IsSame().

◆ is() [6/8]

template<class t_property_type>
bool DesignObject::is ( t_property_type property,
const String & value ) const
inlinenodiscard

Checks whether a string property matches the given String value.


Template Parameters
t_property_typeThe property enum type.
Parameters
[in]propertyThe property identifier to compare.
[in]valueThe String value to compare against.
Returns
True if the property value matches the given value.

Definition at line 310 of file DesignObject.h.

References PropertyInterface< t_property_enum >::IsSame().

◆ is() [7/8]

template<class t_property_type>
bool DesignObject::is ( t_property_type property,
const StringView & value ) const
inlinenodiscard

Checks whether a string property matches the given StringView value.


Template Parameters
t_property_typeThe property enum type.
Parameters
[in]propertyThe property identifier to compare.
[in]valueThe StringView value to compare against.
Returns
True if the property value matches the given value.

Definition at line 284 of file DesignObject.h.

References PropertyInterface< t_property_enum >::IsSame().

Referenced by SpeedLimit::SpeedLimit(), StreetInfo::StreetInfo(), StreetName::StreetName(), SurfaceCondition::SurfaceCondition(), SurfaceType::SurfaceType(), FactoryModelFilters::FilterTypeModels(), FactoryModelFilters::FilterTypeModels(), FactoryModelFilters::FilterTypeModels(), ModelTileTable::init(), Model::isType(), BuildActionProgramLogic::setupModel(), update(), and update().

◆ is() [8/8]

template<class t_property_type, class t_type>
std::enable_if<!ObjectInfo< t_type >::String, bool >::type DesignObject::is ( t_property_type property,
const t_type & value ) const
inlinenodiscard

Checks whether a non-string property matches the given value using equality comparison.


Template Parameters
t_property_typeThe property enum type.
t_typeThe value type (must not be a string type).
Parameters
[in]propertyThe property identifier to compare.
[in]valueThe value to compare against.
Returns
True if the property value equals the given value.

Definition at line 324 of file DesignObject.h.

References get().

◆ isDesignType() [1/2]

bool DesignObject::isDesignType ( DesignObjectType mode) const

Checks whether this object has the specified design type flag set.


Parameters
[in]modeThe DesignObjectType to check.
Returns
True if this object has the specified type flag set.

◆ isDesignType() [2/2]

bool DesignObject::isDesignType ( uint04 mode) const

Checks whether this object has the specified design type flag set, using a raw integer value.


Parameters
[in]modeThe design type flag as a raw integer.
Returns
True if this object has the specified type flag set.

◆ isValid()

◆ metaData() [1/2]

const JSONNode & DesignObject::metaData ( ) const
nodiscard

Retrieves the entire metadata tree for this design object.


Returns
A const reference to the root JSONNode of all metadata.

Referenced by Customer::company(), Customer::email(), CustomerDevice::osName(), and CustomerDevice::serialNumber().

◆ metaData() [2/2]

const JSONNode & DesignObject::metaData ( const StringView & index) const
nodiscard

Retrieves a specific metadata entry by key.


Parameters
[in]indexThe metadata key to look up.
Returns
A const reference to the JSONNode for the given key.

References index().

◆ offsetDesign()

void DesignObject::offsetDesign ( const Vector< 3, fltp08 > & offset)

Translates this design object by the given offset vector.


Parameters
[in]offsetThe 3D offset vector to apply.

◆ operator bool()

DesignObject::operator bool ( ) const
inline

Bool conversion operator.


Returns true if this design object is valid.

Definition at line 676 of file DesignObject.h.

References isValid().

◆ operator!=()

bool DesignObject::operator!= ( const DesignObject & object) const

Checks inequality with another DesignObject.


Parameters
[in]objectThe DesignObject to compare against.
Returns
True if the objects do not refer to the same entity.

References DesignObject().

◆ operator<()

bool DesignObject::operator< ( const DesignObject & object) const

Less-than comparison for ordering DesignObjects (e.g., for sorted containers).


Parameters
[in]objectThe DesignObject to compare against.
Returns
True if this object is ordered before the given object.

References DesignObject().

◆ operator==()

bool DesignObject::operator== ( const DesignObject & object) const

Checks equality with another DesignObject by comparing base pointers and indices.


Parameters
[in]objectThe DesignObject to compare against.
Returns
True if both objects refer to the same entity in the same database.

References DesignObject().

◆ operator>()

bool DesignObject::operator> ( const DesignObject & object) const

Greater-than comparison for ordering DesignObjects (e.g., for sorted containers).


Parameters
[in]objectThe DesignObject to compare against.
Returns
True if this object is ordered after the given object.

References DesignObject().

◆ propertyTable() [1/2]

Table & DesignObject::propertyTable ( )
nodiscard

Returns a mutable reference to the property table that stores this object's properties.


Returns
A mutable reference to the Table.

◆ propertyTable() [2/2]

const Table & DesignObject::propertyTable ( ) const
nodiscard

Returns a const reference to the property table that stores this object's properties.


Returns
A const reference to the Table.

◆ removeMetaData()

void DesignObject::removeMetaData ( const StringView & index,
const void * lock_ptr = nullptr )

Removes a metadata entry by key, with optional write lock support.


Parameters
[in]indexThe metadata key to remove.
[in]lock_ptrOptional write lock pointer for thread safety.

References index().

◆ scale() [1/2]

void DesignObject::scale ( Vector< 3, fltp08 > scale,
Vertex< 3, fltp08 > center_of_scale,
const Matrix< fltp08 > & transform )

Scales this design object's geometry by the given scale factors around a center point, applying an additional transform.


Parameters
[in]scaleThe scale factors along each axis.
[in]center_of_scaleThe center point for scaling.
[in]transformAn additional transformation matrix to apply during scaling.

References scale().

◆ scale() [2/2]

void DesignObject::scale ( Vector< 3, fltp08 > scale,
Vertex< 3, fltp08 > center_of_scale = ConstantVertex< 3, fltp08 > >::Invalid )

Scales this design object's geometry and transform by the given scale factors around a center point.


Parameters
[in]scaleThe scale factors along each axis.
[in]center_of_scaleThe center point for scaling. Defaults to Invalid (uses object's own center).

References scale().

Referenced by Model::calculateSmoothTextures(), scale(), and scale().

◆ set() [1/2]

template<auto t_property, class t_type>
void DesignObject::set ( const t_type & value)
inline

Sets a property value in the database using a compile-time property constant.


Template Parameters
t_propertyThe compile-time property constant.
t_typeThe type of the value to set.
Parameters
[in]valueThe value to assign to the property.

Definition at line 212 of file DesignObject.h.

◆ set() [2/2]

template<class t_type, class t_property_type>
void DesignObject::set ( t_property_type property,
const t_type & value )
inline

◆ setActiveFilters()

void DesignObject::setActiveFilters ( const JSONNode & node)

Sets the active filters on this design object from a JSON structure.


Parameters
[in]nodeThe JSONNode containing the filter configuration to apply.

◆ setDesignType()

void DesignObject::setDesignType ( DesignObjectType mode,
bool is_type )

Sets or clears a design type flag on this object.


Parameters
[in]modeThe DesignObjectType flag to set or clear.
[in]is_typeWhether to set (true) or clear (false) the given type flag.

◆ setMetaData() [1/8]

void DesignObject::setMetaData ( const JSONNode & node)

Replaces the entire metadata tree with the given JSON node.


Parameters
[in]nodeThe JSONNode to set as the object's metadata.

Referenced by Customer::setCompany(), Customer::setEmail(), CustomerDevice::setOSName(), and CustomerDevice::setSerialNumber().

◆ setMetaData() [2/8]

void DesignObject::setMetaData ( const StringView & index,
const bool & data )

Sets a metadata entry at the given key to a boolean value.


Parameters
[in]indexThe metadata key.
[in]dataThe boolean value to store.

References index().

◆ setMetaData() [3/8]

void DesignObject::setMetaData ( const StringView & index,
const fltp08 & data )

Sets a metadata entry at the given key to a 64-bit floating point value.


Parameters
[in]indexThe metadata key.
[in]dataThe fltp08 value to store.

References index().

◆ setMetaData() [4/8]

void DesignObject::setMetaData ( const StringView & index,
const JSONNode & node )

Sets a metadata entry at the given key to the specified JSON node value.


Parameters
[in]indexThe metadata key.
[in]nodeThe JSONNode value to store.

References index().

◆ setMetaData() [5/8]

void DesignObject::setMetaData ( const StringView & index,
const String & data )

Sets a metadata entry at the given key to a String value.


Parameters
[in]indexThe metadata key.
[in]dataThe String value to store.

References index().

◆ setMetaData() [6/8]

void DesignObject::setMetaData ( const StringView & index,
const StringView & data )

Sets a metadata entry at the given key to a StringView value.


Parameters
[in]indexThe metadata key.
[in]dataThe StringView value to store.

References index().

◆ setMetaData() [7/8]

void DesignObject::setMetaData ( const StringView & index,
const uint01 & data )

Sets a metadata entry at the given key to a uint01 value.


Parameters
[in]indexThe metadata key.
[in]dataThe uint01 value to store.

References index().

◆ setMetaData() [8/8]

void DesignObject::setMetaData ( const StringView & index,
const uint04 & data )

Sets a metadata entry at the given key to a uint04 value.


Parameters
[in]indexThe metadata key.
[in]dataThe uint04 value to store.

References index().

◆ update() [1/2]

template<auto t_property, class t_type>
bool DesignObject::update ( const t_type & value,
const void * lock = nullptr )
inline

Updates a property using a compile-time property constant, only if the new value differs.


If the value changes, the design modified time is also updated.

Template Parameters
t_propertyThe compile-time property constant.
t_typeThe type of the value to update.
Parameters
[in]valueThe new value to assign if it differs.
[in]lockOptional write lock pointer for thread safety.
Returns
True if the value was changed, false if it was already equal.

Definition at line 251 of file DesignObject.h.

References is(), set(), and updateDesignModifiedTime().

◆ update() [2/2]

template<class t_type, class t_property_type>
bool DesignObject::update ( t_property_type property,
const t_type & value,
const void * lock = nullptr )
inline

Updates a property only if the new value differs from the current value.


If the value changes, the design modified time is also updated.

Template Parameters
t_typeThe type of the value to update.
t_property_typeThe property enum type (e.g., NDPO).
Parameters
[in]propertyThe property identifier to update.
[in]valueThe new value to assign if it differs.
[in]lockOptional write lock pointer for thread safety.
Returns
True if the value was changed, false if it was already equal.

Definition at line 229 of file DesignObject.h.

References is(), set(), and updateDesignModifiedTime().

Referenced by VisibleCommand::execute(), CustomerJob::setActive(), Customer::updateFirstName(), and Customer::updateSurname().

◆ updateCreatedTime()

void DesignObject::updateCreatedTime ( )

Sets the creation time stamp for this design object to the current system time.


◆ updateDesignModifiedTime()

void DesignObject::updateDesignModifiedTime ( Time time = Time::SystemTime())

Updates the modified time stamp for this design object.


Should be called after changing any property to notify the application of the modification.

Parameters
[in]timeThe time to set as the modified time. Defaults to the current system time.

References Time::SystemTime().

Referenced by update(), and update().

◆ updateDesignTransform()

void DesignObject::updateDesignTransform ( const Matrix< fltp08 > & transform,
const void * lock = nullptr )

Updates the transform of this design object if it differs from the current value.


Parameters
[in]transformThe new 4x4 transformation matrix to apply.
[in]lockOptional write lock pointer for thread safety.

◆ updateDesignVisible()

bool DesignObject::updateDesignVisible ( bool is_visible,
const void * lock = nullptr )

Updates the spatial visibility of this design object if it differs from the current value.


Parameters
[in]is_visibleWhether the object should be spatially visible.
[in]lockOptional write lock pointer for thread safety.
Returns
True if the visibility was changed, false if it was already equal.

◆ updateMetaData() [1/4]

void DesignObject::updateMetaData ( const StringView & index,
const bool & data,
const void * lock_ptr = nullptr )

Updates a metadata entry only if the new value differs from the current value.


Parameters
[in]indexThe metadata key.
[in]dataThe new boolean value.
[in]lock_ptrOptional write lock pointer for thread safety.

References index().

◆ updateMetaData() [2/4]

void DesignObject::updateMetaData ( const StringView & index,
const fltp08 & data,
const void * lock_ptr = nullptr )

Updates a metadata entry only if the new value differs from the current value.


Parameters
[in]indexThe metadata key.
[in]dataThe new fltp08 value.
[in]lock_ptrOptional write lock pointer for thread safety.

References index().

◆ updateMetaData() [3/4]

void DesignObject::updateMetaData ( const StringView & index,
const String & data,
const void * lock_ptr = nullptr )

Updates a metadata entry only if the new value differs from the current value.


Parameters
[in]indexThe metadata key.
[in]dataThe new String value.
[in]lock_ptrOptional write lock pointer for thread safety.

References index().

◆ updateMetaData() [4/4]

void DesignObject::updateMetaData ( const StringView & index,
const StringView & data,
const void * lock_ptr = nullptr )

Updates a metadata entry only if the new value differs from the current value.


Parameters
[in]indexThe metadata key.
[in]dataThe new StringView value.
[in]lock_ptrOptional write lock pointer for thread safety.

References index().

◆ validateDesignObject()

bool DesignObject::validateDesignObject ( ) const

Validates the internal state of this design object, ensuring indices and base pointer are consistent.


Returns
True if the design object is in a valid state.

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