Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Wrapper class

Wrapper class

Scheduled Pinned Locked Moved The Lounge
28 Posts 16 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C code frog 0

    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 Offline
    A Offline
    Andy Brummer
    wrote on last edited by
    #14

    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

    C 1 Reply Last reply
    0
    • G Garth Watkins

      What would your definition of a wrapper class be.

      Cheers Garth Some days it's not even worth chewing through the restraints

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #15

      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*)

      1 Reply Last reply
      0
      • A Andy Brummer

        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

        C Offline
        C Offline
        code frog 0
        wrote on last edited by
        #16

        :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.

        S 1 Reply Last reply
        0
        • G Garth Watkins

          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

          P Offline
          P Offline
          peterchen
          wrote on last edited by
          #17

          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!

          1 Reply Last reply
          0
          • G Garth Watkins

            What would your definition of a wrapper class be.

            Cheers Garth Some days it's not even worth chewing through the restraints

            M Offline
            M Offline
            Marc Clifton
            wrote on last edited by
            #18

            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

            Thyme In The Country
            Interacx

            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

            S 1 Reply Last reply
            0
            • G Garth Watkins

              What would your definition of a wrapper class be.

              Cheers Garth Some days it's not even worth chewing through the restraints

              R Offline
              R Offline
              Roger Wright
              wrote on last edited by
              #19

              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"

              1 Reply Last reply
              0
              • C code frog 0

                :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.

                S Offline
                S Offline
                Shog9 0
                wrote on last edited by
                #20

                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

                C 1 Reply Last reply
                0
                • M Marc Clifton

                  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

                  Thyme In The Country
                  Interacx

                  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

                  S Offline
                  S Offline
                  Shog9 0
                  wrote on last edited by
                  #21

                  I 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

                  1 Reply Last reply
                  0
                  • S Shog9 0

                    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

                    C Offline
                    C Offline
                    code frog 0
                    wrote on last edited by
                    #22

                    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.

                    S 1 Reply Last reply
                    0
                    • C code frog 0

                      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.

                      S Offline
                      S Offline
                      Shog9 0
                      wrote on last edited by
                      #23

                      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

                      1 Reply Last reply
                      0
                      • G Garth Watkins

                        What would your definition of a wrapper class be.

                        Cheers Garth Some days it's not even worth chewing through the restraints

                        M Offline
                        M Offline
                        Member 96
                        wrote on last edited by
                        #24

                        What Grandmaster Flash and the Furious Five are teaching now?

                        1 Reply Last reply
                        0
                        • G Garth Watkins

                          What would your definition of a wrapper class be.

                          Cheers Garth Some days it's not even worth chewing through the restraints

                          V Offline
                          V Offline
                          Vivi Chellappa
                          wrote on last edited by
                          #25

                          You know, the cellophane thingie they wrap things in. Also, Saran Wrap. :-D

                          1 Reply Last reply
                          0
                          • G Garth Watkins

                            What would your definition of a wrapper class be.

                            Cheers Garth Some days it's not even worth chewing through the restraints

                            B Offline
                            B Offline
                            Brady Kelly
                            wrote on last edited by
                            #26

                            Jiffy(TM)

                            1 Reply Last reply
                            0
                            • L Leslie Sanford

                              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.

                              B Offline
                              B Offline
                              Brady Kelly
                              wrote on last edited by
                              #27

                              An implementation of the Façade pattern.

                              1 Reply Last reply
                              0
                              • G Garth Watkins

                                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

                                J Offline
                                J Offline
                                JimmyRopes
                                wrote on last edited by
                                #28

                                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

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups