Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-01

CPPClass Documentation?

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ewald

Hi,

This morning, I saw on fpc-devel a message titled `CPPClass`, which made me wonder if this keyword means what its name implies. Sadly though, there is not much documentation on this subject (read: none I could find other than some messages in the mailing list archive).

Is there anyone who could shed some light on this? (Links to documentation I missed will do :-) )

Ewald

Reply by email

Michael Van Canneyt
to Ewald
Ewald wrote 6 lines
Hi, This morning, I saw on fpc-devel a message titled `CPPClass`, which made me wonder if this keyword means what its name implies. Sadly though, there is not much documentation on this subject (read: none I could find other than some messages in the mailing list archive). Is there anyone who could shed some light on this? (Links to documentation I missed will do :-) )

CPPClass - to the best of my knowledge - does not work. An attempt to implement it was made once, but never was finished.

That's why you don't find any documentation on it.

Michael.

Reply by email

Ewald
to Michael Van Canneyt
Michael Van Canneyt wrote 5 lines
CPPClass - to the best of my knowledge - does not work. An attempt to implement it was made once, but never was finished. That's why you don't find any documentation on it.

Yeah, that explains it indeed. Thanks for the pointer!

Ewald

Reply by email

Sven Barth
to Ewald: This morning, I saw on fpc-devel a message titled `CPPClass`, which made me wonder if…
Ewald wrote 9 lines
Hi, This morning, I saw on fpc-devel a message titled `CPPClass`, which made me wonder if this keyword means what its name implies. Sadly though, there is not much documentation on this subject (read: none I could find other than some messages in the mailing list archive). Is there anyone who could shed some light on this? (Links to documentation I missed will do :-) )

It's a experimental feature in its infancy. Some years old already and a few years ago "a bit" improved by me. So currently you can import C++ classes (generated by GCC or CLang!) that either have static methods or non virtual ones and call them. What currently does not work is instantiation and destruction of such classes, using virtual methods, operator overloads and C++ exceptions. I still plan to improve this feature further, but with all one needs to find time...

For its usage you can take a look at $fpc/tests/test/cg/tcppcl{1,2}.pas with the corresponding C++ files residing inside the obj/ subdirectory of cg/.

Regards,
Sven

Reply by email

Ewald
to Sven Barth
Sven Barth wrote 12 lines
On 18.01.2014 13:45, Ewald wrote: > Hi, > > This morning, I saw on fpc-devel a message titled `CPPClass`, which made > me wonder if this keyword means what its name implies. Sadly though, > there is not much documentation on this subject (read: none I could find > other than some messages in the mailing list archive). > > Is there anyone who could shed some light on this? (Links to > documentation I missed will do :-) ) It's a experimental feature in its infancy. Some years old already and a few years ago "a bit" improved by me. So currently you can import C++ classes (generated by GCC or CLang!) that either have static methods or non virtual ones and call them. What currently does not work is instantiation and destruction of such classes, using virtual methods, operator overloads and C++ exceptions. I still plan to improve this feature further, but with all one needs to find time...

I really hate to lengthen other people's todo lists, but don't forget namespaces ;-) Anyway, good luck the implementation of these cool features!

For its usage you can take a look at $fpc/tests/test/cg/tcppcl{1,2}.pas with the corresponding C++ files residing inside the obj/ subdirectory of cg/.

That helps, thanks!

Ewald

Reply by email