[Feedback] p0249r0: Input Device for 2D graphics

286 views
Skip to first unread message

A. Joël Lamotte

unread,
Feb 20, 2016, 4:20:01 PM2/20/16
to SG13 - HMI
Hi,

I just read p0249r0 but I might have missed a few points.
I must first say that I am happy that the input subject have been worked on. I tried to write something
similar but I am still not satisfied (and very frustrated) with my researches on the subject so far.

Here are a few first questions and opinions:

1. I do not think that asking implementers to use inheritance here will be useful a good thing 
for a lot of reasons (mainly intrusivity, future-proofness, composition and potential optimizations).
Consider using type-erasing types instead of inheritance (see "concept based polymorphism" if you don't already know about it, or similar techniques).

2. Did you consider separating the proposal into a low-level system event library and a higher level event/signal/observer library which would work well with the first library?

3. I'm not sure having "for 2D graphics" is a good point for an input system.
In particular today, we are exposed to an explosing varierty of input systems for different usages in a lot of different domains.
Focusing on interractive 2d graphics only might give a useful interface for some stuffs but certainly not for input acquisition in general.

Here's for now.

Joël Lamotte


Cleiton Santoia

unread,
Feb 21, 2016, 9:38:35 PM2/21/16
to SG13 - HMI

How about use iterators to get the events?

Klaim - Joël Lamotte

unread,
Feb 22, 2016, 9:35:25 AM2/22/16
to sg...@isocpp.org
On 22 February 2016 at 03:38, Cleiton Santoia <cleiton...@gmail.com> wrote:

How about use iterators to get the events?



Personally I do not think that it's a good use case for iterators.
Maybe generator functions would make more sense.

 

--
You received this message because you are subscribed to the Google Groups "SG13 - HMI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sg13+uns...@isocpp.org.
To post to this group, send email to sg...@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/sg13/.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/sg13/71ba6042-5d76-446b-8771-592ca3a82a47%40isocpp.org.

Cleiton Santoia

unread,
Feb 22, 2016, 12:50:25 PM2/22/16
to SG13 - HMI

Personally I do not think that it's a good use case for iterators.
Maybe generator functions would make more sense.

   Well, first of all you won't need the base class event_base
   And if you want you can understand each device as a "event generator"
 

nwcp...@gmail.com

unread,
Mar 6, 2016, 12:52:43 PM3/6/16
to SG13 - HMI
Thanks Joel for the comments and I did reply earlier via gmail, yet it did not get back to this post.

I did split Low-Level Device Driver into the Portable Interrupt Library from the IO proposal. The paper should have been D0249r1.

With that, it will provide a greater degree of flexibility to accommodate other event types that maybe not affect 2D surface at all.

As for Type-Erasure, both value and object oriented based type erasure is supported. I think that the library will need to be made more extensively so that can be demonstrated.

Thank you very much,

Brett
Reply all
Reply to author
Forward
0 new messages