🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #623

Re: Unidraw Connector Question

#623
From: John Vlissides
Date: Fri, 09 Oct 1992 13:20
26 lines
1584 bytes
In article <Bvo3KE.B25@usenet.ucs.indiana.edu>, you write:

> 	What command should I use to find out the connector component
> that a pin is connected to?  For a connection with a floating pin connected
> to a fixed pin, which connector view will be returned by the
> ConnectorIntersecting()? It seems that it always return the latest connector
> view. If that is the case, how to get the connector component of the fixed
> pin?

You'll have to derive new connector classes to provide this
functionality.  The _cnxns protected member defined in the Connector
base class contains a UList of the connected connectors.  You can use

    Connector* Connector::Conn(UList*)

to extract the connector from each UList element.

An aside: I've found that there's rarely a good reason for asking a
connector for its peers.  There's usually a higher-level concept
behind the desire for this information, and it's often better
expressed in terms of dataflow or some other abstraction.  Make sure
you can't do what you want to do any other way before you start
subclassing.

--
John Vlissides / IBM T.J. Watson Research / vlis@watson.ibm.com
Technical Details
Message-ID: <9210091320.AA24715@aurora.watson.ibm.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!WATSON.IBM.COM!vlis

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!WATSON.IBM.COM!vlis
From: vlis@WATSON.IBM.COM (John Vlissides)
Subject: Re: Unidraw Connector Question
Message-ID: <9210091320.AA24715@aurora.watson.ibm.com>
Sender: news@shelby.stanford.edu (USENET News System)
Reply-To: vlis@watson.ibm.com
Organization: Internet-USENET Gateway at Stanford University
Date: Fri, 9 Oct 1992 13:20:09 GMT
Lines: 26