Thursday 15 September 2011

What design should I use so a class can query one of it's ancestors? -


I am creating an object hierarchy that is representing a table that has to draw on a control. My hierarchy looks like this:

  There are multiple pages in the page Multiple rows in the page There are many cells in the line There are several glyphs near the cell  

me There should be an option (to display a parameter) on the table to filter the column (cells). Client code can do something like this:

  will display 12 of myTable.ShowColumns (8,12) // columns  

Control cells by displaying and placing It is the responsibility of objects on the line. Which cell can be displayed in the line object from the table object, how can I pass the information?

Should I give each row a reference to the table objection? Should I try to pass the information every time through the hierarchy in each row, Table.ShowColumns () is called?

Should be a great way?

I do not think design pattern is required (or I would not say it like this) Why not use double links where children are connected to parents and vice versa?


No comments:

Post a Comment