New upstream version 8.1.0

This commit is contained in:
geos_one
2025-08-10 01:34:16 +02:00
commit c891bb7105
4398 changed files with 838833 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
#ifndef CURSOR_H_
#define CURSOR_H_
#include <boost/make_shared.hpp>
#include <boost/shared_ptr.hpp>
template<typename Obj>
class Cursor
{
public:
typedef Obj ElementType;
private:
class SourceBase
{
public:
virtual ~SourceBase() {}
virtual bool step() = 0;
virtual ElementType* get() = 0;
};
template<typename Inner>
class Source : public SourceBase
{
public:
Source(Inner inner)
: inner(inner)
{
}
bool step()
{
return inner.step();
}
ElementType* get()
{
return inner.get();
}
private:
Inner inner;
};
public:
template<typename Inner>
explicit Cursor(Inner inner)
: source(boost::make_shared<Source<Inner> >(inner) )
{
}
bool step()
{
return source->step();
}
ElementType* get()
{
return source->get();
}
private:
boost::shared_ptr<SourceBase> source;
};
#endif