[MUD-Dev] New Here

MIKE MacMartin mike at igs.net
Sun Jun 29 09:23:17 New Zealand Standard Time 2003

On June 27, 2003 10:21 am, Miroslav Silovic wrote:

> In this specific case (the input and output types are in fact
> known in advance), you might want to keep it simple:

>   struct Callback{
>     virtual char* operator() (const vector<string> & args) = 0;
>   };

> The advantage of this approach is that the structs that fail to
> define the operator() will fail to compile (rather than report the
> runtime error, maybe, eventually).

I tried creating a map of string and pure virtual class, but it
wouldn't let me (something about not being able to take a reference
to pure virtual class?)

> Also, you might be able to save yourself a lot of experimenting by
> looking into Boost (www.boost.org), specifically Boost::python
> library. It gives you a nice templated binding generator for
> Python. It binds pretty much the entire functionality of a C++
> class to Python using very small ammount of glue code. And
> extensions for other scripting languages are being planned (Tcl
> doesn't seem to be among them, though).

Tcl's pretty easy, 'specially since I put it as part of my Functor
base class: I just need to rename "file" to nothing.

On a side issue, I have an accept() then a pthread_create(), but it
only allows one connection at a time.  Any thoughts?  (once again,
day old or more source in the CVS browser at sourceforge.net project
koelib ... the CVS tree has current sources)

Beware the JabberOrk
MUD-Dev mailing list
MUD-Dev at kanga.nu

More information about the MUD-Dev mailing list