3#include <NDEVR/DesignObjectBase.h>
12 class NDEVR_DESIGN_API DesignInfo
15 template<
class t_property_enum>
16 friend class PropertyInterface;
17 template<
class t_property_enum>
18 friend class PropertyColumnInterface;
83 template<
class t_property_enum>
111 template<auto t_property>
123 template<
class t_property_enum>
156 template<
class t_value_type>
157 static void Set(
DesignInfo*
object, t_property_enum property,
const t_value_type& value)
169 template<t_property_enum t_property,
class t_value_type>
172 column(
object, t_property)->
set(
index(
object, t_property), value);
182 template<
class t_value_type>
183 static decltype(
auto)
Get(
const DesignInfo*
object, t_property_enum property)
185 return column(
object, property)->template get<t_value_type>(
index(
object, property));
195 template<t_property_enum t_property,
class t_value_type>
198 return column(
object, t_property)->template get<t_value_type>(
index(
object, t_property));
207 template<t_property_enum t_property>
210 return column(
object, t_property)->template get<typename PropertySpec<t_property>::type>(
index(
object, t_property));
221 template<
class t_value_type>
335 template<
class t_value_type>
338 return column(
object, property)->
get<t_value_type>(
object->m_index);
348 template<NDPO t_property,
class t_value_type>
351 return column(
object, t_property)->
get<t_value_type>(
object->m_index);
364 template<
class t_value_type>
370 object->m_base->design_properties[eint01(property)]->set(object->
m_index, value);
373 object->m_base->design_properties[eint01(property)]->set(object->
m_index, value);
377 object->m_base->design_properties[eint01(property)]->set(object->
m_index, value);
381 object->m_base->design_properties[eint01(property)]->set(object->
m_index, value);
396 template<NDPO t_property>
399 static_assert(t_property !=
NDPO::is_deleted,
"cannot directly delete design object");
402 object->m_base->design_type[
object->m_index] = value;
406 object->m_base->guid[
object->m_index] = value;
410 object->m_base->modified_time[
object->m_index] =
rcast<uint08>(value);
414 object->m_base->desc_modified_time[
object->m_index] =
rcast<uint08>(value);
418 object->m_base->asc_modified_time[
object->m_index] =
rcast<uint08>(value);
422 object->m_base->name[
object->m_index] = value;
426 object->_setTransform(value);
427 lib_assert(
IsValid(value),
"Tried to set Invalid transform");
428 lib_assert(
IsValid(value.invert()),
"Tried to set to non-invertable transform");
436 object->_setDesignVisible(value);
440 object->m_base->tree_visible[
object->m_index] = value;
444 object->m_base->is_deleted[
object->m_index] = value;
448 object->m_base->design_properties[eint01(t_property)]->set(object->
m_index, value);
460 return object->m_base->design_properties[eint01(property)];
485 template<NDPO t_property>
559 return &
object->m_base->name;
569 return object->m_base->design_properties[eint01(
NDPO::author)];
571 lib_assert(
false,
"Bad value");
583 return object->m_index;
A specification of upper and lower bounds in N-dimensions.
Base information class for all design objects in the NDEVR property database.
uint04 m_index
Row index of this object within the property database.
DesignInfo(DesignObjectBase *base)
Creates an new design object within the given DesignObjectBase.
uint04 m_design_index
Index of the parent design that owns this object.
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 hierar...
void _setTransform(const Matrix< fltp08 > &transform)
Sets the 4x4 transform matrix for this design object and propagates the change through the design hie...
DesignObjectBase * m_base
Pointer to the owning DesignObjectBase property database.
Provides the underlying data storage for the NDEVR Scene Model hierarchy.
ColumnT< Time > asc_modified_time
Column storing the ascending-order modification timestamp.
ColumnT< String > name
Column storing the display name for each design object.
ColumnT< uint01 > design_type
Column storing the design object type identifier.
ColumnT< Time > desc_modified_time
Column storing the descending-order modification timestamp.
ColumnT< UUID > guid
Column storing the globally unique identifier for each design object.
ColumnT< Time > modified_time
Column storing the last modification timestamp.
ColumnT< bool > is_deleted
Column indicating whether the object has been soft-deleted.
ColumnT< bool > tree_visible
Column indicating whether the object is visible in the scene tree.
TableVectorType< 6, fltp08 > bounding_box
Column storing the axis-aligned bounding box (min XYZ, max XYZ).
ColumnT< Matrix< fltp08 > > transform
Column storing the local transformation matrix.
ColumnT< bool > spacial_visible
Column indicating whether the object is visible in the 3D viewport.
Templated logic for doing matrix multiplication.
static constexpr TableColumn * column(const DesignInfo *object, NDPOC property)
Retrieves the TableColumn pointer for a given NDPOC property.
static constexpr uint04 index(const DesignInfo *object, NDPOC)
Retrieves the row index for a given NDPOC property on the specified design object.
Provides access to the TableColumn and row index for a given property enum value.
static TableColumn * column(const DesignInfo *object, t_property_enum property)
Retrieves the TableColumn pointer for a given property on the specified design object.
static uint04 index(const DesignInfo *object, t_property_enum property)
Retrieves the row index for a given property on the specified design object.
static decltype(auto) Get(const DesignInfo *object, NDPO property)
Gets the value of an NDPO property using a runtime property enum.
static decltype(auto) Get(const DesignInfo *object)
Gets the value of a compile-time NDPO property with the type deduced from PropertySpec.
static void Set(DesignInfo *object, NDPO property, const t_value_type &value)
Sets the value of an NDPO property using a runtime property enum.
static bool IsSame(const DesignInfo *object, NDPO property, const StringView &value)
Checks whether an NDPO property's stored value matches a given string representation.
static constexpr TableColumn * column(const DesignInfo *object, NDPO property)
Retrieves the TableColumn pointer for a given NDPO property.
static decltype(auto) Get(const DesignInfo *object)
Gets the value of a compile-time NDPO property with an explicit value type.
static void Set(DesignInfo *object, const typename PropertySpec< t_property >::type &value)
Sets the value of a compile-time NDPO property with optimized direct-member access.
Typed interface for getting and setting design object properties by enum.
static TableColumn * column(const DesignInfo *object, t_property_enum property)
Retrieves the TableColumn pointer for a given property on the specified design object.
static decltype(auto) Get(const DesignInfo *object, t_property_enum property)
Gets the value of a property from a design object using a runtime property enum.
static void Set(DesignInfo *object, t_property_enum property, const t_value_type &value)
Sets the value of a property on a design object using a runtime property enum.
static decltype(auto) Get(const DesignInfo *object)
Gets the value of a compile-time property, with the type deduced from PropertySpec.
static decltype(auto) Get(const DesignInfo *object)
Gets the value of a compile-time property from a design object with an explicit value type.
static bool IsSame(const DesignInfo *object, t_value_type property, const StringView &value)
Checks whether a property's stored value matches a given string representation.
static void Set(DesignInfo *object, const t_value_type &value)
Sets the value of a compile-time property on a design object.
static uint04 index(const DesignInfo *object, t_property_enum property)
Retrieves the row index for a given property on the specified design object.
The core String View class for the NDEVR API.
A virtual storage type that is used with Table class to store data where the actual mechanism for sto...
virtual bool isSame(uint04 index, const StringView &value) const =0
Checks whether the stored string at the given row is exactly equal to the given value.
std::enable_if<!ObjectInfo< t_class >::Enum >::type set(uint04 index, const t_class &value)
Sets the value at the given row index from a non-enum type.
void get(uint04 index, Vector< 1, t_class > &vector) const
Retrieves a 1D vector value at the given row index by delegating to the scalar get.
Represents a timestamp with utilities for manipulation and conversion.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
The primary namespace for the NDEVR SDK.
static constexpr bool IsValid(const Angle< t_type > &value)
Checks whether the given Angle holds a valid value.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
NDPOC
NDPOC - NDEVR Design Property Calculated: Values calculated then stored in the property database.
@ search_terms
The calculated/translated search terms.
@ author
The calculated/translated author name.
@ description
The calculated/translated description.
@ creation_software
The calculated/translated creation software name.
@ name
The calculated/translated display name.
@ category
The calculated/translated category.
constexpr t_to & rcast(t_from &value)
Casts the given value.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
NDPO
NDPO - NDEVR Design Property Object: Values stored in the property database.
@ search_terms
Additional search terms for finding this object.
@ author
The author or creator of the object.
@ desc_modified_time
Timestamp tracking descending-order modification.
@ deletion_allowed
Whether the user is allowed to delete this object.
@ translated_string_data
Translated string data storage.
@ creation_time
Timestamp when the object was created.
@ is_selected
Whether the object is currently selected.
@ guid
A 128-bit globally unique identifier for the object.
@ editable_description
Whether the user is allowed to modify the description of the object.
@ property_size
Sentinel value representing the total number of properties (always last).
@ tree_visible
Whether the object is visible in the design tree view.
@ modified_time
Timestamp when the object was last modified.
@ selection_ignored
Whether this object is excluded from selection operations.
@ description
The description text of the object.
@ geometry_modified_time
Timestamp when the geometry of the object was last modified.
@ bounding_box
The axis-aligned bounding box of the object in local space.
@ untranslated_string_data
Raw untranslated string data storage.
@ uncompressed_data
Uncompressed binary data storage.
@ applied_filters
Comma-separated list of filter identifiers applied to this object.
@ application_locked
Whether the application has locked this object from editing.
@ file
The source file path associated with this object.
@ library_id
UUID referencing a library item this object was created from.
@ creation_software
The software used to create the object.
@ name
The display name of the object.
@ compressed_data
Compressed binary data storage.
@ is_application_owned
Whether the object is owned and managed by the application.
@ icon
Icon identifier for the object.
@ allow_interactions
Whether user interactions with this object are allowed.
@ category
The category this object belongs to.
@ is_focused
Whether the object currently has focus.
@ bounds_ignored
Whether this object is excluded from bounding box calculations.
@ transform
A 4x4 transform matrix that maps local coordinates into global space.
@ meta_data
General-purpose metadata string for the object.
@ design_type
Bitflag storing what type of object this is (see DesignObjectType).
@ asc_modified_time
Timestamp tracking ascending-order modification.
@ is_frozen
Whether the object is frozen (cannot be modified by the user).
@ is_deleted
Whether the object has been soft-deleted.
@ spacial_visible
Whether the object is visible in the 3D spatial view.
Maps a compile-time property enum value to its corresponding C++ storage type.