Wrapper class
-
What would your definition of a wrapper class be.
Cheers Garth Some days it's not even worth chewing through the restraints
Something similar to what my definition of a Taco Shell would be. You don't really need to know about what's inside it from the shell you can tell it's a taco. Just know that it's going to be amazing and the flavor will be unreal. At least for the taco's at our house.
My name is Maximus Decimus Meridius, Commander of the Armies of the North, General of the Felix Legions, loyal servant to the true emperor, Marcus Aurelius. Father to a murdered process, husband to a murdered thread. And I will have my affinity, in this life or the next. - Gladiator. (Okay, not quite Gladiator but close.) I work to live. I do not live to work. My clients do not seem capable of grasping this fact.
-
A class that does little or no real work itself, instead passing requests off onto one or more other classes / APIs.
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
Shog9 wrote:
A class that does little or no real work itself, instead passing requests off onto one or more other classes / APIs.
Yeah, that's a good definition. I tend to think of wrapper classes as providing a higher level of abstraction to the outside world so that the underlying API that they're "wrapping" is easier to use.
-
Shog9 wrote:
A class that does little or no real work itself, instead passing requests off onto one or more other classes / APIs.
Yeah, that's a good definition. I tend to think of wrapper classes as providing a higher level of abstraction to the outside world so that the underlying API that they're "wrapping" is easier to use.
Leslie Sanford wrote:
I tend to think of wrapper classes as providing a higher level of abstraction to the outside world so that the underlying API that they're "wrapping" is easier to use.
Well, it is nice when it works out that way... ;)
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
-
Something similar to what my definition of a Taco Shell would be. You don't really need to know about what's inside it from the shell you can tell it's a taco. Just know that it's going to be amazing and the flavor will be unreal. At least for the taco's at our house.
My name is Maximus Decimus Meridius, Commander of the Armies of the North, General of the Felix Legions, loyal servant to the true emperor, Marcus Aurelius. Father to a murdered process, husband to a murdered thread. And I will have my affinity, in this life or the next. - Gladiator. (Okay, not quite Gladiator but close.) I work to live. I do not live to work. My clients do not seem capable of grasping this fact.
Heh, good thing this is the lounge.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
-
What would your definition of a wrapper class be.
Cheers Garth Some days it's not even worth chewing through the restraints
Garth Watkins wrote:
What would your definition of a wrapper class be.
I'd say that a wrapper class presents a proxy to some other class or API that may be at a lower level of abstraction or may be from a different framework. But then I've always sucked at defining things clearly :)
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
C++/CLI in Action (*E-Book is out, Print version April 6th*) -
Heh, good thing this is the lounge.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
:omg:
My name is Maximus Decimus Meridius, Commander of the Armies of the North, General of the Felix Legions, loyal servant to the true emperor, Marcus Aurelius. Father to a murdered process, husband to a murdered thread. And I will have my affinity, in this life or the next. - Gladiator. (Okay, not quite Gladiator but close.) I work to live. I do not live to work. My clients do not seem capable of grasping this fact.
-
I dont know.. I'm asking you. Or maybe your sense of humour has eluded me.
Cheers Garth Some days it's not even worth chewing through the restraints
the second part was meant seriously. In my eyes, there's no difference between "wraapper" and "adapter" class, though use differs a little bit. Basically, a wrapper class puts a different interface around an implementation. This could be an OO Wrapper for a procedural file API (like MFC's CFile), or a class implementing the IStream on top of CFile. The first is almost always called "wrapper" class, for the second, "adapter" is more common.
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers!
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
Linkify!|Fold With Us! -
What would your definition of a wrapper class be.
Cheers Garth Some days it's not even worth chewing through the restraints
Garth Watkins wrote:
What would your definition of a wrapper class be.
Putting together a few of the responses--most classes are like taco filling. Lettuce, meat, cheese, and at all doesn't hold together very well. A wrapper class, like a taco shell, doesn't do much itself, it just makes it easy to hold together all the rest of the stuff. ;P Marc
People are just notoriously impossible. --DavidCrow
There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith -
What would your definition of a wrapper class be.
Cheers Garth Some days it's not even worth chewing through the restraints
I'd have to describe a wrapper class as a module that hides something ugly and useless - like MFC Comms, TAPI, and MAPI - behind a friendly, usable facade, like cModem, cPBX or cPostOffice. A wrapper probably should not only make something usable, but also shield a non-expert user from self-inflicted wounds arising from misunderstood or undocumented functions while trying to use the useless. Either that, or it's a taco of some kind. Or maybe a course at McDonalds U on neatly packaging toxic waste 'to go'.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
-
:omg:
My name is Maximus Decimus Meridius, Commander of the Armies of the North, General of the Felix Legions, loyal servant to the true emperor, Marcus Aurelius. Father to a murdered process, husband to a murdered thread. And I will have my affinity, in this life or the next. - Gladiator. (Okay, not quite Gladiator but close.) I work to live. I do not live to work. My clients do not seem capable of grasping this fact.
-
Garth Watkins wrote:
What would your definition of a wrapper class be.
Putting together a few of the responses--most classes are like taco filling. Lettuce, meat, cheese, and at all doesn't hold together very well. A wrapper class, like a taco shell, doesn't do much itself, it just makes it easy to hold together all the rest of the stuff. ;P Marc
People are just notoriously impossible. --DavidCrow
There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh SmithI am getting really hungry. And i'm out of taco shells. :sigh: Taco salad it is... :rolleyes:
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
-
Heh, good edit. ;)
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
How can you tell I changed it? I didn't know you had moderator powers??? :vegemite::-D
My name is Maximus Decimus Meridius, Commander of the Armies of the North, General of the Felix Legions, loyal servant to the true emperor, Marcus Aurelius. Father to a murdered process, husband to a murdered thread. And I will have my affinity, in this life or the next. - Gladiator. (Okay, not quite Gladiator but close.) I work to live. I do not live to work. My clients do not seem capable of grasping this fact.
-
How can you tell I changed it? I didn't know you had moderator powers??? :vegemite::-D
My name is Maximus Decimus Meridius, Commander of the Armies of the North, General of the Felix Legions, loyal servant to the true emperor, Marcus Aurelius. Father to a murdered process, husband to a murdered thread. And I will have my affinity, in this life or the next. - Gladiator. (Okay, not quite Gladiator but close.) I work to live. I do not live to work. My clients do not seem capable of grasping this fact.
Amazing the useless things my memory chooses to hold onto sometimes, eh? :rolleyes:
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
-
What would your definition of a wrapper class be.
Cheers Garth Some days it's not even worth chewing through the restraints
-
What would your definition of a wrapper class be.
Cheers Garth Some days it's not even worth chewing through the restraints
You know, the cellophane thingie they wrap things in. Also, Saran Wrap. :-D
-
What would your definition of a wrapper class be.
Cheers Garth Some days it's not even worth chewing through the restraints
Jiffy(TM)
-
Shog9 wrote:
A class that does little or no real work itself, instead passing requests off onto one or more other classes / APIs.
Yeah, that's a good definition. I tend to think of wrapper classes as providing a higher level of abstraction to the outside world so that the underlying API that they're "wrapping" is easier to use.
An implementation of the Façade pattern.
-
I don't think so. I'm not asking how to accomplish a certain programming task. It's actually a second opinion I'm looking for. A friend of mine asked me my defintion of a wrapper class was. I gave her my opinion, and offered to post the a question on codeproject to see what you guys/gals come up with.
Cheers Garth Some days it's not even worth chewing through the restraints
Hmmm...I wonder what they discuss on the Mathematics and Algorithms[^] forum? :rolleyes:
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopes