Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 09-21-2009, 04:34 PM
Harakiri23
Fire Beetle
 
Join Date: Jun 2009
Location: b
Posts: 11
Default Generating Perl Classes..howto?

Dear Devs,

the perl classes like perl_client.cpp seem to be auto generated from the client.cpp to map client c++ functions into perl. I figured as much that the perl toolset using xsubpp has created these files.

I got as far as creating my own perl mapper classes for custom c++ classes, however i seem only be able to create the header (function bodies) not the implementation.

I see that these classes were originally checked in by FatherMatt? - is there a howto to build these perl_*.cpp classes ? It looks like over the years you are advised to copy & paste new functions into these classes any manually create the perl code like

Quote:
XS(XS_Client_Duck); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_Duck)
{
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Client:uck(THIS)");
{
Client * THIS;

if (sv_derived_from(ST(0), "Client")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(Client *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type Client");
if(THIS == NULL)
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");

THIS->Duck();
}
XSRETURN_EMPTY;
}
is there a documented way to auto generate these classes including code?

Thank you
Reply With Quote
  #2  
Old 09-23-2009, 10:48 AM
Harakiri23
Fire Beetle
 
Join Date: Jun 2009
Location: b
Posts: 11
Default

NM - i educated myself once i found the Utils\perlxs dir
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:19 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3