Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Gammastrahler

C++ Class Design Patterns

This topic is 5550 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i´m currently working on a console window which enables command line actions. I have a class CWindow which encapsulates a Win32 window from which any kind of window can be created. Then i have a class CConsole which is derived from CWindow. But it starts to get messy: My Console class is scattered with the drawing methods, the text editor engine methods, user interaction, as well as the methods parsing / dispatching of commands. Would you suggest to wrap each component in an own class? Or use some design pattern (like policies?) I have the problem that when my classes get bigger i loose control over my own code can anyone give me some good hints? thanks Gammastrahler

Share this post


Link to post
Share on other sites
Advertisement
Yes, breaking your classes up into responsibility specific components is one of the main points of OO.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!