Advertisement

Templates in Delphi

Started by March 11, 2001 04:00 PM
2 comments, last by NuffSaid 23 years, 10 months ago
Is there any way to do something like templates in Delphi? The only form of generic programming that comes close is using Variant, but Variant can only hold ordinal types(i.e. int, char, etc), not user defined structures. I need something that does user defined structures/records/classes as well. Any help would be greatly appreciated.
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
Not really. They provide the ultra efficient [sarcasm] Stack & Queue & List containers for you - they work with void* (more-or-less). They are multi-thread safe as is though.

Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Advertisement
That doesn''t sound too good. Anyway, I''ll check it out. It''s a shame they don''t provide templates. I was actually beginning to like Delphi, since the .EXEs don''t need a mega-huge DLL to run.

BTw, what do you mean when you say that they work with void *?
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
Okay, I''ve found the equivalent of a void * pointer for delphi. It''s called Pointer. So that''s what I''m using now, just in case anybody is interested.

I feel like I''ve taken a step back in time.....
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.

This topic is closed to new replies.

Advertisement