caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: micha <micha-1@fantasymail.de>
To: caml-list@yquem.inria.fr
Subject: question about how to bind c++ classes to ocaml
Date: Sun, 13 Aug 2006 22:47:15 +0200	[thread overview]
Message-ID: <20060813224715.0769efc9@localhost> (raw)


when binding an ocaml class  to a c++ class, what's the preferred
way to access member variables of the c++ class?
One is just to implement the get and set function in ocaml to call
the native get/set functions of the c++ class. That way you allways have
some calls from ocaml to c only to get a value of a c++ object.
Another way would be to add similar member variables to the ocaml class
and everytime the c++ side changes a member it updates the ocaml side
too (through direct access). This way you have an additional binding
(the c++ object knows it's ocaml object), but you can access the member
variables in ocaml through normal ocaml methods.

any comments?

 thanks,
 Michael


             reply	other threads:[~2006-08-13 20:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-13 20:47 micha [this message]
2006-08-14  0:20 ` [Caml-list] " Jacques Garrigue
2006-08-14  7:04   ` Jonathan Roewen
2006-08-14  7:17   ` Michael Wohlwend
2006-08-14  8:45     ` Jacques Garrigue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060813224715.0769efc9@localhost \
    --to=micha-1@fantasymail.de \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).