Class SBCClassAttribute#
This class describes a class attribute in a class proxy.
#include "SBCClassAttribute.hpp"
Public Types#
| Type | Name |
|---|---|
| enum | Access Available attribute accesses. |
| enum | Type Available attribute types. |
Public Functions#
| Type | Name |
|---|---|
| SBCClassAttribute (SBValue attributeType, SBCClassAttribute::Access access, SBCClassAttribute::Type type, const std::string & attributeName, const std::string & attributeDescription, const std::string & attributeGroup, bool staticFlag) Constructs a class attribute. |
|
| SBCClassAttribute (SBValue attributeType, SBCClassAttribute::Access access, SBCClassAttribute::Type type, const std::string & attributeName, const std::string & attributeDescription, const std::string & attributeGroup, bool staticFlag, 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. |
|
| void | clear (const SBValue & object) const Clears the value of the attribute when possible. |
| SBValue | get (const SBValue & object) const Gets the attribute from the object . |
| SBCClassAttribute::Access | getAccess () const Returns the access of the attribute. |
| SBValue | getAttributeType () const Returns the type of the attribute value. |
| 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 . |
| SBCClassAttributeData * | getDataPointer () |
| const SBCClassAttributeData * | getDataPointer () const |
| SBValue | getDefault (const SBValue & object) const Returns the attribute's default value from the object . |
| std::string | getDescription () const Returns the description of the attribute. |
| bool | getEnabledFlag (const SBValue & object) const Returns true if the attribute should be enabled in the Inspector. |
| std::string | getGroup () const Returns the group of the attribute. |
| std::string | getItemText (const SBValue & object, const int & index) const Returns the attribute's text for the index from theobject . |
| SBValue | getMaximum (const SBValue & object) const Returns the attribute's maximum value from the object . |
| SBValue | getMinimum (const SBValue & object) const Returns the attribute's minimum value from the object . |
| std::string | getName () const Returns the name of the attribute. |
| SBValue | getSingleStep (const SBValue & object) const Returns the attribute's single step from the object . |
| unsigned int | getSize (const SBValue & object) const Returns the size of the array attribute in the object when relevant. |
| bool | getStaticFlag () const Returns whether the attribute is static. |
| std::string | getSuffix (const SBValue & object) const Returns the attribute's suffix from the object . |
| std::string | getToolTip (const SBValue & object) const Returns the tool tip of the attribute. |
| SBCClassAttribute::Type | getType () const Returns the type of the attribute. |
| bool | getVisibilityFlag (const SBValue & object) const Returns true if the attribute should be visible in the Inspector. |
| bool | has (const SBValue & object) const Returns whether the attribute has a value when the attribute is clearable. |
| bool | hasDefault () noexcept const Returns true if the attribute has a default value. |
| bool | hasMaximum () noexcept const Returns true if the attribute has a maximum value. |
| bool | hasMinimum () noexcept const Returns true if the attribute has a minimum value. |
| bool | hasSingleStep () noexcept const Returns true if the attribute has a single step value. |
| void | set (const SBValue & object, const SBValue & value, const SBValue & size=SBValue()) const Sets the attribute in the object to a specificvalue . |
| void | setClearFunction (SBFunction * function) Sets the clear function. |
| void | setCurrentIndex (const SBValue & object, const int & index) const Sets the attribute's current index in the object to a specificindex . |
| void | setGetCountFunction (SBFunction * function) Sets the getCount function. |
| void | setGetCurrentIndexFunction (SBFunction * function) Sets the getCurrentIndex function. |
| void | setGetDefaultFunction (SBFunction * function) Sets the getDefault function. |
| void | setGetEnabledFlagFunction (SBFunction * function) Sets the getEnabledFlag function. |
| void | setGetFunction (SBFunction * function) Sets the get function. |
| void | setGetItemTextFunction (SBFunction * function) Sets the getItemText function. |
| void | setGetMaximumFunction (SBFunction * function) Sets the getMaximum function. |
| void | setGetMinimumFunction (SBFunction * function) Sets the getMinimum function. |
| void | setGetSingleStepFunction (SBFunction * function) Sets the getSingleStep function. |
| void | setGetSizeFunction (SBFunction * function) Sets the getSize function. |
| void | setGetSuffixFunction (SBFunction * function) Sets the getSuffix function. |
| void | setGetToolTipFunction (SBFunction * function) Sets the getToolTip function. |
| void | setGetVisibilityFlagFunction (SBFunction * function) Sets the getVisibilityFlag function. |
| void | setHasFunction (SBFunction * function) Sets the has function. |
| void | setSetCurrentIndexFunction (SBFunction * function) Sets the setCurrentIndex function. |
| void | setSetFunction (SBFunction * function) Sets the set function. |
| ~SBCClassAttribute () Destructs the class attribute. |
Public Types Documentation#
enum Access#
Available attribute accesses.
enum Type#
Available attribute types.
enum SBCClassAttribute::Type {
Scalar = 0,
Array = 1,
Range = 2,
Slider = 3,
List = 4,
RichText = 5,
PushButton = 6,
ImagePath = 7,
ImageBase64 = 8
};
Public Functions Documentation#
function SBCClassAttribute [1/2]#
Constructs a class attribute.
SBCClassAttribute::SBCClassAttribute (
SBValue attributeType,
SBCClassAttribute::Access access,
SBCClassAttribute::Type type,
const std::string & attributeName,
const std::string & attributeDescription,
const std::string & attributeGroup,
bool staticFlag
)
function SBCClassAttribute [2/2]#
Constructs a class attribute.
SBCClassAttribute::SBCClassAttribute (
SBValue attributeType,
SBCClassAttribute::Access access,
SBCClassAttribute::Type type,
const std::string & attributeName,
const std::string & attributeDescription,
const std::string & attributeGroup,
bool staticFlag,
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
)
function clear#
Clears the value of the attribute when possible.
function get#
Gets the attribute from the object .
function getAccess#
Returns the access of the attribute.
function getAttributeType#
Returns the type of the attribute value.
function getCount#
Returns the number of items of the attribute for the object .
function getCurrentIndex#
Returns the attribute's current index from the object .
function getDataPointer [1/2]#
function getDataPointer [2/2]#
function getDefault#
Returns the attribute's default value from the object .
function getDescription#
Returns the description of the attribute.
function getEnabledFlag#
Returns true if the attribute should be enabled in the Inspector.
function getGroup#
Returns the group of the attribute.
function getItemText#
Returns the attribute's text for the index from theobject .
function getMaximum#
Returns the attribute's maximum value from the object .
function getMinimum#
Returns the attribute's minimum value from the object .
function getName#
Returns the name of the attribute.
function getSingleStep#
Returns the attribute's single step from the object .
function getSize#
Returns the size of the array attribute in the object when relevant.
function getStaticFlag#
Returns whether the attribute is static.
function getSuffix#
Returns the attribute's suffix from the object .
function getToolTip#
Returns the tool tip of the attribute.
function getType#
Returns the type of the attribute.
function getVisibilityFlag#
Returns true if the attribute should be visible in the Inspector.
function has#
Returns whether the attribute has a value when the attribute is clearable.
function hasDefault#
Returns true if the attribute has a default value.
function hasMaximum#
Returns true if the attribute has a maximum value.
function hasMinimum#
Returns true if the attribute has a minimum value.
function hasSingleStep#
Returns true if the attribute has a single step value.
function set#
Sets the attribute in the object to a specificvalue .
void SBCClassAttribute::set (
const SBValue & object,
const SBValue & value,
const SBValue & size=SBValue ()
) const
function setClearFunction#
Sets the clear function.
function setCurrentIndex#
Sets the attribute's current index in the object to a specificindex .
function setGetCountFunction#
Sets the getCount function.
function setGetCurrentIndexFunction#
Sets the getCurrentIndex function.
function setGetDefaultFunction#
Sets the getDefault function.
function setGetEnabledFlagFunction#
Sets the getEnabledFlag function.
function setGetFunction#
Sets the get function.
function setGetItemTextFunction#
Sets the getItemText function.
function setGetMaximumFunction#
Sets the getMaximum function.
function setGetMinimumFunction#
Sets the getMinimum function.
function setGetSingleStepFunction#
Sets the getSingleStep function.
function setGetSizeFunction#
Sets the getSize function.
function setGetSuffixFunction#
Sets the getSuffix function.
function setGetToolTipFunction#
Sets the getToolTip function.
function setGetVisibilityFlagFunction#
Sets the getVisibilityFlag function.
function setHasFunction#
Sets the has function.
function setSetCurrentIndexFunction#
Sets the setCurrentIndex function.
function setSetFunction#
Sets the set function.
function ~SBCClassAttribute#
Destructs the class attribute.