[fpc-devel] Some compiler changes..
Jason P Sage
jasonpsage at jegas.org
Wed Jan 24 01:49:35 CET 2007
There was some discussion of TStringList and people asking for a different
base of work along these lines... I might have something.
Actually, whether or not he remembers - Michael Van Canneyt (Forgive my
spelling if I'm wrong) like 5 years ago explained some very important
"class" inner workings - which opened my eyes do designing classes - and
when that light was turned on - I built my own set of classes from the
ground up.
Basically, I have 3 a class called DL (Double Linked List), that has methods
that resemble Microsoft ADO or other "database technologies" and other class
lib's for that matter.
Basically, you can "append" "insert" "Sort (admittedly bubble only)",
DeleteItem, Find Item etc.
This core class has the ability to store pointers to objects, or be used
standalone - its like having a mini database table with a couple fields
predefined.
Descendants of this base class are: XDL (Extended DL, has AnsiString fields
Name, Value, Desc added to the "TABLE COLUMN LIST")
And lastly XXDL (Um.. Extra Extended DL) Which has an array of 4 platform
size Integers add to the table "row"
Basically I've been using these classes for 5 years now (Started 1.0.9 I
think maybe earlier) and they are pretty solid. Additionally, there is a
function you can call that dumps the entires contents of the "double linked
list" to a text log file and another that lets you dump it as HTML - makes
the table for you. Even has a way to change the column "captions" and which
columns to show. Great for debugging!
I'm not trying to pitch anything - and frankly guys I'm swamped - started a
business - but I'm still in shoe string budget mode - coding like a banshee
on a web based application - which doesn't pay until its done more or less -
and doing websites and the like for bread-n-butter monies.
All I'm saying is I have some really solid code I've created and I need
someone to take the initiative to at least see some of it work and give a
yeah or nay - I'll give what time I can - and only parts of this "system" of
classes I made are online at http://www.jegas.org in the download page.
I've built an ODBC connector with these classes that is as easy to use as
Microsoft ADO, I've made this same connector transparently use MySQL Direct
API - Same code base can use ODBC or MySQL direct (as far as I have brought
it so far) by simply changing a config file in one place. You code works the
same (SQL syntax not withstanding) But something like SELECT * FROM MYTABLE
is identical, and same syntax as those XDL classes... things like MOVEFIRST,
MOVELAST etc.
If anyone is interested - let me know - I'll knowledge transfer what I can.
Just remember if you grab that source - you need to compile with the -Sc
switch to use operators like += *= (I changed my fpc.cfg file)
So if you seriously are looking for a way to managestrings in a collection
of sorts - mine are rocksolid, but I don't know how they weigh against all
the things the core FPC team takes into consideration. I can say I used
platform size variables for the pointer/integer/cardinal stuff, and it runs
on Linux and Windows daily. I have quite the class lib - but I didn't base
it on the Delphi TClassThis or TClassThat structure - I'm a loyal user of
objfpc and native FPC. As For classes - I I just wanted to write my own so I
knew all the inner workings. I do use many core lib's provided with FPC as a
rule though - like RTL and system units etc.
Good Day - I'll say no more ;)
Jason P Sage
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.6/646 - Release Date: 1/23/2007
3:36 AM
More information about the fpc-devel
mailing list