API Documentation
Loading...
Searching...
No Matches
DesignObject Class Reference

#include <DesignObject.h>

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

Public Types

enum  DesignObjectType {
  e_model = 0x00000001 , e_geometry = 0x00000002 , e_material = 0x00000004 , e_bone = 0x00000008 ,
  e_effect = 0x00000010 , e_layer = 0x00000020 , e_scene = 0x00000040 , e_camera = 0x00000080 ,
  e_selection = 0x00000100
}
 
enum  DesignProperty {
  e_guid , e_design_types , e_transform , e_bounding_box ,
  e_selection_box , e_name , e_description , e_editable_description ,
  e_creation_time , e_modified_time , e_asc_modified_time , e_desc_modified_time ,
  e_bounds_modified_time , e_author , e_creation_software , e_3D_visible ,
  e_tree_visible , e_icon , e_is_selected , e_is_focused ,
  e_allow_interactions , e_file , e_search_terms , e_category ,
  e_deletion_allowed , e_is_deleted , e_is_application_locked , e_is_application_owned ,
  e_bounds_ignored , e_selection_ignored , e_meta_data , e_untranslated_string_data ,
  e_translated_string_data , e_uncompressed_data , e_compressed_data , e_manager_visible ,
  e_library_id , e_is_frozen , e_applied_filters , e_design_property_size
}
 

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)
 
DesignObjectBasebase () const
 
void clearMetaData (const String &index)
 
void copyFrom (const DesignObject &object)
 
uint04 designIndex () const
 
 DesignObject ()=default
 
 DesignObject (DesignObjectBase *base)
 
 DesignObject (uint04 index, DesignObjectBase *base)
 
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< fltp08getTransform () 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 JSONNodemetaData () const
 
const JSONNodemetaData (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

DesignObjectBasem_base = nullptr
 
uint04 m_design_index = Constant<uint04>::Invalid
 
uint04 m_index = Constant<uint04>::Invalid
 
UUID m_uuid = Constant<UUID>::Invalid
 

Detailed Description


Class: DesignObject

A low-level database object that can be used to access general stored properties within a DesignObjectBase. Generally 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

Author: Tyler Parke

Date: 2018-03-22

Member Enumeration Documentation

◆ DesignObjectType


Enum: DesignObjectType

Enum representing the type of object a design object could be. A design object can be checked for

inheritance using the isDesignType function.

Enumerator
e_model 
e_geometry 
e_material 
e_bone 
e_effect 
e_layer 
e_scene 
e_camera 
e_selection 

◆ DesignProperty


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.

Enumerator
e_guid 
e_design_types 
e_transform 
e_bounding_box 
e_selection_box 
e_name 
e_description 
e_editable_description 
e_creation_time 
e_modified_time 
e_asc_modified_time 
e_desc_modified_time 
e_bounds_modified_time 
e_author 
e_creation_software 
e_3D_visible 
e_tree_visible 
e_icon 
e_is_selected 
e_is_focused 
e_allow_interactions 
e_file 
e_search_terms 
e_category 
e_deletion_allowed 
e_is_deleted 
e_is_application_locked 
e_is_application_owned 
e_bounds_ignored 
e_selection_ignored 
e_meta_data 
e_untranslated_string_data 
e_translated_string_data 
e_uncompressed_data 
e_compressed_data 
e_manager_visible 
e_library_id 
e_is_frozen 
e_applied_filters 
e_design_property_size 

Constructor & Destructor Documentation

◆ DesignObject() [1/3]

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

◆ DesignObject() [2/3]

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

◆ DesignObject() [3/3]

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

Member Function Documentation

◆ actionDeletedIndex()

void actionDeletedIndex ( uint04 index,
uint04 size )

◆ activeFilters()

JSONNode activeFilters ( ) const

◆ addIndex()

void addIndex ( uint04 index,
uint04 size )

◆ appendData()

void appendData ( const String & data,
bool compressed )

◆ base()

DesignObjectBase & base ( ) const
inlinenodiscard

◆ clearMetaData()

void clearMetaData ( const String & index)

◆ copyFrom()

void copyFrom ( const DesignObject & object)

◆ designIndex()

uint04 designIndex ( ) const
inline

◆ doesPropertyBeginWith() [1/2]

bool doesPropertyBeginWith ( DesignProperty property,
const char * value,
bool ignore_case ) const
inlinenodiscard

◆ doesPropertyBeginWith() [2/2]

bool doesPropertyBeginWith ( DesignProperty property,
const String & value,
bool ignore_case ) const
inlinenodiscard

◆ doesPropertyContain() [1/2]

bool doesPropertyContain ( DesignProperty property,
const char * value,
bool ignore_case ) const
inlinenodiscard

◆ doesPropertyContain() [2/2]

bool doesPropertyContain ( DesignProperty property,
const String & value,
bool ignore_case ) const
inlinenodiscard

◆ file()

File file ( ) const

◆ FilePathDesignNameVariable()

static constexpr const char * FilePathDesignNameVariable ( )
inlinestaticnodiscardconstexpr

◆ getDesignParentIndex()

uint04 getDesignParentIndex ( ) const
nodiscard

◆ getIcon()

String getIcon ( ) const
nodiscard

◆ getInheritedProperty()

template<class t_type >
t_type getInheritedProperty ( DesignProperty property) const
inlinenodiscard

◆ getModifiedTime()

Time getModifiedTime ( ) const
nodiscard

◆ getProperty()

template<class t_type >
t_type getProperty ( DesignProperty property) const
inlinenodiscard

◆ getScene()

Scene getScene ( ) const
nodiscard

◆ getTransform()

Matrix< fltp08 > getTransform ( ) const
nodiscard

◆ hasMetaData()

bool hasMetaData ( const String & index) const

◆ hasProperty()

template<class t_type >
bool hasProperty ( DesignProperty property) const
inlinenodiscard

◆ index()

uint04 index ( ) const
inline

◆ isDesignType() [1/2]

bool isDesignType ( DesignObjectType mode) const

◆ isDesignType() [2/2]

bool isDesignType ( uint04 mode) const

◆ isProperty() [1/2]

bool isProperty ( DesignProperty property,
const char * value ) const
inlinenodiscard

◆ isProperty() [2/2]

bool isProperty ( DesignProperty property,
const String & value ) const
inlinenodiscard

◆ isValid()

bool isValid ( ) const
inlinenodiscard

◆ metaData() [1/2]

const JSONNode & metaData ( ) const
nodiscard

◆ metaData() [2/2]

const JSONNode & metaData ( const String & index) const
nodiscard

◆ offset()

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

◆ onNameChange()

void onNameChange ( const String & new_name)
protected

◆ operator bool()

operator bool ( ) const
inline

◆ operator!=()

bool operator!= ( const DesignObject & model) const

◆ operator<()

bool operator< ( const DesignObject & model) const

◆ operator==()

bool operator== ( const DesignObject & model) const

◆ operator>()

bool operator> ( const DesignObject & model) const

◆ propertyTable() [1/2]

DynamicPointer< Table > & propertyTable ( )
nodiscard

◆ propertyTable() [2/2]

const DynamicPointer< Table > & propertyTable ( ) const
nodiscard

◆ removeMetaData()

void removeMetaData ( const String & index,
const void * lock_ptr = nullptr )

◆ scale()

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

◆ setActiveFilters()

void setActiveFilters ( const JSONNode & node)

◆ setDesignType()

void setDesignType ( DesignObjectType mode,
bool is_type )

◆ setDesignVisible()

void setDesignVisible ( bool is_visible)

◆ setMetaData() [1/6]

void setMetaData ( const JSONNode & node)

◆ setMetaData() [2/6]

void setMetaData ( const String & index,
const bool & data )

◆ setMetaData() [3/6]

void setMetaData ( const String & index,
const fltp08 & data )

◆ setMetaData() [4/6]

void setMetaData ( const String & index,
const JSONNode & node )

◆ setMetaData() [5/6]

void setMetaData ( const String & index,
const String & data )

◆ setMetaData() [6/6]

void setMetaData ( const String & index,
const uint04 & data )

◆ setProperty() [1/3]

template<>
void setProperty ( DesignProperty property,
const String & value )
inline

◆ setProperty() [2/3]

template<class t_type >
void setProperty ( DesignProperty property,
const t_type & value )
inline

◆ setProperty() [3/3]

template<>
void setProperty ( DesignProperty property,
const UUID & value )
inline

◆ updateCreatedTime()

void updateCreatedTime ( )

◆ updateDesignModifiedTime()

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

◆ updateDesignTransform()

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

◆ updateDesignVisible()

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

◆ updateMetaData() [1/3]

void updateMetaData ( const String & index,
const bool & data,
const void * lock_ptr = nullptr )

◆ updateMetaData() [2/3]

void updateMetaData ( const String & index,
const fltp08 & data,
const void * lock_ptr = nullptr )

◆ updateMetaData() [3/3]

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

◆ updateProperty()

template<class t_type >
void updateProperty ( DesignProperty property,
const t_type & value,
const void * lock = nullptr )
inline

◆ uuid()

UUID uuid ( ) const
nodiscard

◆ validateDesignObject()

bool validateDesignObject ( ) const

Member Data Documentation

◆ m_base

DesignObjectBase* m_base = nullptr
protected

◆ m_design_index

uint04 m_design_index = Constant<uint04>::Invalid
protected

◆ m_index

uint04 m_index = Constant<uint04>::Invalid
protected

◆ m_uuid

UUID m_uuid = Constant<UUID>::Invalid
mutableprotected

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