Extern support for creating iterators
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1 +1,11 @@
|
|||||||
#include "UserDataCollectionIterator.hpp"
|
#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();
|
return _getCurrent();
|
||||||
}
|
}
|
||||||
bool MoveNext() final{
|
bool MoveNext() final{
|
||||||
_moveNext();
|
return _moveNext();
|
||||||
}
|
}
|
||||||
void Reset() final{
|
void Reset() final{
|
||||||
_reset();
|
_reset();
|
||||||
|
|||||||
@@ -1 +1,9 @@
|
|||||||
#include "UserDataCollectionRangeIterator.hpp"
|
#include "UserDataCollectionRangeIterator.hpp"
|
||||||
|
|
||||||
|
namespace Porygon::UserData{
|
||||||
|
extern "C"{
|
||||||
|
UserDataCollectionRangeIterator* CreateCollectionRangeIterator(size_t start, size_t end){
|
||||||
|
return new UserDataCollectionRangeIterator(start, end);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user