Boost logo

Boost :

From: Bjarne Stroustrup (bs_at_[hidden])
Date: 2001-04-04 13:36:38


Hamish Mackenzie <hamish_at_[hidden]> writes:
>
> Clearly there are many types of interface (some of which are for users, some
> like RPC, SOAP, COM, CORBA are not). Also if you think back to ooa/ood 101
> every class has an interface. I don't think GUI's can be considered in
> isolation, especially as they are normally built on top of one of the others.
>
> If we do we run the risk of including things specific to our interpretation
> of what a GUI should be. Should the coordinate system be integers or floats,
> 2d or 3d as in the case of an user interface built on OpenGL (I like to call
> them GLUIs)? Does having coordinates make sense at all (eg. for a CLI)?
>
> I think instead we should consider all types of interface first and try to
> determine areas of commonality that can be exploited. Then meta data can be
> added to allow the addition of features which are specific to a particular
> type of interface.
>
> Both CORBA and COM use IDL files to describe interfaces. Also in
> Java where reflection is used to describe interfaces. If we can develop a
> similar system of describing our internal interfaces independent of what
> additional interfaces are going to wrap around them then not only could
> people write cross platform code but the same could be used for all the
> different sorts of interface.
>
> We need to be able to...
> * Enumerate interfaces in a module.
> * Enumerate members of an interface.
> * Enumerate arguments of a function.
> * Set/get member variables generically.
> * Call member functions generically.
> * Attach arbitrary meta data to any part of the interface.
>
> I see three possible approaches
> 1. Use CORBA/COM style IDL
> 2. Use templates to describe interfaces
> 3. Build new language features to support reflection at compile time
>

I'm working on a set of classes for representing the type structure of a C++
program currently called XTI (for eXtended Type Information) and a way of
generating it from a compiler. Using XTI, a C++ program can be written to take
actions depending on the types, e.g. inquire whether a function has a member of
a given name and if so what are its argument types.

I plan to make it publically available, probably on boost (if the reviewers like
it). I'm not yet ready for others to use it, but I hope to be able to put it up
on my home pages for people to look at in another couple of months.

My hope is to address many of the issues related to IDLs (by useing C
Standard C++ as the IDL :-) and most likely other issues. My direct aim is
better support for distributed computing.

        - Bjarne
Bjarne Stroustrup, http://www.research.att.com/~bs


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