MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.ConstFeatureObjectSharedProperty Class Reference
Inheritance diagram for mrmeshpy.ConstFeatureObjectSharedProperty:

Public Member Functions

 __init__ (self, *args, **kwargs)
Const_func_std_variant_float_Vector3_float_from_FeatureObject_const_ptr_ViewportId getter (self)
FeaturePropertyKind kind (self)
str propertyName (self)
Const_func_void_from_std_variant_float_Vector3_float_FeatureObject_ptr_ViewportId setter (self)

Static Protected Attributes

typing _offsetof_getter = 40
typing _offsetof_kind = 32
typing _offsetof_propertyName = 0
typing _offsetof_setter = 72

Detailed Description

Generated from:  MR::FeatureObjectSharedProperty

FeatureObjectSharedProperty struct is designed to represent a shared property of a feature object, enabling the use of generalized getter and setter methods for property manipulation.
propertyName: A string representing the name of the property.
getter : A std::function encapsulating a method with no parameters that returns a FeaturesPropertyTypesVariant.This allows for a generic way to retrieve the value of the property.
setter : A std::function encapsulating a method that takes a FeaturesPropertyTypesVariant as a parameter and returns void.This function sets the value of the property.
The templated constructor of this struct takes the property name, pointers to the getter and setter member functions, and a pointer to the object( obj ).
The constructor initializes the propertyName and uses lambdas to adapt the member function pointers into std::function objects that conform to the expected
getter and setter signatures.The getter lambda invokes the getter method on the object, and the setter lambda ensures the correct variant type is passed before
invoking the setter method.

Constructor & Destructor Documentation

◆ __init__()

mrmeshpy.ConstFeatureObjectSharedProperty.__init__ ( self,
* args,
** kwargs )
__init__(*args, **kwargs)
Overloaded function.

1. __init__(self: meshlib.mrmeshpy.ConstFeatureObjectSharedProperty, arg0: meshlib.mrmeshpy.ConstFeatureObjectSharedProperty) -> None

Implicit copy constructor.

2. __init__(self: meshlib.mrmeshpy.ConstFeatureObjectSharedProperty, : meshlib.mrmeshpy.ConstFeatureObjectSharedProperty) -> None

Member Function Documentation

◆ getter()

Const_func_std_variant_float_Vector3_float_from_FeatureObject_const_ptr_ViewportId mrmeshpy.ConstFeatureObjectSharedProperty.getter ( self)
due to getAllSharedProperties in FeatureObject returns static vector, we need externaly setup object to invoke setter ad getter.

Reimplemented in mrmeshpy.FeatureObjectSharedProperty, and mrmeshpy.FeatureObjectSharedProperty.

◆ kind()

FeaturePropertyKind mrmeshpy.ConstFeatureObjectSharedProperty.kind ( self)

◆ propertyName()

str mrmeshpy.ConstFeatureObjectSharedProperty.propertyName ( self)

◆ setter()

Const_func_void_from_std_variant_float_Vector3_float_FeatureObject_ptr_ViewportId mrmeshpy.ConstFeatureObjectSharedProperty.setter ( self)
NOTE: `id` should usually be `{}`, not the current viewport ID, to set the property for all viewports.
Passing a non-zero ID would only modify the active viewport, and per-viewport properties aren't usually used.

Reimplemented in mrmeshpy.FeatureObjectSharedProperty, and mrmeshpy.FeatureObjectSharedProperty.

Member Data Documentation

◆ _offsetof_getter

typing mrmeshpy.ConstFeatureObjectSharedProperty._offsetof_getter = 40
staticprotected

◆ _offsetof_kind

typing mrmeshpy.ConstFeatureObjectSharedProperty._offsetof_kind = 32
staticprotected

◆ _offsetof_propertyName

typing mrmeshpy.ConstFeatureObjectSharedProperty._offsetof_propertyName = 0
staticprotected

◆ _offsetof_setter

typing mrmeshpy.ConstFeatureObjectSharedProperty._offsetof_setter = 72
staticprotected

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