Main Content

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

expand all

Help text for the end user describing the property, specified as a string or a character vector. The default text is:

MATLABType    Data member of C++ class DefiningClass.CPPName.
The publisher can modify the value of the Description property in the library definition file.

Example: double Data member of C++ class MyClass.

Attributes:

GetAccess
public
SetAccess
public

Help text from C++ header file for the end user describing details about the property, specified as a string or a character vector. If the C++ comment does not contain detailed information, then DetailedDescription does not appear in the definition file.

The publisher can modify the value of the DetailedDescription property in the library definition file. If DetailedDescription is not empty, then the MATLAB doc command displays this sentence before displaying the value of DetailedDescription.

This content is from the external library documentation.

Attributes:

GetAccess
public
SetAccess
public

C++ property name, specified as a string or a character vector. MATLAB creates CPPName from a class public data member in the header file.

Attributes:

GetAccess
public
SetAccess
private

Class containing the property, specified as a clibgen.ClassDefinition object.

Attributes:

GetAccess
public
SetAccess
private

Type in MATLAB, specified as a string or a character vector. MATLAB creates MATLABType from the definition of a class public data member in the header file.

Attributes:

GetAccess
public
SetAccess
private

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