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

Specialization for a vector of strings. More...

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

Public Member Functions

bool fromString (IUIDescription const *iDescription, std::string const &iAttributeValue, std::vector< std::string > &oValue) const override
 
 VectorStringAttribute (std::string const &iName, typename super_type::Getter iGetter, typename super_type::Setter iSetter, char iDelimiter=',', bool iSkipEmptyEntries=false)
 
- 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...
 
IViewCreator::AttrType getType () override
 
 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)
 

Protected Attributes

char fDelimiter
 
bool fSkipEmptyEntries
 

Private Types

using super_type = ByRefAttribute< std::vector< std::string > >
 

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 >::VectorStringAttribute

Specialization for a vector of strings.

Note that the strings are assumed to be UTF8 encoded strings.

Member Typedef Documentation

◆ super_type

using super_type = ByRefAttribute<std::vector<std::string> >
private

Constructor & Destructor Documentation

◆ VectorStringAttribute()

VectorStringAttribute ( std::string const &  iName,
typename super_type::Getter  iGetter,
typename super_type::Setter  iSetter,
char  iDelimiter = ',',
bool  iSkipEmptyEntries = false 
)
inline

Member Function Documentation

◆ fromString()

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

Member Data Documentation

◆ fDelimiter

char fDelimiter
protected

◆ fSkipEmptyEntries

bool fSkipEmptyEntries
protected

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