[200] in comp.os.os2.announce archive

home help back first fref pref prev next nref lref last post

NEW RELEASE: Freeware OS/2 Class Library version 1.10

daemon@ATHENA.MIT.EDU (B.STEIN@TBX.berlinet.de)
Sat Sep 30 21:57:24 1995

To: os2ann.DISCUSS@bloom-picayune.MIT.EDU
Date: Sat, 30 Sep 1995 16:10:54 GMT
From: B.STEIN@TBX.berlinet.de
Reply-To: B.STEIN@TBX.berlinet.de

Submitted by:   Benjamin Stein (b.stein@tbx.berlinet.de)
Source:         Benjamin Stein (b.stein@tbx.berlinet.de)
Date received:  1995 September 24
Date posted:    1995 September 30
-------------------------------------------------------------------------------
The OS/2 Class Library (OCL) 1.10, a freeware C++-library for CSet++, VAC++,
Watcom, Borland and Metaware, is released today.  It should be available
on Compuserve in OS2UGER Lib 5 (GO OS2INSIDE) and ftp.leo.org the next days.

The release contains the following files:

- OCL110.ZIP  -> release package OCL 1.10 (2.9 MB)
- OCLINST.ZIP -> installation utility (700 KB)
 
If you already installed version 1.08 you can use
install.exe and install.in_ from OCL package 1.08
instead of downloading OCLINST.ZIP.  The installation
utilities can be used for this release of OCL and
all coming releases.


This is new or changed in OCL 1.10:

 Changes:   

       The changes in this release have been absolutely necessary.  But in 
       many places, they are not source compatible to prior releases.  If 
       you update to OCL 1.10, you must expect some real annoying 
       source code changes, even if you programmed very neat. 
       Essentially, the following classes are affected: 
         -  ListItem 
         -  OListBase 
         -  List 
         -  OSortedListBase 
         -  SortedList 
         -  lOString 
         -  slOString 
         -  OString 
         -  OBook   
       OString 
         -  Finally, it has happened: OString is a rather rational string 
            class at last.  You can't access the member text directly.  From 
            now on, it is protected. But instead, Ostring objects can be 
            handled as normal PSZ, e.g.: 

            OString       filename("D:\\LOGFILE");
            ifstream      file(filename);
            Only when using pointer to OString objects, getText() must be 
            used.  Because of the new operator, that makes OStrings usable 
            as PSZ, the operator - had to be removed.  Unfortunately, the 
            compiler doesn't recognize it.  If you're using 

            OString string("A rose is a rose is a rose")
            
            string - 'i';
            the compiler tries to substract 'i' from PSZ string.  By no 
            means you're getting "A rose is a rose ", but "SYS3175" 
            instead :-((.  Therefore, you have to search manually, to find all 
            the places where you're using the operator -.  You have to 
            replace it with rightCut('Letter'). 

            OString string("A rose is a rose is a rose")
            
            string.rightCut('i');
            Now you're getting the expected result.   
         -  But you will be very happy about the other changes in 
            OString...   
       OBook 
         -  Instead of static NBPAGE structures, the class OBook now 
            uses the new class OBookPage (see "New Classes").  This is 
            only the first step towards a complete rework of OBook. 
    

  New Classes:   

       Collections: 
         -  This releases introduces the base for the badly missed 
            collection classes. New classes are: 
              -- OListItem<T> - before: ListItem<T> 
              -- OCollection - before: OListBase 
              -- OList<T> - before: List<T> 
              -- OOrderedCollection - before: OSortedListBase 
              -- OSortedList<T> - before: OSortedList 
              -- OConstIterator<T> 
              -- OIterator<T> 
              -- OStack<T>
              -- OQueue<T> 
         -  Hopefully, the other collections will follow.  Who will contribute 
            Trees? 
         -  For the list classes, in most cases it should be enough to 
            replace the names of the classes for the declarations.  All 
            members are essentially the same.  But it isn't possible any 
            more to access data members of the list as actual, first and 
            last.  They are protected now.  You must use the new member 
            funtions actual(), first() and last(). 
         -  The methods print() and output(PVOID elem) of the lists have 
            been removed.  Instead, iterators should be used.  The iterator 
            sample shows possible implementations.  The use of iterator 
            classes has two important advantages: 
              -- type correctness 
              -- const correctness   
       OStack<T> (Unordered Collection) 
         -  A simple stack with push() and pop() (see Collections sample)   
       OQueue<T> (Unordered Collection) 
         -  A simple queue with push() and get() (see Collections sample)   
       OHelpPoup 
         -  This class is still under construction.  You shouldn't use it by 
            any means.  The class OButtonBar will get a automatic bubble 
            help.  To not use it at the moment, you have to do nothing :-). 
            The corresponding new parameter in the constructors of 
            OButtonBar has a default initalizer (FALSE), that disables the 
            bubble help.   
       OBookPage 
         -  The class OBookPage replaces the description structure for 
            notebook pages (NBPAGE).  The sample Balloons (server) shows 
            the use of the new class.  If you want to use major pages as 
            title pages for minor pages to follow, you should do something 
            like the following: 

            
            
            class SecondPage
               : public OBookPage
            {
             public:
               SecondPage()
                 : OBookPage("LineText", "TabText",
                             ID_DIALOG, ID_FOCUS, FALSE, BKA_MINOR)
                 {}
            
               virtual ~SecondPage()
                 {}
            
               virtual BOOL OCommand(ULONG msg, MPARAM mp1, MPARAM mp2);
            };
            
            
            class MyBook
               : public OBook
            {
             protected:
                OBookPage   firstPage;
                SecondPage  secondPage;
            
             public:
                MyBook()
                 : firstPage("LineText", "TabText",
                             0, 0, TRUE, BKA_MAJOR)
                 {
                  Pages.add(&firstPage);
                  Pages.add(&secondPage);
                 }
            
                virtual ~MyBook()
                 {}
            };
            
            

  Known Bugs: 

       s. Changes-1.05 
    

  Notes: 

       We're working hard on an online book.  The book we put into this 
       release is only the first step.  We wanted to test the tools we 
       developed for this purpose, and the reference concept.  The class 
       references will follow step by step. 
       You won't see much multiple inheritance any more.  I have been 
       convinced, it's evil :-). 
       The library will become const correct, step by step.  We shouldn't 
       do that afterwards, but otherwise, we wouldn't be able to do it. 
       Comments in the headers and the documents are completely in 
       English now (or what we assume to be English :-)).  The OCL got a 
       lot of friends outside of Germany, and normally, it's rather seldom 
       for them to speak German.  The class reference will be in English 
       also. 
    

OCL (c) Cubus 1995 and Team OCL
Benjamin Stein & Juergen Kuri

home help back first fref pref prev next nref lref last post