Thread: Wrapper classes

  1. #16
    Registered User
    Join Date
    Mar 2009
    Posts
    43
    Elysia & Syntax Error - both of your above pieces of code make much more sense to me now :-) I think I'm taking the wrong approach, like there's just one set way of creating a wrapper class - but from what people are saying here there seems to be several.

    When I'm finally out of my crappy job and making worthwhile money programming I shall remember all this help you all put in!! It's really appreciated so thanks :-) I don't go to college or anything like that since I couldn't afford it - so you're all acting as my tutors lol. Hopefully one day I'll be in a position to be the helper rather than helpee!!

  2. #17
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937
    Fortunately for you, college doesn't teach commercially-viable programming skills.
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  3. #18
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    The coding world is just packed full of wrappers!
    A wrapper is something that makes something else easier to deal with, though there's usually nothing stopping you from just using that other thing directly. They also don't add any functionality beyond the thing they're wrapping. In fact they often expose a reduced set of functionality, jsut to make the underlying thing they're wrapping easier to deal with.
    They can wrap another class, or a bunch of classes, or just a bunch of free functions that perhaps belong to some kind of API.

    For example, Much of libraries like MFC can be considered to be a bunch of wrappers. A CWindow is really just a wrapper around the HWND data type, plus much of the functionality of the Win32 API made conveniently available as member functions.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OOP Question DB Access Wrapper Classes
    By digioz in forum C# Programming
    Replies: 2
    Last Post: 09-07-2008, 04:30 PM
  2. Can you Initialize all classes once with New?
    By peacerosetx in forum C++ Programming
    Replies: 12
    Last Post: 07-02-2008, 10:47 AM
  3. WinAPI wrapper classes
    By Hunter2 in forum Windows Programming
    Replies: 8
    Last Post: 12-14-2004, 05:22 PM
  4. Exporting VC++ classes for use with VB
    By Helix in forum Windows Programming
    Replies: 2
    Last Post: 12-29-2003, 05:38 PM
  5. wrapper classes?
    By curlious in forum C++ Programming
    Replies: 6
    Last Post: 08-27-2003, 09:26 PM