How far is OO implemented in IDL? [message #26513] |
Wed, 05 September 2001 00:19 |
Olaf Stetzer
Messages: 39 Registered: September 2001
|
Member |
|
|
Hello,
I know that Object Oriented Programming is supported
in IDL but I wonder how far this concept is supported?
I am thinking of operator overloading in special. My
Idea is the following:
There exists a struct called something like SQL-Timestamp.
This struct holds int's/longint's for year, month, day,
hour, minute, second, fraction, to hold a comlete date/time.
If I make an object out of this struct and define the
operators + and - it should be possible to add or substract
seconds or days to/from a date stored in this struct. The
functions are then hidden inside the object, I simply use
the operators + and - for the operations. In C++ this would
be possible, even for different kinds of variables but I don't
know if this is possible in IDL too!
My second thought would be the following: If I access a database
with dataminer, fields of type DATETIME or TIMESTAMP are returned
as the mentioned struct SQL-Timestamp which is defined by the system.
Would it be possible to replace this struct by the aforementioned
object? The datastructure would be exactly the same, just the functions
for the operators + and - would be added.
So, this would be the most elegant way to provide more funcionality
to date/time-handling for database access. In practise however I
think that using the existing functions for date/time-conversion
(I mean the functions in the JHU/APL/S1R IDL libraries)
added by some functions for converting sqltimestamp to/from Julian
Seconds (which I am currently writing) is the easier and faster
approach...
What do you think?
CU,
Olaf
--
Dr. Olaf Stetzer
Forschungszentrum Karlsruhe
Institut f�r Meterologie und Klimaforschung
Atmosph�rische Aerosole (IMK III) - http://imk-aida.fzk.de
Tel.: +49(0)7247-82-3249 (FAX: -4332)
|
|
|