Boost logo

Boost :

From: Prabhu Ramachandran (prabhu_at_[hidden])
Date: 2000-11-02 14:18:44


hi,

>>>>> "David" == David Abrahams <abrahams_at_[hidden]> writes:

>> http://freshmeat.net/projects/vtkpipeline

    David> Neat!

thanks. :)

    David> Okay, actually, this particular thing would probably be
    David> pretty easy. Of course I can't get you the argument
    David> names. This will probably have to wait a week until after
    David> the official Boost release, though. And I don't think I can
    David> (or want to) provide everything you're finding in
    David> dir(t). I'm just curious: why do you need this? It does
    David> seem a little obscure.

No, I really dont need it and dont use it currently. But it may prove
useful sometime. No hurry as of now.

    David> Hmm. The use of these "type wart" prefixes (e.g. "im_") are
    David> an impediment to abstraction and genericity. For example,
    David> do I lie by using the "im_" prefix even though my functions
    David> are not in fact InstanceMethods? Actually, member functions
    David> of my extension classes are the same type as module-scope
    David> functions, so I would have to supply an im_func attribute
    David> which refers back to the function. Would that work for you?

Again, I really dont need the functionality and dont even know what
the best and most consistent method of doing it is. So whatever you
think is ok is fine. I am not a expert enough at python to know what
is "correct".

    David> Right now, it's only supported for functions of derived
    David> classes in Python. Do you want to write docstrings in C++?
>> Yeah, if possible. May be useful for some folks?

    David> Sure, someday. But for you? Do you need this right now or
    David> is the request "just for completeness?"

Just for completeness. Don't need it immediately.

>> I have yet another feature request. I just added a private
>> member (an int called var) to a class A. Under python is there
>> no way that I can access this data member? For instance
<snip>
    David> See the sections titled "Getters and Setters" and "Direct
    David> Access to Data Members" at
    David> http://people.ne.mediaone.net/abrahams/downloads/special.html

Sorry, my fault, I should have looked more carefully before I asked.
Thanks.

I have yet another question. This is more a general wrapper question.
Let me say that there is a function that returns a float* which most
probably is an array. Similarly if I have a function that takes a
float* as an argument, what is the best way of wrapping this?

  1) If the array is small it makes sense to convert it to either a
  tuple or list. What is the easiest way to do this?? I am looking
  for a way that makes one write the least code. :)

  2) If the array is large it may not make sense to use a list/tuple
  esp. if the values are used for computationally intense programs.

  3) For an arbitrary class "class_A", say, can py_cpp handle
  references to class_A &instance, or class_A *instance?? i.e. will it
  wrap function calls to such objects? This question is obviously
  related to the earlier questions.

I am going to try and start actually wrapping _real_ libraries in a
while. I anticipate problems like the above and hence the
questions...

thanks,
prabhu


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk