Web Analytics Made Easy - Statcounter
Skip to content

Class SBCClassAttribute#

ClassList > SBCClassAttribute

This class describes a class attribute in a class proxy.

  • #include <SBCClassAttribute.hpp>

Public Types#

Type Name
enum Type

Public Functions#

Type Name
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.
SB_DECLARE_DATA (SBCClassAttribute)
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 .
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 .
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.
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 Type#

enum SBCClassAttribute::Type {
    ReadOnly = 0,
    ReadWrite = 1,
    ReadWriteClear = 2,
    ReadWriteClearArray = 3,
    ReadWriteRange = 10,
    ReadWriteRangeSlider = 11,
    ReadWriteList = 20,
    RichTextReadOnly = 30,
    RichTextReadWrite = 31,
    RichTextReadWriteClear = 32,
    PushButton = 40,
    ImagePathReadOnly = 50,
    ImagePathReadWrite = 51,
    ImagePathReadWriteClear = 52,
    ImageBase64ReadOnly = 53,
    ImageBase64ReadWrite = 54,
    ImageBase64ReadWriteClear = 55
};

Public Functions Documentation#

function SBCClassAttribute [1/2]#

Constructs a class attribute.

SBCClassAttribute::SBCClassAttribute (
    SBValue attributeType,
    SBCClassAttribute::Type type,
    const std::string & attributeName,
    const std::string & attributeDescription,
    const std::string & attributeGroup
) 


function SBCClassAttribute [2/2]#

Constructs a class attribute.

SBCClassAttribute::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
) 


function SB_DECLARE_DATA#

SBCClassAttribute::SB_DECLARE_DATA (
    SBCClassAttribute
) 

function clear#

Clears the value of the attribute when possible.

void SBCClassAttribute::clear (
    const SBValue & object
) const


function get#

Gets the attribute from the object .

SBValue SBCClassAttribute::get (
    const SBValue & object
) const


function getAttributeType#

Returns the type of the attribute value.

SBValue SBCClassAttribute::getAttributeType () const


function getCount#

Returns the number of items of the attribute for the object .

int SBCClassAttribute::getCount (
    const SBValue & object
) const


function getCurrentIndex#

Returns the attribute's current index from the object .

int SBCClassAttribute::getCurrentIndex (
    const SBValue & object
) const


function getDefault#

Returns the attribute's default value from the object .

SBValue SBCClassAttribute::getDefault (
    const SBValue & object
) const


function getDescription#

Returns the description of the attribute.

std::string SBCClassAttribute::getDescription () const


function getEnabledFlag#

Returns true if the attribute should be enabled in the Inspector.

bool SBCClassAttribute::getEnabledFlag (
    const SBValue & object
) const


function getGroup#

Returns the group of the attribute.

std::string SBCClassAttribute::getGroup () const


function getItemText#

Returns the attribute's text for the index from theobject .

std::string SBCClassAttribute::getItemText (
    const SBValue & object,
    const int & index
) const


function getMaximum#

Returns the attribute's maximum value from the object .

SBValue SBCClassAttribute::getMaximum (
    const SBValue & object
) const


function getMinimum#

Returns the attribute's minimum value from the object .

SBValue SBCClassAttribute::getMinimum (
    const SBValue & object
) const


function getName#

Returns the name of the attribute.

std::string SBCClassAttribute::getName () const


function getSingleStep#

Returns the attribute's single step from the object .

SBValue SBCClassAttribute::getSingleStep (
    const SBValue & object
) const


function getSize#

Returns the size of the array attribute in the object when relevant.

unsigned int SBCClassAttribute::getSize (
    const SBValue & object
) const


function getSuffix#

Returns the attribute's suffix from the object .

std::string SBCClassAttribute::getSuffix (
    const SBValue & object
) const


function getToolTip#

Returns the tool tip of the attribute.

std::string SBCClassAttribute::getToolTip (
    const SBValue & object
) const


function getType#

Returns the type of the attribute.

SBCClassAttribute::Type SBCClassAttribute::getType () const


function getVisibilityFlag#

Returns true if the attribute should be visible in the Inspector.

bool SBCClassAttribute::getVisibilityFlag (
    const SBValue & object
) const


function has#

Returns whether the attribute has a value when the attribute is clearable.

bool SBCClassAttribute::has (
    const SBValue & object
) const


function hasDefault#

Returns true if the attribute has a default value.

bool SBCClassAttribute::hasDefault () noexcept const


function hasMaximum#

Returns true if the attribute has a maximum value.

bool SBCClassAttribute::hasMaximum () noexcept const


function hasMinimum#

Returns true if the attribute has a minimum value.

bool SBCClassAttribute::hasMinimum () noexcept const


function hasSingleStep#

Returns true if the attribute has a single step value.

bool SBCClassAttribute::hasSingleStep () noexcept const


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.

void SBCClassAttribute::setClearFunction (
    SBFunction * function
) 


function setCurrentIndex#

Sets the attribute's current index in the object to a specificindex .

void SBCClassAttribute::setCurrentIndex (
    const SBValue & object,
    const int & index
) const


function setGetCountFunction#

Sets the getCount function.

void SBCClassAttribute::setGetCountFunction (
    SBFunction * function
) 


function setGetCurrentIndexFunction#

Sets the getCurrentIndex function.

void SBCClassAttribute::setGetCurrentIndexFunction (
    SBFunction * function
) 


function setGetDefaultFunction#

Sets the getDefault function.

void SBCClassAttribute::setGetDefaultFunction (
    SBFunction * function
) 


function setGetEnabledFlagFunction#

Sets the getEnabledFlag function.

void SBCClassAttribute::setGetEnabledFlagFunction (
    SBFunction * function
) 


function setGetFunction#

Sets the get function.

void SBCClassAttribute::setGetFunction (
    SBFunction * function
) 


function setGetItemTextFunction#

Sets the getItemText function.

void SBCClassAttribute::setGetItemTextFunction (
    SBFunction * function
) 


function setGetMaximumFunction#

Sets the getMaximum function.

void SBCClassAttribute::setGetMaximumFunction (
    SBFunction * function
) 


function setGetMinimumFunction#

Sets the getMinimum function.

void SBCClassAttribute::setGetMinimumFunction (
    SBFunction * function
) 


function setGetSingleStepFunction#

Sets the getSingleStep function.

void SBCClassAttribute::setGetSingleStepFunction (
    SBFunction * function
) 


function setGetSizeFunction#

Sets the getSize function.

void SBCClassAttribute::setGetSizeFunction (
    SBFunction * function
) 


function setGetSuffixFunction#

Sets the getSuffix function.

void SBCClassAttribute::setGetSuffixFunction (
    SBFunction * function
) 


function setGetToolTipFunction#

Sets the getToolTip function.

void SBCClassAttribute::setGetToolTipFunction (
    SBFunction * function
) 


function setGetVisibilityFlagFunction#

Sets the getVisibilityFlag function.

void SBCClassAttribute::setGetVisibilityFlagFunction (
    SBFunction * function
) 


function setHasFunction#

Sets the has function.

void SBCClassAttribute::setHasFunction (
    SBFunction * function
) 


function setSetCurrentIndexFunction#

Sets the setCurrentIndex function.

void SBCClassAttribute::setSetCurrentIndexFunction (
    SBFunction * function
) 


function setSetFunction#

Sets the set function.

void SBCClassAttribute::setSetFunction (
    SBFunction * function
) 


function ~SBCClassAttribute#

Destructs the class attribute.

SBCClassAttribute::~SBCClassAttribute ()