From: William S F. <ws...@fu...> - 2012-07-23 22:11:45
|
Branch is ready: https://swig.svn.sourceforge.net/svnroot/swig/branches/delbaere-tcl. Happy hacking and good luck! William On 23/07/12 22:46, Christian Delbaere wrote: > Hi William, > > My SourceForge account name is "delbaere" > > Thanks, > > Christian > > On 23 July 2012 17:33, William S Fulton <ws...@fu... > <mailto:ws...@fu...>> wrote: > > Hi Christian > > Sounds good. Please send me your SourceForge account name and then > I'll configure your account and create a branch for you. > > William > > > On 23/07/12 19:00, Christian Delbaere wrote: > > Hi William, > > I am thinking about restarting development on this project. > What is the > procedure to get a branch made so that I can have version control? > > Thanks, > > Christian > > On 21 March 2012 16:47, Christian Delbaere > <chr...@gm... > <mailto:chr...@gm...> > <mailto:christian.delbaere@__gmail.com > <mailto:chr...@gm...>>> wrote: > > I hope it's not too late to propose another project for > this year's > GSOC for SWIG. I have written a spec for director support > under > Tcl, and it would be great to see it implemented. Can this > project > be added? > > Here's the spec: > > *_Enabling Director Support_* > > > The SWIG directives will be consistent with SWIG Python. Ex: > > %module(directors="1") modulename > %feature("director") Foo; > %feature("nodirector") Foo::bar; > > > *_Tcl and incr Tcl_* > > > SWIG can produce Tcl wrappers for standard Tcl as well as > incr Tcl. > incr Tcl mode is enabled with a command line option. This > proposal > only covers directors with incr Tcl mode *disabled*, but > the general > > goal is to make future implementation of SWIG directors for > incr Tcl > possible. > > *_Defining Director Classes_* > > > Support for directors requires the concept of a class > definition > including callable methods. Since plain Tcl does not > have this > capability built in, the SWIG Tcl director implementation > will add a > very basic mechanism to define director classes including > callable > methods written in Tcl. > > When a SWIG module with directors is loaded into the > interpreter it > will define a command called "SWIG_DirectorClass". The > general form > of the command will be: > > SWIG_DirectorClass /<className>/ /<baseClassName>/ { > > */method1 /*{ /self arg1 arg2 /... } { > /script1/ > } > > *method2 *{ self arg1 arg2 ... } { > > script2 > } > > ... > > } > > > Calling this command will create a new constructor-style > command in > the interpreter to create objects of type <className> > that are > "inherited" directors of <baseClassName>. The goal here is to > reuse > and extend the existing SWIG Tcl object infrastructure so > that the > director objects have identical behavior with other wrapped > objects. > > Repeated calls to SWIG_DirectorClass for the same > <className> will > redefine the internal tables so that any instances of the > director > class (old or new) will have the most up-to-date methods. > > *_Example_* > > > Given the following on the C++ side: > > %feature("director") Foo; > class Foo { > public: > Foo(int foo); > virtual void one(); > virtual void two(); > }; > > > then at the Tcl side, you can define: > > SWIG_DirectorClass myFoo Foo { > > one { self } { > puts "one from tcl" > } > > } > > > Following this definition, you can create instances of the > myFoo > director: > > set foo [myFoo] > > > The "one" method can be called from Tcl (just like any > other SWIG > Tcl objects): > > $foo one > > And of course, calling code in C++ will call the "one" Tcl > method > script passing in the wrapped object instance as "self". > > > > Thanks, > > Christian > > > > > > > ------------------------------__------------------------------__------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions > will include endpoint security, mobile security and the latest > in malware > threats. > http://www.accelacomm.com/jaw/__sfrnl04242012/114/50122263/ > <http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/> > > > > > _________________________________________________ > Swig-devel mailing list > Swi...@li...urceforge.__net > <mailto:Swi...@li...> > https://lists.sourceforge.net/__lists/listinfo/swig-devel > <https://lists.sourceforge.net/lists/listinfo/swig-devel> > > > |