[Home] [Groups] - Message: [Prev in Group] [Next in Group]
27574: Re: [MUD-Dev] New Here
[Full Header] [Plain Text]
From: MIKE MacMartin <mike@igs.net>
Newsgroups: nu.kanga.list.mud-dev
Date: Sun, 29 Jun 2003 09:23:17 -0400
References: [1] [2] [3] <-newest
Organization: Kanga.Nu
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)
MIKE
--
Beware the JabberOrk
_______________________________________________
MUD-Dev mailing list
MUD-Dev@kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev