IonicWind Software

Aurora Compiler => Software Projects => Topic started by: Ionic Wind Support Team on February 28, 2006, 10:21:50 AM

Title: Quick and Dirty Class maker
Post by: Ionic Wind Support Team on February 28, 2006, 10:21:50 AM
Name says it all.  Generates a derived class from a selected base class and the virtual overrides you want.

Usage:
-Select "File"->"Load" and find "gui.inc" in your bin directory.  Or any other file that has a base class you want to derive from
-Double click on the base class you want to derive from
-Select the methods such as OnClose, OnCreate, etc you want to handle in your derived class
-Click the ">>" button to add the overrides to the derived class.
-Click the "<<" button to remove selected overrides.
-Enter a name for your new class
-Click "Generate".

(http://www.ionicwind.com/images/classmaker.jpg)

The source for the new class will be placed on the clipboard for pasting into a source file.  Source and executable attached at the end of this message.

Example output:

//MyWindow definition
class MyWindow : CWindow
{
declare MyWindow();
declare _MyWindow();
declare virtual OnClose(),int;
declare virtual OnCommand(unsigned int wparam,unsigned int lparam),int;
declare virtual OnControl(int nID, int nNotifyCode, unsigned int hControl),int;
declare virtual OnCreate(),int;
declare virtual OnDestroy(),int;
declare virtual OnMenuInit(unsigned int hMenu),int;
declare virtual OnMenuPick(int nID),int;
}

//MyWindow Implementation
MyWindow::MyWindow()
{
}

MyWindow::_MyWindow()
{
}

MyWindow::OnClose(),int
{
return 0;
}

MyWindow::OnCommand(unsigned int wparam,unsigned int lparam),int
{
return 0;
}

MyWindow::OnControl(int nID, int nNotifyCode, unsigned int hControl),int
{
return 0;
}

MyWindow::OnCreate(),int
{
return 0;
}

MyWindow::OnDestroy(),int
{
return 0;
}

MyWindow::OnMenuInit(unsigned int hMenu),int
{
return 0;
}

MyWindow::OnMenuPick(int nID),int
{
return 0;
}


Download link in last message.
\/ \/ \/
Title: Re: Quick and Dirty Class maker
Post by: Ionic Wind Support Team on February 28, 2006, 04:48:32 PM
Updated:  Now loads gui.inc as the default on startup, so you don't need to search for it.  The zip file was updated in the previous post and includes the new executable and soruce file.

If you want to compile it yourself you will need to create the "advapi32.lib" import library.  Select "tools" from the IDE and "Create Import Library".

Title: Re: Quick and Dirty Class maker
Post by: Parker on February 28, 2006, 07:21:11 PM
I've modified it a bit, so now if you type an invalid identifier in the derived name box it lets you know. It accepts any identifier the lexer does, that means they can contain $ and @ if you'd like.
Title: Re: Quick and Dirty Class maker
Post by: Ionic Wind Support Team on March 11, 2006, 08:56:50 AM
The latest stand alone version of the Class Maker is attached to this message.  A DLL version is now included with the installation and is available from the 'Tools' menu.