Blender V4.3
blender::bke::idprop::IDPropertySerializer Class Referenceabstract

Base class for (de)serializing IDProperties. More...

Inherited by blender::bke::idprop::IDPArraySerializer, blender::bke::idprop::IDPBoolSerializer, blender::bke::idprop::IDPDoubleSerializer, blender::bke::idprop::IDPFloatSerializer, blender::bke::idprop::IDPGroupSerializer, blender::bke::idprop::IDPIntSerializer, blender::bke::idprop::IDPStringSerializer, and blender::bke::idprop::IDPUnknownSerializer.

Public Member Functions

constexpr IDPropertySerializer ()=default
 
virtual std::string type_name () const =0
 return the type name for (de)serializing. Type name is stored in the type or subtype attribute of the serialized id_property.
 
virtual std::optional< eIDPropertyTypeproperty_type () const =0
 return the IDPropertyType for (de)serializing.
 
virtual std::shared_ptr< DictionaryValueidprop_to_dictionary (const IDProperty *id_property) const =0
 create dictionary containing the given id_property.
 
virtual std::unique_ptr< IDProperty, IDPropertyDeleterentry_to_idprop (DictionaryEntryParser &entry_reader) const =0
 convert the entry to an id property.
 
virtual bool supports_serializing () const
 Can the serializer be used?
 

Protected Member Functions

std::shared_ptr< DictionaryValuecreate_dictionary (const IDProperty *id_property) const
 Create a new DictionaryValue instance.
 

Detailed Description

Base class for (de)serializing IDProperties.

Has a subclass for supported IDProperties and one for unsupported IDProperties.

Definition at line 48 of file idprop_serialize.cc.

Constructor & Destructor Documentation

◆ IDPropertySerializer()

blender::bke::idprop::IDPropertySerializer::IDPropertySerializer ( )
constexprdefault

Member Function Documentation

◆ create_dictionary()

◆ entry_to_idprop()

◆ idprop_to_dictionary()

◆ property_type()

◆ supports_serializing()

virtual bool blender::bke::idprop::IDPropertySerializer::supports_serializing ( ) const
inlinevirtual

Can the serializer be used?

IDP_ID and IDP_IDPARRAY aren't supported for serialization.

Reimplemented in blender::bke::idprop::IDPUnknownSerializer.

Definition at line 80 of file idprop_serialize.cc.

Referenced by blender::bke::idprop::convert_to_serialize_values().

◆ type_name()

virtual std::string blender::bke::idprop::IDPropertySerializer::type_name ( ) const
pure virtual

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