Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » when to use struct, when - class, for a derived widget?
when to use struct, when - class, for a derived widget? [message #205] Sat, 03 December 2005 12:30 Go to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
when to use struct, when - class, for a derived from e.g TopWindow?
e.g
class SimpleWindow : public TopWindow {
public:
	typedef SimpleWindow CLASSNAME;

	SimpleWindow();
};


struct SimpleWindow : public TopWindow {
public:
	typedef SimpleWindow CLASSNAME;

	SimpleWindow();
};
Re: when to use struct, when - class, for a derived widget? [message #220 is a reply to message #205] Sun, 04 December 2005 18:34 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, I think this is more about personal preferences and actual situation....

Personally, I use "class" if I am creating some widget that is supposed to be reused and will therefore have to have clean interface and well defined public members.

In "top-level" (or "end-user", I mean apps I create for customers) applications where I am about to create some widget/window to resolve one-time problem, I am often using "struct" for everything (without "private" section).

Actually, to tell the truth, for "end-user" apps, I am often producing the least refined code... Smile
Next Topic: Focus sticks in MenuBar when iterating with TAB key
Goto Forum:
  


Current Time: Sun Apr 28 02:11:00 CEST 2024

Total time taken to generate the page: 3.92050 seconds