34#include <NDEVR/DesignObjectBase.h>
35#include <NDEVR/RWLock.h>
36#include <NDEVR/TranslatedString.h>
76 , e_geometry = 0x00000002
77 , e_material = 0x00000004
79 , e_effect = 0x00000010
80 , e_layer = 0x00000020
81 , e_scene = 0x00000040
82 , e_camera = 0x00000080
83 , e_selection = 0x00000100
101 , e_editable_description
104 , e_asc_modified_time
105 , e_desc_modified_time
106 , e_bounds_modified_time
108 , e_creation_software
114 , e_allow_interactions
120 , e_is_application_locked
121 , e_is_application_owned
123 , e_selection_ignored
125 , e_untranslated_string_data
126 , e_translated_string_data
127 , e_uncompressed_data
134 , e_design_property_size
176 template<
class t_type>
179 propertyTable().get()[m_base->property_index[cast<uint04>(property)]].set(index(), value);
183 m_uuid = getProperty<UUID>(property);
196 debug_name = getProperty<String>(property);
206 propertyTable().get()[m_base->property_index[cast<uint04>(property)]].set(index(), value);
227 propertyTable().get()[m_base->property_index[cast<uint04>(property)]].set(index(), value);
243 template<
class t_type>
246 if (getProperty<t_type>(property) != value)
249 setProperty(property, value);
250 updateDesignModifiedTime();
255 template<
class t_type>
258 return propertyTable().get()[m_base->property_index[cast<uint04>(property)]].get<t_type>(index());
261 template<
class t_type>
264 return !
IsInvalid(getProperty<t_type>(property));
268 return propertyTable().get()[m_base->property_index[cast<uint04>(property)]].isSame(index(), value);
272 return propertyTable().get()[m_base->property_index[cast<uint04>(property)]].isSame(index(), value);
276 return propertyTable().get()[m_base->property_index[cast<uint04>(property)]].beginsWith(index(), value, ignore_case);
280 return propertyTable().get()[m_base->property_index[cast<uint04>(property)]].beginsWith(index(), value, ignore_case);
284 return propertyTable().get()[m_base->property_index[cast<uint04>(property)]].contains(index(), value, ignore_case);
288 return propertyTable().get()[m_base->property_index[cast<uint04>(property)]].contains(index(), value, ignore_case);
290 template<
class t_type>
293 if (hasProperty<t_type>(property))
294 return getProperty<t_type>(property);
295 uint04 parent_index = getDesignParentIndex();
304 return getProperty<t_type>(property);
345 operator bool()
const
375 static const uint01 Dimensions = 0;
376 static const bool Vector =
false;
377 static const bool Buffer =
false;
379 static const bool Pointer =
false;
380 static const bool Unsigned =
false;
381 static const bool Float =
false;
382 static const bool Integer =
false;
383 static const bool Number =
false;
384 static const bool Enum =
false;
385 static const bool String =
false;
386 static const bool Color =
false;
387 static const bool Boolean =
false;
395 struct hash<NDEVR::DesignObject>
400 std::size_t value = 0;
403 value = value * 256 + (s[i + 0U] ^ s[i + 8U]);
#define lib_assert(expression, message)
Definition LibAssert.h:61
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
The core Color class in the NDEVR API. Colors can be defined in several ways. The ACIColor is compact...
Definition Color.h:41
Provides the underlying data storage for the NDEVR Scene Model heirarchy.
Definition DesignObjectBase.h:150
A low-level database object that can be used to access general stored properties within the NDEVR Mod...
Definition DesignObject.h:67
void updateMetaData(const String &index, const String &data, const void *lock_ptr=nullptr)
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...
bool doesPropertyContain(DesignProperty property, const String &value, bool ignore_case) const
Definition DesignObject.h:282
DynamicPointer< Table > & propertyTable()
bool operator!=(const DesignObject &model) const
bool operator==(const DesignObject &model) const
const DynamicPointer< Table > & propertyTable() const
bool isProperty(DesignProperty property, const char *value) const
Definition DesignObject.h:270
static constexpr const char * FilePathDesignNameVariable()
Definition DesignObject.h:357
void removeMetaData(const String &index, const void *lock_ptr=nullptr)
JSONNode activeFilters() const
DesignObject()=default
Creates an "invalid" design object. This object does not have a backing database, and all indices wil...
bool doesPropertyBeginWith(DesignProperty property, const String &value, bool ignore_case) const
Definition DesignObject.h:274
void setActiveFilters(const JSONNode &node)
void updateMetaData(const String &index, const bool &data, const void *lock_ptr=nullptr)
bool isDesignType(DesignObjectType mode) const
void actionDeletedIndex(uint04 index, uint04 size)
bool isValid() const
Definition DesignObject.h:355
void setDesignType(DesignObjectType mode, bool is_type)
bool hasMetaData(const String &index) const
uint04 designIndex() const
Definition DesignObject.h:338
t_type getInheritedProperty(DesignProperty property) const
Definition DesignObject.h:291
DesignObject(DesignObjectBase *base)
Creates an new design object within the given DesignObjectBase. This object is appended to the end of...
void updateDesignTransform(const Matrix< fltp08 > &transform, const void *lock=nullptr)
void updateDesignModifiedTime(Time time=Time::SystemTime())
uint04 index() const
Definition DesignObject.h:337
void updateProperty(DesignProperty property, const t_type &value, const void *lock=nullptr)
Definition DesignObject.h:244
void setProperty(DesignProperty property, const UUID &value)
Definition DesignObject.h:204
t_type getProperty(DesignProperty property) const
Definition DesignObject.h:256
void setMetaData(const String &index, const fltp08 &data)
bool validateDesignObject() const
bool operator<(const DesignObject &model) const
void offset(const Vector< 3, fltp08 > &offset)
void setMetaData(const String &index, const String &data)
void updateMetaData(const String &index, const fltp08 &data, const void *lock_ptr=nullptr)
void setMetaData(const JSONNode &node)
bool doesPropertyContain(DesignProperty property, const char *value, bool ignore_case) const
Definition DesignObject.h:286
void setDesignVisible(bool is_visible)
Matrix< fltp08 > getTransform() const
const JSONNode & metaData(const String &index) const
bool hasProperty(DesignProperty property) const
Definition DesignObject.h:262
DesignObjectType
Definition DesignObject.h:74
void setProperty(DesignProperty property, const t_type &value)
Definition DesignObject.h:177
void addIndex(uint04 index, uint04 size)
void setMetaData(const String &index, const bool &data)
void copyFrom(const DesignObject &object)
void setMetaData(const String &index, const JSONNode &node)
void clearMetaData(const String &index)
bool operator>(const DesignObject &model) const
uint04 getDesignParentIndex() const
DesignProperty
Values stored in the property database.
Definition DesignObject.h:93
Time getModifiedTime() const
void updateDesignVisible(bool is_visible, const void *lock=nullptr)
void onNameChange(const String &new_name)
const JSONNode & metaData() const
void setMetaData(const String &index, const uint04 &data)
void setProperty(DesignProperty property, const String &value)
Definition DesignObject.h:217
DesignObjectBase & base() const
Definition DesignObject.h:349
bool doesPropertyBeginWith(DesignProperty property, const char *value, bool ignore_case) const
Definition DesignObject.h:278
void appendData(const String &data, bool compressed)
bool isProperty(DesignProperty property, const String &value) const
Definition DesignObject.h:266
bool isDesignType(uint04 mode) const
void scale(Vector< 3, fltp08 > scale, Vertex< 3, fltp08 > center_of_scale=Constant< Vertex< 3, fltp08 > >::Invalid)
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:320
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
JavaScript Object Notation or JSON is an open - standard file format that uses human - readable text ...
Definition JSONParser.h:60
Definition Matrix.hpp:176
Matrix< t_type, t_cols, t_rows > invert() const
Definition Matrix.hpp:652
Provides shared ownership of a dynamically allocated object.
Definition Pointer.hpp:71
The root Model that is responsible for storing the underlying data for all Scene Models.
Definition Model.h:492
The core String class for the NDEVR API.
Definition String.h:69
Logic for reading or writing to a string or a user friendly, TranslatedString.
Definition StringStream.h:230
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
A vertex or point. A specific type of Vector used primarily for spacial location information.
Definition Vertex.hpp:48
Used to lock a particular variable for writing. Only one write lock can be created when no read locks...
Definition RWLock.h:115
constexpr bool IsInvalid(const t_type &value)
Query if 'value' is valid or invalid. Invalid values should return invalid if used for calculations o...
Definition BaseFunctions.hpp:170
constexpr bool DESIGN_PRIM
Definition DesignObject.h:47
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80
@ e_file
Definition ModuleResourceManager.h:52
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233
Information about the object.
Definition ObjectInfo.h:54