Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Please define wrapper class

Posted on 2006-11-30
4
Medium Priority
?
1,063 Views
Last Modified: 2008-02-01
I hear the term "wrapper class" used all the time but have never seen an actual defintion of it.

What does it mean? Is there a formal definition?

I guessed it could mean  a class that contains or inherits another class and perhaps exposes some of the included or inherited class methods and properties.

0
Comment
Question by:Christopher Schene
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 18046601
That's pretty much it...

I've also seen in other languages where a control must be housed by something else to make it work, and then you need to "echo" all the inherent events to outside subscribers using custom events.

Sometimes a "wrapper class" is used to make things easier:
http://en.wikipedia.org/wiki/Fa%C3%A7ade_pattern

In Java, the primitives are wrapped to allow them to be treated as objects:
http://en.wikipedia.org/wiki/Wrapper_class
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 18046613
0
 
LVL 22

Expert Comment

by:_TAD_
ID: 18049190
I see it most often used for commonly used API calls.

Suppose you really like the Win API Bit Block Transfer (BitBlT) that everyone used back in the VB6 days.

Calling DllImport and marshalByRef and al lthat other crap gets to be a pain to do a simple BitBlt over and over.

So you create a class that does all of the Marshaling and dllimport and then you simple call the .net class
0
 
LVL 7

Expert Comment

by:mjmarlow
ID: 18051159
Not for the points, as the others have covered this well enough but here is my two cents

Wrapper class is a class that simplifies functionality by providing any of or combination of the following:
1.   Expose methods with fewer input parameters than would otherwise be needed.
2.   Aggregates method calls into a single method call.
3.   Redefines method, or property names for the sake of clarity or obscurity.
4.   Aggregates two or more classes to create a multiple inheritance effect.


0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question