clibgen.PropertyDefinition Class
Namespace: clibgen
Definition for MATLAB property corresponding to public property of C++ class
Description
The clibgen.PropertyDefinition
class contains the MATLAB® definition for a public property defined in the header of a C++ class.
The clibgen.PropertyDefinition
class is a handle
class.
Creation
MATLAB constructs a PropertyDefinition
object when MATLAB calls addProperty
on a
clibgen.ClassDefinition
object.
Properties
Tips
You might need to access a property in MATLAB, but the name of the property might not be a valid MATLAB name. For example, the name might begin with an underscore. To derive this name at run time, use this MATLAB syntax, where
propertyName
is a string scalar or character vector that, when evaluated, returns an instance of a property.clib.libName.className.(propertyName)
For example, suppose that you have interface
clib.demo.MyClass
with this property:class MyClass { public: int _mean; };
To assign property
_mean
to a variable, type:x = clib.demo.MyClass; xmean = x.('_mean')
This syntax is valid for names less than the maximum identifier length
namelengthmax
.
Version History
Introduced in R2019a