Definition at line 185 of file service.cc.
◆ EnumListParameter()
dart::EnumListParameter::EnumListParameter |
( |
const char * |
name, |
|
|
bool |
required, |
|
|
const char *const * |
enums |
|
) |
| |
|
inline |
Definition at line 187 of file service.cc.
const char * name() const
MethodParameter(const char *name, bool required)
◆ Parse()
const char ** dart::EnumListParameter::Parse |
( |
char * |
value | ) |
const |
|
inline |
Definition at line 194 of file service.cc.
194 {
195 const char* kJsonChars = " \t\r\n[,]";
196
197
198 intptr_t element_count = ElementCount(
value);
199 if (element_count < 0) {
200 return nullptr;
201 }
202 intptr_t element_pos = 0;
203
204
205
206 char** elements = new char*[element_count + 1];
207 elements[element_count] = nullptr;
208
209
210 while (element_pos < element_count) {
211
213
214 intptr_t
len = strcspn(
value, kJsonChars);
217 elements[element_pos++] =
value;
218
219
221 }
222 return const_cast<const char**>(elements);
223 }
◆ Validate()
virtual bool dart::EnumListParameter::Validate |
( |
const char * |
value | ) |
const |
|
inlinevirtual |
The documentation for this class was generated from the following file: