Rhino C++ API
8.14
|
#include <opennurbs_userdata.h>
Public Member Functions | |
ON_UnknownUserData () | |
ON_UnknownUserData (const ON_UnknownUserData &) | |
~ON_UnknownUserData () | |
bool | Archive () const override |
ON_UserData * | Convert () const |
void | Dump (ON_TextLog &) const override |
bool | GetDescription (ON_wString &) override |
description of user data More... | |
bool | IsValid (class ON_TextLog *text_log=nullptr) const override |
ON_Object overrides. More... | |
ON_UnknownUserData & | operator= (const ON_UnknownUserData &) |
bool | Read (ON_BinaryArchive &) override |
unsigned int | SizeOf () const override |
return amount of memory used by user data More... | |
bool | Write (ON_BinaryArchive &) const override |
Public Member Functions inherited from ON_UserData | |
ON_UserData () | |
ON_UserData (const ON_UserData &) | |
~ON_UserData () | |
virtual bool | DeleteAfterRead (const class ON_BinaryArchive &archive, class ON_Object *parent_object) const |
virtual bool | DeleteAfterWrite (const class ON_BinaryArchive &archive, const class ON_Object *parent_object) const |
bool | IsUnknownUserData () const |
ON_UserData * | Next () const |
ON_UserData & | operator= (const ON_UserData &) |
ON_Object * | Owner () const |
Returns object that owns the user data. More... | |
virtual bool | Transform (const ON_Xform &) |
ON_UUID | UserDataClassUuid () const |
virtual bool | WriteToArchive (const class ON_BinaryArchive &archive, const class ON_Object *parent_object) const |
Public Member Functions inherited from ON_Object | |
ON_Object () ON_NOEXCEPT | |
ON_Object (const ON_Object &) | |
virtual | ~ON_Object () |
virtual ON_AggregateComponentStatus | AggregateComponentStatus () const |
bool | AttachUserData (class ON_UserData *pUserData) |
unsigned int | ClearAllComponentStates () const |
virtual unsigned int | ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const |
virtual unsigned int | ClearComponentStates (ON_ComponentStatus states_to_clear) const |
void | CopyUserData (const ON_Object &source_object) |
unsigned int | CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution) |
virtual ON__UINT32 | DataCRC (ON__UINT32 current_remainder) const |
virtual bool | DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count) |
virtual void | DestroyRuntimeCache (bool bDelete=true) |
bool | DetachUserData (class ON_UserData *pUserData) |
void | EmergencyDestroy () |
class ON_UserData * | FirstUserData () const |
virtual unsigned int | GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const |
class ON_UserData * | GetUserData (const ON_UUID &userdata_uuid) const |
bool | GetUserString (const wchar_t *key, ON_wString &string_value) const |
int | GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const |
int | GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const |
bool | IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const |
bool | IsKindOf (const ON_ClassId *pClassId) const |
virtual void | MarkAggregateComponentStatusAsNotCurrent () const |
virtual void | MemoryRelocate () |
virtual ON_UUID | ModelObjectId () const |
void | MoveUserData (ON_Object &source_object) |
unsigned int | MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems) |
virtual ON::object_type | ObjectType () const |
ON_Object & | operator= (const ON_Object &) |
void | PurgeUserData () |
virtual unsigned int | SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const |
virtual unsigned int | SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const |
bool | SetUserString (const wchar_t *key, const wchar_t *string_value) |
int | SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace) |
bool | ThisIsNullptr (bool bSilentError) const |
void | TransformUserData (const class ON_Xform &xform) |
virtual bool | UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map) |
int | UserStringCount () const |
Public Attributes | |
unsigned int | m_3dm_opennurbs_version_number |
int | m_3dm_version |
3dm archive version (0,1,2,3,4,5,50,...) More... | |
void * | m_buffer |
int | m_sizeof_buffer |
ON_UUID | m_unknownclass_uuid |
Public Attributes inherited from ON_UserData | |
ON_UUID | m_application_uuid |
unsigned int | m_userdata_copycount |
ON_UUID | m_userdata_uuid |
ON_Xform | m_userdata_xform |
Additional Inherited Members | |
Public Types inherited from ON_Object | |
enum | UserDataConflictResolution : unsigned char { UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3, UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6 } |
ON_UnknownUserData::ON_UnknownUserData | ( | ) |
used to hold user data when the application class is not loaded at time data is read
ON_UnknownUserData::ON_UnknownUserData | ( | const ON_UnknownUserData & | ) |
ON_UnknownUserData::~ON_UnknownUserData | ( | ) |
|
overridevirtual |
Description: If Archive() returns true, m_application_uuid is not nil, and the virtual Read() and Write() are functions are overridden, then this user data will be written to and read from 3dm archives.
Returns: true if user data should be saved in binary archives. false if the user data should not be saved in binary archives.
Remarks: The default implementation returns false. If you override ON_UserData::Archive so that it returns true, then your constructor must set m_application_uuid, you must override the virtual ON_Object::Read and ON_Object::Write functions and you must CAREFULLY TEST your code.
ON_UserData requires expert programming and testing skills.
If you need to know more details about the archive or parent object to determine if the userdata should be saved, then override WriteToArchive().
YOU SHOULD READ AND UNDERSTAND EVERY COMMENT IN THIS HEADER FILE IN BEFORE ATTEMPTING TO USE ON_UserData.
Reimplemented from ON_UserData.
ON_UserData* ON_UnknownUserData::Convert | ( | ) | const |
Convert unknown user data to actual user data. Useful if definition of actual user data is dynamically linked after archive containing user data is read.
|
overridevirtual |
Description: Overrides virtual ON_Object::Dump(). Prints class name, description, and uuid. Parameters: text_log - [in] Information is sent to this text log. Remarks:
Reimplemented from ON_UserData.
|
overridevirtual |
description of user data
Reimplemented from ON_UserData.
|
overridevirtual |
ON_Object overrides.
Reimplemented from ON_UserData.
ON_UnknownUserData& ON_UnknownUserData::operator= | ( | const ON_UnknownUserData & | ) |
|
overridevirtual |
Description: Low level archive writing tool used by ON_BinaryArchive::ReadObject(). Parameters: binary_archive - archive to read from Returns: Returns true if the read is successful. Remarks: Use ON_BinaryArchive::ReadObject() to read objects. This Read() function should read the objects definition back into its data members.
The default implementation of this virtual function returns false and does nothing.
Reimplemented from ON_Object.
|
overridevirtual |
return amount of memory used by user data
Reimplemented from ON_UserData.
|
overridevirtual |
Description: Low level archive writing tool used by ON_BinaryArchive::WriteObject(). Parameters: binary_archive - archive to write to Returns: Returns true if the write is successful. Remarks: Use ON_BinaryArchive::WriteObject() to write objects. This Write() function should just write the specific definition of this object. It should not write and any chunk typecode or length information.
The default implementation of this virtual function returns false and does nothing.
Reimplemented from ON_Object.
unsigned int ON_UnknownUserData::m_3dm_opennurbs_version_number |
In V5 and earlier, m_3dm_opennurbs_version had the format YYYYMMDDN For V6 the unsigned int value is calculated by ON_VersionNumberConstruct() and has the high bit set (it will be negative if used as a signed int). When writing files in previous version formats (V5 or earlier) it is important to write a YYYYMMDDN version number in the file. Use ON_VersionNumberParse() get the YYYY, MM, DD and N values from m_3dm_opennurbs_version.
int ON_UnknownUserData::m_3dm_version |
3dm archive version (0,1,2,3,4,5,50,...)
These version numbers are set when unknown user data is read from a file record the version of the 3dm archive and the version of opennurbs that were used when the plug-in wrote the user data. This information was added in to V5 opennurbs 200910190. For files written with earlier versions of opennurbs, these values are set from the archive containing the user data. The purpose of this version information is to have it accompany unknown user data so that if is is eventually read by the plug-in an ON_BinaryArchive with correct version information can be passed to the plug-in's reading code. In archives, these values are stored in the TCODE_USER_TABLE_RECORD_HEADER chunk.
void* ON_UnknownUserData::m_buffer |
int ON_UnknownUserData::m_sizeof_buffer |
ON_UUID ON_UnknownUserData::m_unknownclass_uuid |
Description: This is the uuid of the missing class. This uuid is the 3rd parameter to the ON_OBJECT_IMPLEMENT() macro of the missing class.