April 24, 2024, 08:09:55 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Global classes

Started by Parker, November 25, 2005, 07:38:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Parker

Is it possible to have a global class, in which the methods are global, and in another module have an extern class that imports all of those methods?

Ionic Wind Support Team

Class methods are all global by default.  Including a header file with the class definition automatically uses 'extern' if the methods are not found in the same file.  At least that is how it works here with my current version.

You can't call a class method without having an instance of that class, meaning there are no static methods yet.  But if I understood your question that is not what your talking about.

Paul.
Ionic Wind Support Team

Parker

Is it possible to do this with virtual methods too (does the table get declared extern)?

Ionic Wind Support Team

Currently the vtable will exist in any object file the class is instanced in.  A little bit of duplication, yes, but it works.

Ionic Wind Support Team