Please advise

  • Thread starter Thread starter GTi
  • Start date Start date
G

GTi

What is the best method for doing this:

Connection class containing:
- Connection handle
- Connection name
- connection properties
- disconnection of connection

Group class containing:
- connection handle
- group handle
- group name
- group properties
- disconnection of group

Item class containing:
- connection handle
- group handle
- item handle
- item name
- item properties
- disconnection of item

A Connection can contain 1...n groups and
a group can cointain 1...n items.
It looks like a tree.

What is the best design of this class?
Examples og URL with samples is prefered since I am a novice.

Best regards
GTi
 
And I must be able to search for a item based on:
- the group + item handle
- connection + group + item name
 
Hello GTi,

You dont have advise about designing this class but I suggest to build it
around XmlDocument.
This way you`ll have
1. Tree like structure
2. Searching capabilties using XPath
3. You could implement each element (such a group or connection) as node
element.
4. This class could be serizlized very easy since all class structure(important
pieces) should be there already.

Hope it helps,
Oleg
 
Oleg,

XmlDocument make me think about files.
This handles is connections handles to other computers (DCOM). I don't
need to save it in a file, just in memory. But maybe i'm wrong.
Was thinking of crating a class and using SortedLists but if there is
utillity that is better...
Will have a look on it.
 
Hello GTi,
When I was saying XmlDocument I didnt mean to use it as a file but just as
in memeory tree representation which will siplify your managment.
 
Back
Top