* Convert this set to an array * * @param OutArray - the result array */
| 207 | * @param OutArray - the result array |
| 208 | */ |
| 209 | FORCEINLINE FLuaArray* ToArray(void *OutArray) const |
| 210 | { |
| 211 | if (ElementInterface && OutArray) |
| 212 | { |
| 213 | FScriptArray *ScriptArray = new FScriptArray; |
| 214 | //ArrayProperty->InitializeValue(ScriptArray); // do nothing... |
| 215 | FLuaArray *LuaArray = new(OutArray) FLuaArray(ScriptArray, ElementInterface, FLuaArray::OwnedBySelf); |
| 216 | int32 i = -1, Size = Set->Num(); |
| 217 | while (Size > 0) |
| 218 | { |
| 219 | if (IsValidIndex(++i)) |
| 220 | { |
| 221 | LuaArray->Add(Set->GetData(i, SetLayout)); |
| 222 | --Size; |
| 223 | } |
| 224 | } |
| 225 | return LuaArray; |
| 226 | } |
| 227 | return nullptr; |
| 228 | } |
| 229 | |
| 230 | FScriptSet *Set; |
| 231 | FScriptSetLayout SetLayout; |
no test coverage detected