HDTenEightyP/NetNews huggingface dataset:
From: werner@spss.com (John Werner)
Subject: Re: message passing between objects
Date: Fri, 10 Apr 1992 16:20:53 GMT
Distribution: usa
Organization: SPSS Inc.

In article <1992Apr7.144838.16378@shell.shell.com> senften@taurus (Scott D. Senften) writes:
>I need to know the best way to send a message between two objects that don't
>"know" about each other.  [...] What I want is to have a member
>function of my list object to be registered with a "changed" callback list on
>my data object so that when an object is edited it can march down its lists
>of functions to notify other interested objects.

You might want to take a look at Apple's MacApp 3.0 application
framework.  They have a system of "notifiers" and "dependents" that
does just what you want.  An object registers itself as depending on
another object (the "notifier"), and when the notifier calls its
Changed method, everthing that depends on it gets its DoChange method
called.  You probably couldn't just use the code from MacApp, because
it depends on lots of other pieces of MacApp.  But it would give you a
good idea of how to write such a thing yourself.

I wrote a dependency system like this about a year ago, and I decided
to encapsulate it in a "mixin" class named MDepender that looked like this:

  class MDepender {
    public:
      MDepender(void);
      virtual ~MDepender();
      void    AddDependent(MDepender *);    // Make an object dependent on me
      void    DependsOn(MDepender *);       // Make myself dependent on another
      virtual void    Changed(ChangeId why);// Call when this object changes

      // This gets called when an object I depend on changes:
      virtual void    DoChange(ChangeId why, MDepender *who);
    private:
      ...
  };

Classes that want to use the dependency system have to inherit from
MDepender, possibly using multiple inheritance.  They override the
DoChange method for whatever behavior is needed; in your case it would
be redrawing the object.

The notification algorithm is the hard part.  To minimize overhead in
objects that have no dependency relationships, I keep all the
information about the dependency graph in a big array of edges.  When
an object's Changed method is called, a mark-and-sweep algorighm is
used to notify its dependents: first mark all the dependents that need
notification, then notify them, unmarking as you go.  This eliminates
some looping problems with circular graphs.

This isn't a very complete explanation, but I hope it helps you get started.

--
-------------------------------------------------------------------------
John Werner   |    werner@spss.com    |    If these were SPSS's opinions,
SPSS, Inc.    |    (312) 329-3677     |    I wouldn't be posting them.

Newsgroups: comp.lang.c++
From: jmb@fid.morgan.com (Jeff Birnbaum)
Subject: initialization of global objects in linked library
Organization: Morgan Stanley & Co., New York, NY
Date: Tue, 14 Apr 1992 01:21:27 GMT

Does anyone know a better way to insure that global objects are
constructed when using a library of C++ code than the one 
mentioned in the README file c++_software distributed with
Sun C++ 2.1.

here is the method they suggset:
--------------------------------
CASE 2 - The object is not exported; or, it is exported but its constructor
	 and/or destructor should be invoked no matter whether user
	 applications reference it or not.

If the object is only used internally in the library, you should not define
it in a .sa file.  The reason is that unless the user application
happens to reference something else in the same .sa file, the .sa file won't
be linked into the final executable.  Thus, the constructor and destructor
of the object won't be invoked.  Worse yet, internal use of the global
object in .so files without explicit referencing of the object in the
user program will result in "Symbol not found" dynamic linker error
during runtime, if the object is defined in a .sa file.

One way to ensure that such objects are properly initialized and destroyed
is to put a dummy static object in the library header file (which defines
library interfaces and will have to be included if the application uses
that library), and have the constructors and destructors of all the
global library objects invoked during the construction and
destruction (respectively) of that static object.  Note, however, that a
static data member should be used so that the initializations and destructions
of the library objects only occur once -- even when the header file is
included multiple times in the user application.
-------------------------------------------------

I have some internal hashTables that I need initialized - I would prefer
not to have to do this - there must be a more rational way of doing
this.

please reply if you have a suggestion, thanks in advance.

Jeffrey M. Birnbaum             \     Morgan Stanley & Co., Inc.
jmb@fid.morgan.com               \    1251 Avenue of the Americas
Fixed Income Research Department  \   New York, NY  10020 USA
(212) 703-7219                     \

-- 
Jeffrey M. Birnbaum             \     Morgan Stanley & Co., Inc.
jmb@fid.morgan.com               \    1251 Avenue of the Americas
Fixed Income Research Department  \   New York, NY  10020 USA
(212) 703-7219                     \
From: hagen@sicsun.epfl.ch (Florence HAGEN)
Newsgroups: comp.lang.c++
Subject: DLL and Borland C++ 2.0
Date: 8 Apr 92 08:52:43 GMT
Article-I.D.: sicsun.2749
Organization: Ecole Polytechnique Federale de Lausanne, Suisse


Hello,

I am going to try to make a DLL using Borland C++ 2.0.
During link, a warning appears:
Attempt to export non-public function anamain.
The function anamain is declared in the header file, in the source file and in the module definition file.
I don't understand.
Here are the files.

flo.hpp
-------
BOOL FAR PASCAL LibMain(HANDLE,WORD,WORD,LPSTR);
int FAR PASCAL anamain(int);

pilot.cpp
------------------
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#include <windows.h>
#include "flo.hpp"

int FAR PASCAL LibMain( HANDLE hInstance, WORD wDataSegment,
                                   WORD wHeapSize, LPSTR lpszCmdLine )
{
    if ( wHeapSize != 0 )
        UnlockData( 0 );
    return 1;
}

int far pascal anamain(int i)
{
  int j=9;
  return (i+j);
}

pilot.def
---------
LIBRARY pilot
DESCRIPTION 'ESSAI DLL en Borland C++2.0 FH-NM.31.03.92'
EXETYPE WINDOWS
CODE LOADONCALL MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE SINGLE
HEAPSIZE        0
EXPORTS anamain

Another important information: I compile and link directly from the dos prompt and not in the environment of Borland.
Here is the command: bcc -WDE pilot.cpp
Could somebody help me?
My mailing address is : hagen@lesosun1.epfl.ch
Thank you.
FH.
From: joe@proto.com (Joe Huffman)
Newsgroups: comp.lang.c++
Subject: Re: GUI BC++ library
Keywords: GUI, BC++, library
Date: 17 Apr 92 12:17:24 GMT
Article-I.D.: proto.1992Apr17.121724.11563
Organization: Prototronics @ Sandpoint, Idaho

bimor@cs.few.eur.nl (Jeroen Morrien) writes:

>I am looking for an O-O Graphic User Interface ("Window-system") library
> for Borland C++. Is there any ftp-site where something like that
> can be found ?   Or are there any people who wants to share their
> programming efforts on a GUI library of objects ?

I'm not aware of any public domain ones, but I can recommend Menuet III
from Autumn Hill Software.  They send out free demo disks if you would
like to take a look at it.  It's small, yet full featured, and works
with Borland C++.


Autumn Hill Software
1145 Ithaca Drive
Boulder, Colorado 80303

Voice: 303-494-8865
FAX:   303-494-7802
BBS:   303-494-8868

or in Europe:

Murray Communications Ltd
53 Harrowby Lane
Grantham
Lincs
NG31 9HZ

Tel: 44-476-74108
Email: pmurray@cix.compulink.co.uk

-- 
uunet!proto!joe
joe@proto.com
From: Terry_Glanfield.Southern@rxuk.xerox.com
Newsgroups: comp.lang.c++
Subject: Beginners questions
Date: 14 Apr 92 15:22:28 GMT
Article-I.D.: rxuk."14-Apr-92.16:22:28.+1".*.Terry_Glanfield.Southern
Reply-To: Terry_Glanfield.Southern@rxuk.xerox.com


I have a couple of beginners questions and would very much appreciate
a reply by mail as I don't receive this news group.

Is there an FAQ for this group?  Could someone please send me a copy.

Can anyone recommend a base level class library (with integers,
strings, complex numbers and the like) for SunOs 4.1.? - preferable
compatible with Sun's C++ compiler?  Have there been any summaries of
available class libraries?

Many thanks,
Terry.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Terry Glanfield, +44 483 753 057, tg.southern@rxuk.xerox.com 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Newsgroups: comp.lang.c++
From: thant@horus.esd.sgi.com (Thant Tessman)
Subject: MIPS function call stack (was: help)
Organization: sgi
Date: Fri, 17 Apr 1992 15:58:45 GMT

In article <1992Apr16.200435.29911@thunder.mcrcim.mcgill.edu>, amaluf@Monet.McRCIM.McGill.EDU (Rodrick Ameen Maluf) writes:


> I want to call a function for which I have to determine the arguments
> from the user input. Once I have determined the arguments ( their number
> as well as their type ) I am having problem building the stack for the
> function that I want to call with those arguments.


I looked into doing this.  It can't be done because the mips compiler
passes arguments in registers when it can.  The variable argument stuff
in varargs.h uses some very non-portable mips magic compiler incantations.

All this made me come to the conclusion that C++ (and C, etc.) is just 
the wrong language to do this kind of stuff.  I wish I had an alternative
to give you, but I don't.  (That is, unless you want to write some 
combination of interpreter-like thingy and wrappers of some sort (maybe 
automatically generated by a pre-processor if you're more macho than
I am), which is probably what I am going to wind up doing.)

thant
From: sab@reef.cis.ufl.edu (Shawn Berg)
Newsgroups: comp.lang.c++
Subject: Operator Overloading
Keywords: =+
Date: 12 Apr 92 02:09:45 GMT
Article-I.D.: uflorida.35087
Distribution: comp.lang.c++
Organization: Univ. of Florida CIS Dept.

Could someone please e-mail me a few simple examples of overloading the
=+ operator or where I could find some?

Thanks,
Shawn berg

E-mail::sab@reef.cis.ufl.edu
Newsgroups: comp.lang.c++
From: hmnarvae@ras.amdahl.com (Howard M. Narvaez)
Newsgroups: comp.lang.c++
Subject: MVS and C++
Date: 9 Apr 92 00:53:38 GMT
Reply-To: hmnarvae@ras.amdahl.com
Organization: Amdahl Corporation, Sunnyvale CA

Why hello out there!

I was wondering what the situation was with C++ and MVS.  Now, I don't particularly
like MVS or anything, but there are those who would like to partake in the object
oriented paradigm from the comfort of their old environments.  Give me a UNIX box
any day...  :) Any info out there?

Thanks!

-Howard

-------------------------------------------------------------------------------
| hmnarvae@ras.amdahl.com
| Howard Narvaez
| Amdahl Corporation
| 1250 East Arques Avenue (M/S 281)
| P.O. Box 3470
| Sunnyvale, CA 94088-3470
| (408) 992-2160
-------------------------------------------------------------------------------
From: logic@gacvx2.gac.edu
Newsgroups: comp.lang.c++
Subject: Re: Borland's CLASSLIB code and samples
Date: 14 Apr 92 22:28:13 GMT
Distribution: comp
Organization: Gustavus Adolphus College, St. Peter, Minnesota

In article <1992Apr14.134204.11711@vax5.cit.cornell.edu>, b39y@vax5.cit.cornell.edu writes:
> Hi -
> 
> Is anyone aware of a source for sample code using the CLASSLIB classes included
> with BC++ 2.0?  I'm particularly interested in a working example of a
> DoubleList, but just about anything would be appreciated.  These can be code
> FTP sites, books which use the BC++ 2.0 code as a base to develop routines,
> personal code which you don't mind sharing, or anything else.
> 
> I'm anxious for suggestions; thanks for your help.
> 
> Dave Rodger
> b39y@vax5.cit.cornell.edu
> dave@cont-ed.mail.cornell.edu
> 
Beware of the CLASSLIB classes in BC++ 2.0..  they are quite buggy..  borland
published a patch for them a while back that you can probably get from their 
BBS or from simtel..  Note that the CLASSLIB classes in BC++ 3.0 are quite 
different from the 2.0 versions..

hope this helps,
al hart
From: rmartin@willing.Rational.COM (Bob Martin)
Newsgroups: comp.lang.c++
Subject: Re: In the presence of a pure virtual destructor
Date: 16 Apr 92 20:09:12 GMT
Article-I.D.: willing.rmartin.703454952
Distribution: na

schwartz@possum.den.mmc.com (Michael I Schwartz) writes:

>In discussing the ability (and sanity) of creating a pure virtual
>destructor, the following example results.  Should the non-virtual
>destructor be required (or will there be a compiler-generated default
>for the base class)?

You need to define an implementation for the pure virtual destructor!
Otherwise the application probably won't link.  Since the class has a
destructor declared, that destructor will be called when it is time to
destroy an object derived from the class.  No default will be created.
So you must supply it yourself.

Thus, a pure virtual destructor *requires* an implementation, while
it is odd for any other pure virtual function to have one.

Pure virtual destructors, IMHO, should be banned from the language.
Or at least some real meaning should be given to them.  At present,
they are il-defined.  

The *only* certain effect of declaring a pure virtual destructor is to
make the containing class abstract.  i.e. The compiler will not allow
any instance of that class to be created.

However, there are some uncertain effects.  If `Base' has a pure
virtual destructor, and 'Derived' has no destructor at all, then is
'Derived' abstract or concrete?  I don't think the language spec is
clear on this subject.

--
+---Robert C. Martin---+-RRR---CCC-M-----M-| R.C.M. Consulting         |
| rmartin@rational.com |-R--R-C----M-M-M-M-| C++/C/Unix Engineering    |
|     (Uncle Bob.)     |-RRR--C----M--M--M-| OOA/OOD/OOP Training      |
+----------------------+-R--R--CCC-M-----M-| Product Design & Devel.   |
From: nicted@toz.buffalo.ny.us (Nicole Tedesco)
Newsgroups: comp.lang.c++
Subject: Object Management System/Object Request Broker (OMS/ORB)
Date: 11 Apr 92 16:55:19 GMT
Organization: The Tower of Zot - (716)838-0220

Assume a program is comprised of a number of objects and their members.
Assume that a number of programs are running one the same machine.
Assume programs are running on other machines.
Assume all these programs are comprised of cooperating objects.
Assume we want as many of these objects, over many applications,
  and across systems (multiple operating systems), to talk to each
  other and USE each other efficiently.  Object re-usability (help
  stamp out, and abolish redundancy!).

If we want these things come true, we must have an efficient, extensible,
and universally-applicable (as opposed to simply, "universal") object
management system.

The Object Management Group has proposed standards for inter-object
and intra-object communications.  They call this standard the "Object
Management System".  This OMS, they propose, will use a particular 
feature called the Object Request Broker (ORB).

This sounds interesting.  What does everyone know of this standard?
There is a company, HyperDesk, which is producing an OMS/ORB development 
system.  Anyone know of this system?  Does anyone know of any competing 
systems?

- Nicole

---------------------------------------------------------------------
nicted@toz.buffalo.ny.us (Nicole Tedesco)
-- Change this!
Newsgroups: comp.lang.c++
From: rjm@cs.brown.edu (Ralph Marshall)
Subject: Re: tree iterator, how?
Organization: Brown University Department of Computer Science
Date: Tue, 14 Apr 1992 14:40:14 GMT

In article dmh@goanna.cs.rmit.oz.au (Darren Hosking) writes:
>I've got a simple binary tree class that I'd like to iterate through with
>an iterator class. Each node of the tree maintains data and a left and right
>node pointer. How can I write an iterator class for the tree class?
>
>Without a class I can simply use recursion to traverse the tree but I cannot
>put recursion into a class (can I?).
>
>The only method I can think of is maintaining a stack of parent nodes, but
>I'd like something more elegant.

It depends on what you have in mind for the iterator to do.  I have
recently written a basic binary search tree class as my implementation
of sorted collections, so I faced this same problem.  My solution is
to have a "cursor" which points to a single node in the tree, and
various operations which allow you to move the cursor (such as next,
previous, first, last, search, etc.)  Given the basic theory of BSTs
and explicit parent pointers it is easy to write non-recursive(*) code
which performs this traversal in each case.

This may or may not be what you want - I'm explicitly handling the
case where, for example, you do a search, delete some nodes, go on to
other parts of the system, and return later to find the cursor at the
next node needing processing.  If you only need to handle complete
iteration (similar to the various sequence mapping functions in Common
Lisp) you may want another solution.

* The non-recursive comment is something of a red-herring, since I
only did it that way for efficiency.  With explicit parent pointers
you don't need the stack to handle backtracking, and then recursion
neither minimizes the size of the code nor makes it easier to
understand.

Ralph Marshall
rjm@cs.brown.edu
From: pboutrouche@vms.eurokom.ie
Newsgroups: comp.lang.c++
Subject: WANTED: C++ library to manage a serial line
Date: 14 Apr 92 09:43:52 GMT
Organization: EuroKom Conferencing Service

Hi there,

Does any one know a C++ Library (free if possible!) that provides 
functions to manage a serial line?

I would need it for a multimedia application involving a video disk 
player I am working on.

I'd better find one for a Sparc II but I am also interested in others.

Thanks.

Boris Hardouin

Thomson-CSF
160 Bd de Valmy, BP 82
92704 Colombes Cedex
Tel: +33 (1) 47 60 30 00
Fax: +33 (1) 47 60 35 05

Note that I don't have an email address myself. Please reply to:

philippe.boutruche.thomson@eurokom.ie

(he will forward any answer to me)
Xref: sparky comp.lang.c++:6845 comp.std.c++:400
From: fragale@saifr00.cfsat.honeywell.com (Ruth Fragale)
Newsgroups: comp.lang.c++,comp.std.c++
Subject: Needed:  Good C++ Training Video Course
Date: 16 Apr 92 15:29:36 GMT
Article-I.D.: saifr00.1992Apr16.152936.1840
Organization: Honeywell Air Transport Systems Division

Hi!

Can anyone recommend a good, solid C++ training video course.

Most of us in our company already know C and something about
object orientated programming but not C++.

We would prefer a video course that is not dependent on any
C++ implementation.

It would help if this video course also teaches object oriented
data modelling using C++.


Thanks!

Ruth Fragale
Honeywell Inc
fragale@saifr00.cfsat.honeywell.com

-- 
Ruth Fragale
Honeywell Inc
fragale@saifr00.cfsat.honeywell.com
Newsgroups: comp.lang.c++
From: jimad@microsoft.com (Jim ADCOCK)
Subject: Re: Borland or Microsoft?
Date: 09 Apr 92 20:16:51 GMT
Organization: Microsoft Corp.

In article <13760@star.cs.vu.nl> pfrants@cs.vu.nl (Frants P) writes:
|	It's not my intention to start a war between 
|	Borland and Microsoft users!!

Yet this is exactly what such a "comparison" is going to provoke.

How about if we all leave the warfare to the Borland and Microsoft
marketeer's magazine ads -- where the antagonists have to pay for it --
rather than carrying out this war on the net, where a lot of innocent
bystanders have to pay for it ????

Let's all *try* to keep our advertisements out of this space, and try to
leave it open for discussions of the C++ *language*
From: cyberman@toz.buffalo.ny.us (Cyberman)
Newsgroups: comp.lang.c++
Subject: Can any MSDOS C compiler
Date: 11 Apr 92 20:07:55 GMT
X-Maildoor: WaflineMail 1.00r

JY>Is there any MSDOS C compiler that doesn't say "error: code segment
JY>too large" when you give it a big source file?

TRY a different memory model that uses far pointers for the code
segment.

        STEPHEN CYBERMAN@TOZ.BUFFALO.NY.US
        commiserated at Sat  04-11-1992  11:32:59
---
 * SLMR 2.1a * Galactica Software...Even Cylons use it!
                                  
Newsgroups: comp.lang.c++,comp.lang.clos,comp.lang.eiffel
From: millerta@ucsu.Colorado.EDU (MILLER TIMOTHY A)
Subject: Survey on future of Object Oriented Programming
Organization: University of Colorado, Boulder
Date: Sat, 11 Apr 1992 17:45:57 GMT


Hi Guys:

I'm doing a Delphi survey on the future of the Object paradigm.
Please respond now, if you want to be included in this survey.
I will be sending out the same questions for a second round in two
days or when I have fifty responses. The second round consists of
the same questions, but it includes the average response and the
range of responses.

Please answer the following questions by responding with a specific
year (max 2050). You may answer these questions by editing this
message or appending the message with the question number
and response.

1) When will there be a  Object CASE tool that gains wide acceptance?

2) What year do you see OO Analysis techniques standardized?

3) What year do your see OO Design techniques standardized?

4) When will you be able to buy useful Objects "off the shelf" for custom
applications?

5A) When will Object Systems account for 30% of the applications being used?
5B) When will Object Systems account for 50% of the applications being used?
5C) When will Object Systems account for 80% of the applications being used?

6A) When do you expect that a background in Object Systems will be a
requirement for 30% of new hires for programming?
6B) When do you expect that a background in Object Systems will be a
requirement for 50% of new hires for programming?
6C) When do you expect that a background in Object Systems will be a
requirement for 80% of new hires for programming?

7) What OO language do you think will dominate by the end of this decade?


Sorry if this when out several times. There were several bugs some of
which are still not resolved.

Please reply to "timothy@eddie.rmnug.org".

Thanks

Tim
From: sab@reef.cis.ufl.edu (Shawn Berg)
Newsgroups: comp.lang.c++
Subject: Null pointer assignment
Summary: what is it
Keywords: pointers turbo 2.0
Date: 16 Apr 92 05:10:11 GMT
Organization: Univ. of Florida CIS Dept.

I'm using Turbo C++ v2.0, when I run a particular program everything seems
to go fine, except a message is printed to my screen after execution is 
complete, it's: "Null pointer assignment."  I was wondering what would cause
this?  BTW, sometimes the message only appears the second time I run my
program.  I suspect that the problem is in my destructor.

Thanks for any help,
Shawn Berg

PS. I'm sorry if this is a repeat post, weird stuff is going on here....

E-mail:  sab@reef.cis.ufl.edu

Newsgroups: comp.lang.c++