Jamba C++ API  4.3.0
TCustomViewCreator< TView >::BooleanAttribute Class Reference

Specialization for the boolean attribute. More...

Inherits TCustomViewCreator< TView >::TAttribute< T, TGetter, TSetter >.

Public Member Functions

 BooleanAttribute (std::string const &iName, typename ByValAttribute< bool >::Getter iGetter, typename ByValAttribute< bool >::Setter iSetter)
 
bool fromString (IUIDescription const *iDescription, std::string const &iAttributeValue, bool &oValue) const override
 
IViewCreator::AttrType getType () override
 
- Public Member Functions inherited from TCustomViewCreator< TView >::TAttribute< T, TGetter, TSetter >
bool apply (CView *iView, const UIAttributes &iAttributes, const IUIDescription *iDescription) override
 apply => calls the setter on the view to set the attribute (use fromString) More...
 
virtual bool fromString (IUIDescription const *iDescription, std::string const &iAttributeValue, T &oValue) const
 Subclasses need to implement this method to convert a string (iAttributeValue) to a T. More...
 
 TAttribute (std::string const &iName, Getter iGetter, Setter iSetter)
 
- Public Member Functions inherited from ViewAttribute
std::string getName () const
 Name of the attribute (which ends up being an attribute in the xml file) Ex: <view back-color="~ BlackCColor" .../> => back-color. More...
 
 ViewAttribute (std::string iName)
 

Additional Inherited Members

- Public Types inherited from TCustomViewCreator< TView >::TAttribute< T, TGetter, TSetter >
using Getter = TGetter
 
using Setter = TSetter
 

Detailed Description

template<typename TView>
class pongasoft::VST::GUI::Views::TCustomViewCreator< TView >::BooleanAttribute

Specialization for the boolean attribute.

The view must have getter and setter as defined by the types below.

Constructor & Destructor Documentation

◆ BooleanAttribute()

BooleanAttribute ( std::string const &  iName,
typename ByValAttribute< bool >::Getter  iGetter,
typename ByValAttribute< bool >::Setter  iSetter 
)
inline

Member Function Documentation

◆ fromString()

bool fromString ( IUIDescription const *  iDescription,
std::string const &  iAttributeValue,
bool &  oValue 
) const
inlineoverride

◆ getType()

IViewCreator::AttrType getType ( )
inlineoverridevirtual
Returns
the type of this attribute => subclass will define it

Reimplemented from TCustomViewCreator< TView >::TAttribute< T, TGetter, TSetter >.


The documentation for this class was generated from the following file: