This class describes a class attribute in a class proxy.
Attribute types | |
enum class | Type { ReadOnly , ReadWrite , ReadWriteClear , ReadWriteClearArray , ReadWriteRange , ReadWriteRangeSlider , ReadWriteList , RichTextReadOnly , RichTextReadWrite , RichTextReadWriteClear , PushButton , ImagePathReadOnly , ImagePathReadWrite , ImagePathReadWriteClear , ImageBase64ReadOnly , ImageBase64ReadWrite , ImageBase64ReadWriteClear } |
Setters | |
void | setGetFunction (SBFunction *function) |
Sets the get function. | |
void | setSetFunction (SBFunction *function) |
Sets the set function. | |
void | setHasFunction (SBFunction *function) |
Sets the has function. | |
void | setClearFunction (SBFunction *function) |
Sets the clear function. | |
void | setGetSizeFunction (SBFunction *function) |
Sets the getSize function. | |
void | setGetDefaultFunction (SBFunction *function) |
Sets the getDefault function. | |
void | setGetMinimumFunction (SBFunction *function) |
Sets the getMinimum function. | |
void | setGetMaximumFunction (SBFunction *function) |
Sets the getMaximum function. | |
void | setGetSingleStepFunction (SBFunction *function) |
Sets the getSingleStep function. | |
void | setGetSuffixFunction (SBFunction *function) |
Sets the getSuffix function. | |
void | setGetCountFunction (SBFunction *function) |
Sets the getCount function. | |
void | setGetCurrentIndexFunction (SBFunction *function) |
Sets the getCurrentIndex function. | |
void | setSetCurrentIndexFunction (SBFunction *function) |
Sets the setCurrentIndex function. | |
void | setGetItemTextFunction (SBFunction *function) |
Sets the getItemText function. | |
void | setGetToolTipFunction (SBFunction *function) |
Sets the getToolTip function. | |
void | setGetEnabledFlagFunction (SBFunction *function) |
Sets the getEnabledFlag function. | |
void | setGetVisibilityFlagFunction (SBFunction *function) |
Sets the getVisibilityFlag function. | |
SB_DECLARE_DATA (SBCClassAttribute) | |
Constructors and destructors | |
SBCClassAttribute (SBValue attributeType, SBCClassAttribute::Type type, const std::string &attributeName, const std::string &attributeDescription, const std::string &attributeGroup) | |
Constructs a class attribute. | |
SBCClassAttribute (SBValue attributeType, SBCClassAttribute::Type type, const std::string &attributeName, const std::string &attributeDescription, const std::string &attributeGroup, SBFunction *getFunction, SBFunction *setFunction=nullptr, SBFunction *hasFunction=nullptr, SBFunction *clearFunction=nullptr, SBFunction *getSizeFunction=nullptr, SBFunction *getMinimumFunction=nullptr, SBFunction *getMaximumFunction=nullptr, SBFunction *getSingleStepFunction=nullptr, SBFunction *getSuffixFunction=nullptr, SBFunction *getCountFunction=nullptr, SBFunction *getCurrentIndexFunction=nullptr, SBFunction *setCurrentIndexFunction=nullptr, SBFunction *getItemTextFunction=nullptr, SBFunction *getDefaultFunction=nullptr) | |
Constructs a class attribute. | |
~SBCClassAttribute () | |
Destructs the class attribute. | |
Identity | |
SBCClassAttribute::Type | getType () const |
Returns the type of the attribute. | |
std::string | getName () const |
Returns the name of the attribute. | |
std::string | getDescription () const |
Returns the description of the attribute. | |
std::string | getGroup () const |
Returns the group of the attribute. | |
SBValue | getAttributeType () const |
Returns the type of the attribute value. | |
Accessors | |
SBValue | get (const SBValue &object) const |
Gets the attribute from the object . | |
void | set (const SBValue &object, const SBValue &value, const SBValue &size=SBValue()) const |
Sets the attribute in the object to a specific value . | |
bool | has (const SBValue &object) const |
Returns whether the attribute has a value when the attribute is clearable. | |
void | clear (const SBValue &object) const |
Clears the value of the attribute when possible. | |
unsigned int | getSize (const SBValue &object) const |
Returns the size of the array attribute in the object when relevant. | |
SBValue | getDefault (const SBValue &object) const |
Returns the attribute's default value from the object . | |
bool | hasDefault () const noexcept |
Returns true if the attribute has a default value. | |
SBValue | getMinimum (const SBValue &object) const |
Returns the attribute's minimum value from the object . | |
bool | hasMinimum () const noexcept |
Returns true if the attribute has a minimum value. | |
SBValue | getMaximum (const SBValue &object) const |
Returns the attribute's maximum value from the object . | |
bool | hasMaximum () const noexcept |
Returns true if the attribute has a maximum value. | |
SBValue | getSingleStep (const SBValue &object) const |
Returns the attribute's single step from the object . | |
bool | hasSingleStep () const noexcept |
Returns true if the attribute has a single step value. | |
std::string | getSuffix (const SBValue &object) const |
Returns the attribute's suffix from the object . | |
int | getCount (const SBValue &object) const |
Returns the number of items of the attribute for the object . | |
int | getCurrentIndex (const SBValue &object) const |
Returns the attribute's current index from the object . | |
void | setCurrentIndex (const SBValue &object, const int &index) const |
Sets the attribute's current index in the object to a specific index . | |
std::string | getItemText (const SBValue &object, const int &index) const |
Returns the attribute's text for the index from the object . | |
std::string | getToolTip (const SBValue &object) const |
Returns the tool tip of the attribute. | |
bool | getEnabledFlag (const SBValue &object) const |
Returns true if the attribute should be enabled in the Inspector. | |
bool | getVisibilityFlag (const SBValue &object) const |
Returns true if the attribute should be visible in the Inspector. | |
|
strong |