VSTGUI  4.10
Graphical User Interface Framework not only for VST plugins
UIAttributes Class Reference
+ Inheritance diagram for UIAttributes:

Public Types

using StringArray = std::vector< std::string >
 

Public Member Functions

 UIAttributes (UTF8StringPtr *attributes=nullptr)
 
 UIAttributes (size_t reserve)
 
 ~UIAttributes () noexcept override=default
 
bool hasAttribute (const std::string &name) const
 
const std::string * getAttributeValue (const std::string &name) const
 
void setAttribute (const std::string &name, const std::string &value)
 
void setAttribute (const std::string &name, std::string &&value)
 
void setAttribute (std::string &&name, std::string &&value)
 
void removeAttribute (const std::string &name)
 
void setBooleanAttribute (const std::string &name, bool value)
 
bool getBooleanAttribute (const std::string &name, bool &value) const
 
void setIntegerAttribute (const std::string &name, int32_t value)
 
bool getIntegerAttribute (const std::string &name, int32_t &value) const
 
void setDoubleAttribute (const std::string &name, double value)
 
bool getDoubleAttribute (const std::string &name, double &value) const
 
void setPointAttribute (const std::string &name, const CPoint &p)
 
bool getPointAttribute (const std::string &name, CPoint &p) const
 
void setRectAttribute (const std::string &name, const CRect &r)
 
bool getRectAttribute (const std::string &name, CRect &r) const
 
void setStringArrayAttribute (const std::string &name, const StringArray &values)
 
bool getStringArrayAttribute (const std::string &name, StringArray &values) const
 
void removeAll ()
 
bool store (OutputStream &stream) const
 
bool restore (InputStream &stream)
 
- Public Member Functions inherited from ReferenceCounted< T >
 ReferenceCounted ()=default
 
virtual ~ReferenceCounted () noexcept=default
 
 ReferenceCounted (const ReferenceCounted &)
 
ReferenceCountedoperator= (const ReferenceCounted &)
 
void forget () override
 decrease refcount and delete object if refcount == 0 More...
 
void remember () override
 increase refcount More...
 
virtual int32_t getNbReference () const
 get refcount More...
 
virtual void beforeDelete ()
 

Static Public Member Functions

static std::string pointToString (CPoint p)
 
static bool stringToPoint (const std::string &str, CPoint &p)
 
static std::string doubleToString (double value, uint32_t precision=6)
 
static bool stringToDouble (const std::string &str, double &value)
 
static std::string boolToString (bool value)
 
static bool stringToBool (const std::string &str, bool &value)
 
static std::string integerToString (int32_t value)
 
static bool stringToInteger (const std::string &str, int32_t &value)
 
static std::string rectToString (CRect r, uint32_t precision=6)
 
static bool stringToRect (const std::string &str, CRect &r)
 
static std::string stringArrayToString (const StringArray &values)
 
static bool stringToStringArray (const std::string &str, StringArray &values)
 

Member Typedef Documentation

◆ StringArray

using StringArray = std::vector<std::string>

Constructor & Destructor Documentation

◆ UIAttributes() [1/2]

UIAttributes ( UTF8StringPtr attributes = nullptr)
explicit

◆ UIAttributes() [2/2]

UIAttributes ( size_t  reserve)
explicit

◆ ~UIAttributes()

~UIAttributes ( )
overridedefaultnoexcept

Member Function Documentation

◆ boolToString()

std::string boolToString ( bool  value)
static

◆ doubleToString()

std::string doubleToString ( double  value,
uint32_t  precision = 6 
)
static

◆ getAttributeValue()

const std::string * getAttributeValue ( const std::string &  name) const

◆ getBooleanAttribute()

bool getBooleanAttribute ( const std::string &  name,
bool &  value 
) const

◆ getDoubleAttribute()

bool getDoubleAttribute ( const std::string &  name,
double &  value 
) const

◆ getIntegerAttribute()

bool getIntegerAttribute ( const std::string &  name,
int32_t &  value 
) const

◆ getPointAttribute()

bool getPointAttribute ( const std::string &  name,
CPoint p 
) const

◆ getRectAttribute()

bool getRectAttribute ( const std::string &  name,
CRect r 
) const

◆ getStringArrayAttribute()

bool getStringArrayAttribute ( const std::string &  name,
StringArray values 
) const

◆ hasAttribute()

bool hasAttribute ( const std::string &  name) const

◆ integerToString()

std::string integerToString ( int32_t  value)
static

◆ pointToString()

std::string pointToString ( CPoint  p)
static

◆ rectToString()

std::string rectToString ( CRect  r,
uint32_t  precision = 6 
)
static

◆ removeAll()

void removeAll ( )
inline

◆ removeAttribute()

void removeAttribute ( const std::string &  name)

◆ restore()

bool restore ( InputStream stream)

◆ setAttribute() [1/3]

void setAttribute ( const std::string &  name,
const std::string &  value 
)

◆ setAttribute() [2/3]

void setAttribute ( const std::string &  name,
std::string &&  value 
)

◆ setAttribute() [3/3]

void setAttribute ( std::string &&  name,
std::string &&  value 
)

◆ setBooleanAttribute()

void setBooleanAttribute ( const std::string &  name,
bool  value 
)

◆ setDoubleAttribute()

void setDoubleAttribute ( const std::string &  name,
double  value 
)

◆ setIntegerAttribute()

void setIntegerAttribute ( const std::string &  name,
int32_t  value 
)

◆ setPointAttribute()

void setPointAttribute ( const std::string &  name,
const CPoint p 
)

◆ setRectAttribute()

void setRectAttribute ( const std::string &  name,
const CRect r 
)

◆ setStringArrayAttribute()

void setStringArrayAttribute ( const std::string &  name,
const StringArray values 
)

◆ store()

bool store ( OutputStream stream) const

◆ stringArrayToString()

std::string stringArrayToString ( const StringArray values)
static

◆ stringToBool()

bool stringToBool ( const std::string &  str,
bool &  value 
)
static

◆ stringToDouble()

bool stringToDouble ( const std::string &  str,
double &  value 
)
static

◆ stringToInteger()

bool stringToInteger ( const std::string &  str,
int32_t &  value 
)
static

◆ stringToPoint()

bool stringToPoint ( const std::string &  str,
CPoint p 
)
static

◆ stringToRect()

bool stringToRect ( const std::string &  str,
CRect r 
)
static

◆ stringToStringArray()

bool stringToStringArray ( const std::string &  str,
StringArray values 
)
static

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