[Rprotobuf-yada] skeletic implementation of proto messages using external pointers

Dirk Eddelbuettel edd at debian.org
Thu Oct 29 11:21:24 CET 2009


On 29 October 2009 at 11:01, Romain François wrote:
| I've commited some R and C (maybe need to C++ it at some point) that 
| prepare the space for mirroring proto messages as R S4 objects of class 
| "protobufMessage".
| 
| The design is much inspired from the new features of rJava. Here are 
| some insights. The "P" function takes either a message type (i.e. 
| "tutorial.Person") or a proto file, goes C internal, grabs a pointer to 
| some descriptor object (not sure what this will be right now), and 
| creates an R object of S4 class "protobufDescriptor".
| 
| Then, we can throw the created descriptor into "new", made generic by 
| the package. So you'd create a Person message like this :
| 
| message <- new( P("tutorial.Person" ) )
| 
| I've also added hooks so that
| 
| message$name
| 
| goes internal to grab the "name" field from the message.

Very nice!

I am a little swamped right now and may not be able to catch up immediately
but I will try. Part of my home network conked out and I need to redo that.

Saptarshi: did you get an r-forge id so that we can add you to the project?
Can I assume that you are on this list?

Dirk

-- 
Three out of two people have difficulties with fractions.


More information about the Rprotobuf-yada mailing list