Extern support for creating iterators
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
0d30d788e9
commit
7523fb4294
|
@ -1 +1,11 @@
|
|||
#include "UserDataCollectionIterator.hpp"
|
||||
|
||||
namespace Porygon::UserData{
|
||||
extern "C"{
|
||||
UserDataCollectionIterator* CreateCollectionIterator(const Evaluation::EvalValue* (*getCurrent)(),
|
||||
const Evaluation::EvalValue* (*moveNext)(),
|
||||
const Evaluation::EvalValue* (*reset)()){
|
||||
return new UserDataCollectionIterator(getCurrent, moveNext, reset);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,7 +21,7 @@ namespace Porygon::UserData{
|
|||
return _getCurrent();
|
||||
}
|
||||
bool MoveNext() final{
|
||||
_moveNext();
|
||||
return _moveNext();
|
||||
}
|
||||
void Reset() final{
|
||||
_reset();
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
#include "UserDataCollectionRangeIterator.hpp"
|
||||
|
||||
namespace Porygon::UserData{
|
||||
extern "C"{
|
||||
UserDataCollectionRangeIterator* CreateCollectionRangeIterator(size_t start, size_t end){
|
||||
return new UserDataCollectionRangeIterator(start, end);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue