Click here to Skip to main content
15,909,030 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Transparency of an object. Pin
alex.barylski22-Jan-04 22:16
alex.barylski22-Jan-04 22:16 
GeneralOnQueryDragIcon Pin
monrobot1322-Jan-04 20:46
monrobot1322-Jan-04 20:46 
GeneralRe: OnQueryDragIcon Pin
Mike Dimmick23-Jan-04 0:39
Mike Dimmick23-Jan-04 0:39 
GeneralRe: OnQueryDragIcon Pin
Michael Dunn23-Jan-04 4:44
sitebuilderMichael Dunn23-Jan-04 4:44 
GeneralRe: OnQueryDragIcon Pin
monrobot1323-Jan-04 7:50
monrobot1323-Jan-04 7:50 
GeneralRe: OnQueryDragIcon Pin
Michael Dunn23-Jan-04 13:04
sitebuilderMichael Dunn23-Jan-04 13:04 
GeneralRe: OnQueryDragIcon Pin
monrobot1323-Jan-04 20:26
monrobot1323-Jan-04 20:26 
GeneralDesign question (Model-View Pin
Jerome Conus22-Jan-04 20:36
Jerome Conus22-Jan-04 20:36 
Hi !

I've a class CModel containing a list a CPlane objects. The CPlane class has a method called changeOrigin(). The third class CModelViewer is a class displaying the CModel object as a treelist : the CModel object is displayed and the user can expand the CModel and see the list of CPlane contained in the CModel. When the user right-click on a CPlane, he/she can change the origin of the CPlane.

My question is, according to good design rules, how am I supposed to change the origin of the selected CPlane ? Should I change it in the CModelViewer, directly calling the changeOrigin() method of CPlane (but with this way, CModel won't know than one of its CPlane has changed), or should I implement a changePlaneOrigin() in the CModel class, call it from CModelViewer and let CModel change the origin of it's underlying CPlane ? (but with this way, each time I add a method in the CPlane class which would change the state of the CPlane object, I would have to add it in the CModel as well).

I hope I made myself clear enough and I'm looking forward to reading your suggestions !

Thanks !
Jerome

PS: Here is how the class would look :

class CModel
{
public:
CModel();
~CModel();

CPlane[10] m_PlaneList;
};

class CPlane
{
public:
CPlane();
~CPlane();

void setOrigin(Position NewOrigin);
private:
Position m_Origin;
};

GeneralRe: Design question (Model-View Pin
CodeBrain23-Jan-04 1:29
CodeBrain23-Jan-04 1:29 
GeneralOnSetCursor and the keyboard Pin
JadziaMD22-Jan-04 18:58
JadziaMD22-Jan-04 18:58 
GeneralRe: OnSetCursor and the keyboard Pin
Burz22-Jan-04 20:24
Burz22-Jan-04 20:24 
Generalwhere can i find the latest DDK Pin
Monty222-Jan-04 18:33
Monty222-Jan-04 18:33 
GeneralRe: where can i find the latest DDK Pin
berndg22-Jan-04 20:22
berndg22-Jan-04 20:22 
GeneralRe: where can i find the latest DDK Pin
Alexander M.,23-Jan-04 10:15
Alexander M.,23-Jan-04 10:15 
GeneralRegistering Key events when minimized Pin
Tank_Aviator22-Jan-04 18:20
Tank_Aviator22-Jan-04 18:20 
GeneralVS .NET 2003 - STOP OUTLINING FOR GOOD! Pin
shultas22-Jan-04 16:50
shultas22-Jan-04 16:50 
GeneralRe: VS .NET 2003 - STOP OUTLINING FOR GOOD! Pin
Mike Dimmick23-Jan-04 0:44
Mike Dimmick23-Jan-04 0:44 
GeneralWeb Browser Control & WM_SETTINGCHANGE Pin
Jo Fredrickson22-Jan-04 14:31
Jo Fredrickson22-Jan-04 14:31 
GeneralRe: Web Browser Control & WM_SETTINGCHANGE Pin
jasonharrison16-Mar-10 8:17
jasonharrison16-Mar-10 8:17 
GeneralMFC - Fullscreen dialog as the background Pin
Ashman22-Jan-04 13:48
Ashman22-Jan-04 13:48 
GeneralRe: MFC - Fullscreen dialog as the background Pin
alex.barylski22-Jan-04 17:01
alex.barylski22-Jan-04 17:01 
GeneralInitial size of ActiveX control. Pin
clawton22-Jan-04 11:43
clawton22-Jan-04 11:43 
GeneralC++ Code Pin
mixmaster_batman22-Jan-04 11:18
sussmixmaster_batman22-Jan-04 11:18 
GeneralFAQ Pin
Andrew Walker22-Jan-04 13:34
Andrew Walker22-Jan-04 13:34 
GeneralProject settings Pin
adonisv22-Jan-04 10:03
adonisv22-Jan-04 10:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.