[C++-sig] Re: Refactoring, Compilation Speed, Pyste, Lua/Ruby/JavaScript...
David Abrahams
dave at boost-consulting.com
Tue Jun 17 16:27:12 CEST 2003
Nicodemus <nicodemus at globalite.com.br> writes:
>>I propose to divide the library's implementation into several
>>namespace layers with corresponding subdirectories of boost/python.
>>These are just rough divisions and I would welcome suggestions for
>>finer-grained layering, or better names, or... These layers are
>>generally ordered from dependencies to dependents.
>>
>> core (for lack of a better name) - This is a Python-independent
>> layer which contains the framework of the type-converter
>> registry, inheritance.hpp which manages base<->derived class
>> conversions, the exception translator framework,
>> boost/python/type_id.hpp, and possibly a few components from the
>> current boost/python/detail.
>>
>> converter - This stuff which handles Python-specific conversion
>> mechanics is mostly already segregated in boost/python/converter,
>> but it could be better organized. Almost everything else in the
>> library is built upon these capabilities
>>
>> function - Wrapping of (member) (function) pointers into Python
>> callable objects. Maybe this should be called "callable".
>>
>> callback - Invocation of Python callable objects from C++,
>> e.g. call_method<...>, call<...>
>>
>> api - various namespace-scope functions such as del(), getattr(),
>> etc.
>>
>> objects - object, str, dict, tuple, list, long_ ...
>>
>> classes - specific support for class wrapping, including
>> instance_holders, support for smart pointers, etc.
>>
>
> Looks great, but perhaps inheritance.hpp should be included in the
> classes namespace?
Well, it's an interesting issue. The stuff in inheritance.[ch]pp is
entirely independent of Python, so it should really be in a layer
that's language-independent. Maybe the core needs to be further
subdivided?
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list