Ticket #190 (new todo)

Opened 3 years ago

Last modified 4 months ago

piggyback iterator

Reported by: ichthyo Owned by:
Priority: lesser Milestone: 2beta
Component: lumiera Keywords: interfaces, lib
Cc: Blocked By: #182
Blocking: #283, #320

Description

Create an opaque holder, allowing to pass an iterator "piggyback" thorugh C interfaces.

This is an obvious extension, and while we don't need it right now, we'll need it quite sure when the Session interface matures. Because usually iterators are implemented as lightweight value objects (typically with 2 pointers), it isn't difficult to "shock freeze" them into a small array (of implementation dependant size) and revive them on the other side basically with zero overhead.

Change History

comment:1 Changed 2 years ago by ichthyo

  • Blocking 283 added

comment:2 Changed 2 years ago by ichthyo

  • Blocking 320 added

comment:3 Changed 2 years ago by ichthyo

  • Blocking 182 removed
  • Blocked By 182 added

comment:4 Changed 4 months ago by ichthyo

hint: the PolymorphicValue template implements the same idea in a way more general frame, allowing to pass subclasses within an opaque package. When stripping most of the involved metaprogramming magic, we should be almost there...

Yet I still think we should have a dedicated small template for piggybacking iterators, instead of (ab)using PolymorphicValue for this purpose. Still the more since iterators in Lumiera (and in the STL as well) aren't derived from a base class.

Note: See TracTickets for help on using tickets.