Hi Marcus,

Marcus Lindblom wrote:
>>
>> Making a reflective interface is good, but having it work on data and a 
>> changed() function seems, to me, a bit awkward and error-prone. Are 
>> there other succesful systems that have used that?
> 
> Sorry for replying to myself again. 

As long as you don't sit in a corner talking to yourself we're not 
worried. ;)

> I was reading Dev/WindowGLFields and 
> figured that that problem might be related to this, and it would perhaps 
> not exist if field-set was done via member functions (setFoo()) rather 
> than data-copy (_sfFoo.copyFromBin())?

I don't think so. The GL fields are special, as some of the data is 
handled thread-safe, and some is not (to prevent syncs changing 
information that the upstream thread cannot have).

> Is it just a matter of how to generate the FooBase-code simply and 
> efficiently, and in the process stopping the user from implementing 
> set-functions with sideeffects altogether? If a fielddesc in .fcd could 
> be tagged with 'custom set function' (so that one must implement it in 
> Foo, otherwise it would be autogenerated as today, in FooBase), as well 
> as the sync-functions being a part of Foo (but in a separate cpp, 
> FooImpl.cpp), not FooBase (to allow access without virtual funcions), 
> this might have been an option?

Hmm, could be. I think Gerrit is experimenting with something like that 
for clearing Fields, depending on how that works out we might make it 
more general. It is done by calling explicitly into the FC class, so the 
overhead should be negligible.

> Of course, it would be a bit trickier to externalize the to/from 
> string/bin stuff, but certainly possible? .. or would the performance 
> cost be too great for such an 'external' scheme? (I can't see why, since 
> most of it would inline anyway?)

I don't see it either, that should be ok.

> Or are there other issues which come in to play? I'm just curious as to 
> the design decisions here. (I'm doing something similar, and I haven't 
> yet scaled it up to OpenSG-size & functionality yet, so..)

I don't see any, but this is pretty much exclusively Gerrit's turf.

        Dirk


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to