Subject: Autogenerate C++ mods?
From: larcky <pclar7@yahoo.co.uk>
Date: Tue, 21 May 2013 AD 01:28:34 -0400

Hi all
I started working on some Pike bindings for the  SFML
   libs a few days ago and even with my meagre
skills managed to get the windowing and events stuff up and running in a few
hours (using Bill Welliver's xapian code as a template) with the obligatory
spinning cube demo.
But already I have a 1000+ line file that's virtually unreadable.  Is there
a canonical way to split a cmod up into separate files?  So that classes can
reference each other across files as well as have access to e.g.:

#define OBJ2_EVENT(o) ((struct Event_struct*) get_storage(o, Event_program))
extern "C" struct program* Event_program;
extern "C" typedef struct
{
    sf::Event* event;
} SFML_EVENT_OBJECT_DATA;

I suppose you could put all those in a separate header file and another one
for constants and just include them in each implementation (.ccmod) file?

Also, I seem to have spent 80% of my time just writing boilerplate code - I
was going to hack a script to generate the class/method stubs/formatting/doc
framework, etc. automatically - or is there something already available to
do that for you?
Thanks :)
 



--
View this message in context: http://pike.1058338.n5.nabble.com/Autogenerate-C-mods-tp5710649.html
Sent from the Pike - User mailing list archive at Nabble.com.

Return to results