|
| AudacityHostAttributeList () |
|
virtual | ~AudacityHostAttributeList () |
|
tresult PLUGIN_API | setInt (AttrID aid, int64 value) SMTG_OVERRIDE |
|
tresult PLUGIN_API | getInt (AttrID aid, int64 &value) SMTG_OVERRIDE |
|
tresult PLUGIN_API | setFloat (AttrID aid, double value) SMTG_OVERRIDE |
|
tresult PLUGIN_API | getFloat (AttrID aid, double &value) SMTG_OVERRIDE |
|
tresult PLUGIN_API | setString (AttrID aid, const TChar *string) SMTG_OVERRIDE |
|
tresult PLUGIN_API | getString (AttrID aid, TChar *string, uint32 sizeInBytes) SMTG_OVERRIDE |
|
tresult PLUGIN_API | setBinary (AttrID aid, const void *data, uint32 sizeInBytes) SMTG_OVERRIDE |
|
tresult PLUGIN_API | getBinary (AttrID aid, const void *&data, uint32 &sizeInBytes) SMTG_OVERRIDE |
|
◆ AudacityHostAttributeList()
AudacityHostAttributeList::AudacityHostAttributeList |
( |
| ) |
|
|
inline |
◆ ~AudacityHostAttributeList()
virtual AudacityHostAttributeList::~AudacityHostAttributeList |
( |
| ) |
|
|
inlinevirtual |
◆ getBinary()
tresult PLUGIN_API AudacityHostAttributeList::getBinary |
( |
AttrID |
aid, |
|
|
const void *& |
data, |
|
|
uint32 & |
sizeInBytes |
|
) |
| |
|
inline |
Definition at line 199 of file AudacityVst3HostApplication.cpp.
200 {
201 if (!aid)
202 return kInvalidArgument;
203 auto it =
list.find(aid);
204 if (it !=
list.end() && it->second)
205 {
206 data = it->second->binaryValue(sizeInBytes);
207 return kResultTrue;
208 }
209 sizeInBytes = 0;
210 return kResultFalse;
211 }
std::map< std::string, std::unique_ptr< AudacityHostAttribute > > list
References list.
◆ getFloat()
tresult PLUGIN_API AudacityHostAttributeList::getFloat |
( |
AttrID |
aid, |
|
|
double & |
value |
|
) |
| |
|
inline |
Definition at line 144 of file AudacityVst3HostApplication.cpp.
145 {
146 if (!aid)
147 return kInvalidArgument;
148 auto it =
list.find(aid);
149 if (it !=
list.end() && it->second)
150 {
151 value = it->second->floatValue();
152 return kResultTrue;
153 }
154 return kResultFalse;
155 }
References list.
◆ getInt()
tresult PLUGIN_API AudacityHostAttributeList::getInt |
( |
AttrID |
aid, |
|
|
int64 & |
value |
|
) |
| |
|
inline |
Definition at line 122 of file AudacityVst3HostApplication.cpp.
123 {
124 if (!aid)
125 return kInvalidArgument;
126 auto it =
list.find(aid);
127 if (it !=
list.end() && it->second)
128 {
129 value = it->second->intValue();
130 return kResultTrue;
131 }
132 return kResultFalse;
133 }
References list.
◆ getString()
tresult PLUGIN_API AudacityHostAttributeList::getString |
( |
AttrID |
aid, |
|
|
TChar * |
string, |
|
|
uint32 |
sizeInBytes |
|
) |
| |
|
inline |
Definition at line 168 of file AudacityVst3HostApplication.cpp.
170 {
171 if (!aid)
172 return kInvalidArgument;
173
174 auto it =
list.find(aid);
175 if (it !=
list.end() && it->second)
176 {
177 uint32 sizeInCodeUnit = 0;
178 const TChar* _string = it->second->stringValue(sizeInCodeUnit);
179 memcpy(
180 string, _string,
181 std::min<uint32>(sizeInCodeUnit * sizeof(TChar), sizeInBytes));
182 return kResultTrue;
183 }
184
185 return kResultFalse;
186 }
References list.
◆ removeAttrID()
void AudacityHostAttributeList::removeAttrID |
( |
AttrID |
aid | ) |
|
|
inlineprotected |
◆ setBinary()
tresult PLUGIN_API AudacityHostAttributeList::setBinary |
( |
AttrID |
aid, |
|
|
const void * |
data, |
|
|
uint32 |
sizeInBytes |
|
) |
| |
|
inline |
Definition at line 189 of file AudacityVst3HostApplication.cpp.
190 {
191 if (!aid)
192 return kInvalidArgument;
194 list[aid] = std::make_unique<AudacityHostAttribute>(data, sizeInBytes);
195 return kResultTrue;
196 }
void removeAttrID(AttrID aid)
References list, and removeAttrID().
◆ setFloat()
tresult PLUGIN_API AudacityHostAttributeList::setFloat |
( |
AttrID |
aid, |
|
|
double |
value |
|
) |
| |
|
inline |
◆ setInt()
tresult PLUGIN_API AudacityHostAttributeList::setInt |
( |
AttrID |
aid, |
|
|
int64 |
value |
|
) |
| |
|
inline |
◆ setString()
tresult PLUGIN_API AudacityHostAttributeList::setString |
( |
AttrID |
aid, |
|
|
const TChar * |
string |
|
) |
| |
|
inline |
Definition at line 157 of file AudacityVst3HostApplication.cpp.
158 {
159 if (!aid)
160 return kInvalidArgument;
162
163 auto length = tstrlen(string);
164 list[aid] = std::make_unique<AudacityHostAttribute>(
string, length + 1);
165 return kResultTrue;
166 }
References list, and removeAttrID().
◆ list
The documentation for this class was generated from the following file: