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

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

    A programming question! :~

    Simply Elegant Designs JimmyRopes Designs
    Think inside the box! ProActive Secure Systems
    I'm on-line therefore I am. JimmyRopes

    G 1 Reply Last reply
    0
    • J JimmyRopes

      A programming question! :~

      Simply Elegant Designs JimmyRopes Designs
      Think inside the box! ProActive Secure Systems
      I'm on-line therefore I am. JimmyRopes

      G Offline
      G Offline
      Garth Watkins
      wrote on last edited by
      #3

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

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #4

        Clearly that would be an educational activity for elves aspiring to work in Santa's warehouse! *runs and ducks for cover*

        Paul

        Where are you?[^]
        How much time is left?[^]

        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

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

          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

          Richard Andrew x64R L 2 Replies Last reply
          0
          • S Shog9 0

            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

            Richard Andrew x64R Offline
            Richard Andrew x64R Offline
            Richard Andrew x64
            wrote on last edited by
            #6

            Analogous to some co-workers I have known.

            -------------------------------- "All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke

            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

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

              A taco class? Wouldn't "adapter class" be the same?


              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!

              G S 2 Replies 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
                Ravi Bhavnani
                wrote on last edited by
                #8

                A wrapper class could be likened to an adapter or a facade. See this[^] Wikipedia link. /ravi

                This is your brain on Celcius Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

                1 Reply Last reply
                0
                • P peterchen

                  A taco class? Wouldn't "adapter class" be the same?


                  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!

                  G Offline
                  G Offline
                  Garth Watkins
                  wrote on last edited by
                  #9

                  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 1 Reply Last reply
                  0
                  • P peterchen

                    A taco class? Wouldn't "adapter class" be the same?


                    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!

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

                    Wrapper Class, n.     See Adapter Class. Adapter Class, n.     See Facade Class. Facade Class, n.     See Wrapper Class...

                    ----

                    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

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

                      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 1 Reply Last reply
                      0
                      • S Shog9 0

                        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

                        L Offline
                        L Offline
                        Leslie Sanford
                        wrote on last edited by
                        #12

                        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.

                        S B 2 Replies 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.

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

                          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

                          1 Reply Last reply
                          0
                          • 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
                                          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