home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!spool.mu.edu!agate!ucbvax!COMPUSERVE.COM!100023.2527
- From: 100023.2527@COMPUSERVE.COM (Guenter Dotzel)
- Newsgroups: comp.lang.modula2
- Subject: O2: Persistent Objects
- Message-ID: <930107081614_100023.2527_EHF12-2@CompuServe.COM>
- Date: 7 Jan 93 08:16:14 GMT
- Sender: usenet@ucbvax.BERKELEY.EDU
- Reply-To: Modula2 List <INFO-M2%UCF1VM.BITNET@uga.cc.uga.edu>
- Organization: The Internet
- Lines: 47
-
- Oberon-2:
-
- The chapter on Persitent Objects in the new book
- "Objektorientierte Programmierung in Oberon-2", Springer Verlag, 1992
- (OOPiO2) by H.P. Moessenboeck inspired me to write a test program in
- Oberon-2 on VAX/VMS (H2O).
-
- When writing to file, the program retrieves the record type name information
- at run-time with the procedure Objects.ObjToName and writes the type names
- ("moduleName.typeName") together with the associated
- data of a heterogeneous list of objects to a file.
-
- When reading the list from file, the type names stored in the
- file are used to reconstruct the original type with SYSTEM.NEW (p, n),
- where the pointer's type tag and size n are set their original values
- in Objects.NameToObj.
-
- The advantage is that simply adding new methods to load and store
- any extension of the base class is all you need to support new
- data structures on the file. There is no need to modify the
- write-to or read-from-file procedure.
-
- Does anybody know what Oberon-2 implementations support or provide facilities
- for ObjToName and NameToObj for arbitrary (non-anonymous) type names?
-
- The C++ working group plans to make language provisions for run-time type
- information and persitent objects too.
- In Oberon-2 this is possible now without any language extension.
-
- Guenter
-
- PS.:
- Thanks to my coworker +++hartmut who extended the VAX/VMS Oberon-2 compiler
- to store the type name information, size and tag.
- He also wrote the low-level module Objects for H2O.
- The design took him one day :-) I needed two days to debug his changes in
- the compiler's object-file generation module (VMS linker interface) :-(
-
- I'll list the source of Test_Objects (uses ISO M2 Std I/O Lib)
- in an upcoming issue of ModulaWare's "The ModulaTor" newsletter.
-
- H.P. Moessenboeck's book OOPiO2 will also be available in English soon.
-
-
-
- Distribution:
- comp.lang.modula2 feed >INTERNET: info-m2@ucf1vm.bitnet
-