Implementing OO in C

S

Steven Woody

i've ever read a paper on the net which instruduced how to use C to
implement OOP including inheritance and virtual method table, but when
i am now tring to use it, i forget where is the paper on my hardisk.
does anyone know of the paper i mentioned? thanks.

-
woody
 
T

T.M. Sommers

Steven said:
i've ever read a paper on the net which instruduced how to use C to
implement OOP including inheritance and virtual method table, but when
i am now tring to use it, i forget where is the paper on my hardisk.
does anyone know of the paper i mentioned? thanks.

Perhaps "Object-oriented Programming with ANSI-C" by Axel-Tobias
Schreiner, 1993, ooc.pdf.
 
S

Steven Woody

T.M. Sommers said:
Perhaps "Object-oriented Programming with ANSI-C" by Axel-Tobias
Schreiner, 1993, ooc.pdf.

it is not this. but this also helps. thanks anyway.
 
M

Malcolm

Steven Woody said:
i've ever read a paper on the net which instruduced how to use C to
implement OOP including inheritance and virtual method table, but when
i am now tring to use it, i forget where is the paper on my hardisk.
does anyone know of the paper i mentioned? thanks.
There are lots of schemes.
What they boil down to basically this

typedef struct line
{
double (*length)(void *obj);
void (*getpoint) (void *obj, double t, double *x, double *y);
};

Then you implent straight lines, arcs, bezier curves, third order
derivatives of hyperexpentiated imaginary functions, and whatever you want,
using this interface. Then you ahve some scheme for putting the right
function pointer in place at the right time.
 
S

Steven Woody

Malcolm said:
There are lots of schemes.
What they boil down to basically this

typedef struct line
{
double (*length)(void *obj);
void (*getpoint) (void *obj, double t, double *x, double *y);
};

Then you implent straight lines, arcs, bezier curves, third order
derivatives of hyperexpentiated imaginary functions, and whatever you want,
using this interface. Then you ahve some scheme for putting the right
function pointer in place at the right time.


ok, thank you all !
 
J

Jack G. Atkinson Jr

Steven said:
i've ever read a paper on the net which instruduced how to use C to
implement OOP including inheritance and virtual method table, but when
i am now tring to use it, i forget where is the paper on my hardisk.
does anyone know of the paper i mentioned? thanks.

-
woody
Another good source:
http://www.quantum-leaps.com/devzone/cplus_3.0_manual.pdf


--
------------------------------------------------------------------
Jack G. Atkinson Jr.
(e-mail address removed)
Psa 104:4 He makes His angels spirits,
His ministers a flaming fire.
Luke 12:36-47 - Be ready!
------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top