A low-level database object that can be used to access general stored properties within the NDEVR Model heirarchy or 3D environment. More...
#include <DesignObject.h>
Public Member Functions | |
void | actionDeletedIndex (uint04 index, uint04 size) |
JSONNode | activeFilters () const |
void | addIndex (uint04 index, uint04 size) |
void | appendData (const String &data, bool compressed) |
DesignObjectBase & | base () const |
void | clearMetaData (const String &index) |
void | copyFrom (const DesignObject &object) |
uint04 | designIndex () const |
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. | |
DesignObject (DesignObjectBase *base) | |
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. | |
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. | |
bool | doesPropertyBeginWith (DesignProperty property, const char *value, bool ignore_case) const |
bool | doesPropertyBeginWith (DesignProperty property, const String &value, bool ignore_case) const |
bool | doesPropertyContain (DesignProperty property, const char *value, bool ignore_case) const |
bool | doesPropertyContain (DesignProperty property, const String &value, bool ignore_case) const |
File | file () const |
uint04 | getDesignParentIndex () const |
String | getIcon () const |
template<class t_type > | |
t_type | getInheritedProperty (DesignProperty property) const |
Time | getModifiedTime () const |
template<class t_type > | |
t_type | getProperty (DesignProperty property) const |
Scene | getScene () const |
Matrix< fltp08 > | getTransform () const |
bool | hasMetaData (const String &index) const |
template<class t_type > | |
bool | hasProperty (DesignProperty property) const |
uint04 | index () const |
bool | isDesignType (DesignObjectType mode) const |
bool | isDesignType (uint04 mode) const |
bool | isProperty (DesignProperty property, const char *value) const |
bool | isProperty (DesignProperty property, const String &value) const |
bool | isValid () const |
const JSONNode & | metaData () const |
const JSONNode & | metaData (const String &index) const |
void | offset (const Vector< 3, fltp08 > &offset) |
operator bool () const | |
bool | operator!= (const DesignObject &model) const |
bool | operator< (const DesignObject &model) const |
bool | operator== (const DesignObject &model) const |
bool | operator> (const DesignObject &model) const |
DynamicPointer< Table > & | propertyTable () |
const DynamicPointer< Table > & | propertyTable () const |
void | removeMetaData (const String &index, const void *lock_ptr=nullptr) |
void | scale (Vector< 3, fltp08 > scale, Vertex< 3, fltp08 > center_of_scale=Constant< Vertex< 3, fltp08 > >::Invalid) |
void | setActiveFilters (const JSONNode &node) |
void | setDesignType (DesignObjectType mode, bool is_type) |
void | setDesignVisible (bool is_visible) |
void | setMetaData (const JSONNode &node) |
void | setMetaData (const String &index, const bool &data) |
void | setMetaData (const String &index, const fltp08 &data) |
void | setMetaData (const String &index, const JSONNode &node) |
void | setMetaData (const String &index, const String &data) |
void | setMetaData (const String &index, const uint04 &data) |
template<> | |
void | setProperty (DesignProperty property, const String &value) |
template<class t_type > | |
void | setProperty (DesignProperty property, const t_type &value) |
template<> | |
void | setProperty (DesignProperty property, const UUID &value) |
void | updateCreatedTime () |
void | updateDesignModifiedTime (Time time=Time::SystemTime()) |
void | updateDesignTransform (const Matrix< fltp08 > &transform, const void *lock=nullptr) |
void | updateDesignVisible (bool is_visible, const void *lock=nullptr) |
void | updateMetaData (const String &index, const bool &data, const void *lock_ptr=nullptr) |
void | updateMetaData (const String &index, const fltp08 &data, const void *lock_ptr=nullptr) |
void | updateMetaData (const String &index, const String &data, const void *lock_ptr=nullptr) |
template<class t_type > | |
void | updateProperty (DesignProperty property, const t_type &value, const void *lock=nullptr) |
UUID | uuid () const |
bool | validateDesignObject () const |
Static Public Member Functions | |
static constexpr const char * | FilePathDesignNameVariable () |
Protected Member Functions | |
void | onNameChange (const String &new_name) |
Protected Attributes | |
DesignObjectBase * | m_base = nullptr |
uint04 | m_design_index = Constant<uint04>::Invalid |
uint04 | m_index = Constant<uint04>::Invalid |
UUID | m_uuid = Constant<UUID>::Invalid |
A low-level database object that can be used to access general stored properties within the NDEVR Model heirarchy 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
Date: 2018-03-22
enum DesignObjectType |
enum DesignProperty |
Values stored in the property database.
A specific value can be retrieved using the getProperty command or set via the setPropertyCommand. Upon changing the value, at some point, updateDesignModifiedTime should be called to notify the application about the changes to the design object.
|
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
|
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
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
JSONNode activeFilters | ( | ) | const |
void appendData | ( | const String & | data, |
bool | compressed ) |
|
inlinenodiscard |
void clearMetaData | ( | const String & | index | ) |
void copyFrom | ( | const DesignObject & | object | ) |
|
inline |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
File file | ( | ) | const |
|
inlinestaticnodiscardconstexpr |
|
nodiscard |
|
nodiscard |
|
inlinenodiscard |
|
nodiscard |
|
inlinenodiscard |
|
nodiscard |
bool hasMetaData | ( | const String & | index | ) | const |
|
inlinenodiscard |
|
inline |
bool isDesignType | ( | DesignObjectType | mode | ) | const |
bool isDesignType | ( | uint04 | mode | ) | const |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
nodiscard |
|
protected |
|
inline |
bool operator!= | ( | const DesignObject & | model | ) | const |
bool operator< | ( | const DesignObject & | model | ) | const |
bool operator== | ( | const DesignObject & | model | ) | const |
bool operator> | ( | const DesignObject & | model | ) | const |
|
nodiscard |
|
nodiscard |
void removeMetaData | ( | const String & | index, |
const void * | lock_ptr = nullptr ) |
void scale | ( | Vector< 3, fltp08 > | scale, |
Vertex< 3, fltp08 > | center_of_scale = Constant< Vertex< 3, fltp08 > >::Invalid ) |
void setActiveFilters | ( | const JSONNode & | node | ) |
void setDesignType | ( | DesignObjectType | mode, |
bool | is_type ) |
void setDesignVisible | ( | bool | is_visible | ) |
void setMetaData | ( | const JSONNode & | node | ) |
void setMetaData | ( | const String & | index, |
const bool & | data ) |
|
inline |
|
inline |
|
inline |
void updateCreatedTime | ( | ) |
void updateDesignModifiedTime | ( | Time | time = Time::SystemTime() | ) |
void updateDesignVisible | ( | bool | is_visible, |
const void * | lock = nullptr ) |
void updateMetaData | ( | const String & | index, |
const bool & | data, | ||
const void * | lock_ptr = nullptr ) |
|
inline |
|
nodiscard |
bool validateDesignObject | ( | ) | const |
|
protected |