BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: Collection of thoughts about "Collections" ... follow up

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design
View previous topic :: View next topic  
Author Message
Joanna Carter [TeamB]
Guest





PostPosted: Tue Dec 20, 2005 9:53 am    Post subject: Re: Collection of thoughts about "Collections" ... follow up Reply with quote



"BobW" <Testing (AT) Please (DOT) Ignore> a écrit dans le message de news:
43a76f81$1 (AT) newsgroups (DOT) borland.com...

Hi Bob, could I suggest that this is much too technical for the non-tech
group Smile)

I will set follow-up to the oodesign group where you will find enough OO
skills to cause your brain to start overheating !

Quote:
Now to "collections" ... in a real-life problem ...
or my real-life problems, I am not sure collections
would be sufficient in most instances. Being a civil/environmental
engineer, I need to describe "connected systems" such
as storm drainage systems and water distribution
systems. For all you non-civil engineers, in a storm drainage
system, each node (manhole, inlet, etc) has one and only one
"immediate downstream node" except the very most downstream node
which has a NIL downstream node ... by contrast each node
has several (zero to infinite) "immediate upstream nodes".
I can describe that topology with with linked-list
but I cannot even imagine how to describe that connectivity
using "collections". Am I missing something?

Simply put, you would have something like this :

TNodeList = class; // forward declaration

TNode = class
private
...
public
property DownstreamNode: TNode ... // read/write
property UpstreamNodes: TNodeList ... // readonly
...
end;

TNodeList = class
private
fitems: TObjectList;
public
constructor Create;
procedure Add(node: TNode);
procedure Remove(node: TNode);
property Item[Index: Integer]: TNode;
...
end;

I would also agree with Bob Dawson in that you ought to consider the
possibility of more than one downstream nodes; just in case it happens in
the future, then it will not break your code :-)

Quote:
I know this (a non-technical NG) might be the wrong place
for this, but y'all are so pleasant and bright I thought
I would bounce it off of you.

I have set follow-up to the oodesign group, please continue the conversation
there.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer




Back to top
BobW
Guest





PostPosted: Tue Dec 20, 2005 11:46 am    Post subject: Re: Collection of thoughts about "Collections" ... follow up Reply with quote



Quote:
... to cause your brain to start overheating !

Yeah, that is what I was afraid of. It never feels
good when it is hot.
Bob


"Joanna Carter [TeamB]" <joanna (AT) not (DOT) for.spam> wrote

Quote:
"BobW" <Testing (AT) Please (DOT) Ignore> a écrit dans le message de news:
43a76f81$1 (AT) newsgroups (DOT) borland.com...

Hi Bob, could I suggest that this is much too technical for the non-tech
group Smile)

I will set follow-up to the oodesign group where you will find enough OO
skills to cause your brain to start overheating !

| Now to "collections" ... in a real-life problem ...
| or my real-life problems, I am not sure collections
| would be sufficient in most instances. Being a civil/environmental
| engineer, I need to describe "connected systems" such
| as storm drainage systems and water distribution
| systems. For all you non-civil engineers, in a storm drainage
| system, each node (manhole, inlet, etc) has one and only one
| "immediate downstream node" except the very most downstream node
| which has a NIL downstream node ... by contrast each node
| has several (zero to infinite) "immediate upstream nodes".
| I can describe that topology with with linked-list
| but I cannot even imagine how to describe that connectivity
| using "collections". Am I missing something?

Simply put, you would have something like this :

TNodeList = class; // forward declaration

TNode = class
private
...
public
property DownstreamNode: TNode ... // read/write
property UpstreamNodes: TNodeList ... // readonly
...
end;

TNodeList = class
private
fitems: TObjectList;
public
constructor Create;
procedure Add(node: TNode);
procedure Remove(node: TNode);
property Item[Index: Integer]: TNode;
...
end;

I would also agree with Bob Dawson in that you ought to consider the
possibility of more than one downstream nodes; just in case it happens in
the future, then it will not break your code :-)

| I know this (a non-technical NG) might be the wrong place
| for this, but y'all are so pleasant and bright I thought
| I would bounce it off of you.

I have set follow-up to the oodesign group, please continue the
conversation
there.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer






Back to top
Jim Cooper
Guest





PostPosted: Tue Dec 20, 2005 5:31 pm    Post subject: Re: Collection of thoughts about "Collections" ... follow up Reply with quote




Quote:
... to cause your brain to start overheating !


Yeah, that is what I was afraid of. It never feels
good when it is hot.

The main thing is to remember *not* to apply the marshmallows directly to your
head. You'll never get them out of your hair.

Cheers,
Jim Cooper

__________________________________________

Jim Cooper [email]jcooper (AT) tabdee (DOT) ltd.uk[/email]
Skype : jim.cooper
Tabdee Ltd http://www.tabdee.ltd.uk

TurboSync - Connecting Delphi to your Palm
__________________________________________

Back to top
Joanna Carter [TeamB]
Guest





PostPosted: Tue Dec 20, 2005 6:16 pm    Post subject: Re: Collection of thoughts about "Collections" ... follow up Reply with quote

"Brent S." <brentatatmosoftdotcom> a écrit dans le message de news:
43a84018$1 (AT) newsgroups (DOT) borland.com...

Brent, could I ask you to join the discussion in oodesign, this stuff is way
over the heads of the average non-tech reader Smile)

I have set follow-up there

Thanks

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer


Back to top
Bob
Guest





PostPosted: Tue Dec 20, 2005 7:31 pm    Post subject: Re: Collection of thoughts about "Collections" ... follow up Reply with quote

Quote:
The main thing is to remember *not* to apply the marshmallows directly to
your head. You'll never get them out of your hair.

Maybe follow up should now be set back to Non-Tech?

<g>

"Jim Cooper" <jcooper (AT) tabdee (DOT) ltd.uk> wrote

Quote:

... to cause your brain to start overheating !


Yeah, that is what I was afraid of. It never feels
good when it is hot.

The main thing is to remember *not* to apply the marshmallows directly to
your head. You'll never get them out of your hair.

Cheers,
Jim Cooper

__________________________________________

Jim Cooper [email]jcooper (AT) tabdee (DOT) ltd.uk[/email]
Skype : jim.cooper
Tabdee Ltd http://www.tabdee.ltd.uk

TurboSync - Connecting Delphi to your Palm
__________________________________________



Back to top
Joanna Carter [TeamB]
Guest





PostPosted: Tue Dec 20, 2005 7:58 pm    Post subject: Re: Collection of thoughts about "Collections" ... follow up Reply with quote

"Bob" <Bob (AT) bob (DOT) com> a écrit dans le message de news:
[email]43a85b68 (AT) newsgroups (DOT) borland.com[/email]...

Quote:
Maybe follow up should now be set back to Non-Tech?

Naah, stick around long enough and Jim will buy the beers; that's right
isn't it Jim ? :-)

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer



Back to top
Jim Cooper
Guest





PostPosted: Wed Dec 21, 2005 12:42 am    Post subject: Re: Collection of thoughts about "Collections" ... follow up Reply with quote


Quote:
Naah, stick around long enough and Jim will buy the beers; that's right
isn't it Jim ? Smile

That's right :-)


Cheers,
Jim Cooper

__________________________________________

Jim Cooper [email]jcooper (AT) tabdee (DOT) ltd.uk[/email]
Skype : jim.cooper
Tabdee Ltd http://www.tabdee.ltd.uk

TurboSync - Connecting Delphi to your Palm
__________________________________________

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.