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. Just wishful thinking...

Just wishful thinking...

Scheduled Pinned Locked Moved The Lounge
c++xml
20 Posts 8 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.
  • N Norman Fung

    If Code Project can get organized, submit a petition and... 1. get "foreach" construct as part of ANSI standard for C++ 2. augment stdio with an XML parser :) Norman Fung

    I Offline
    I Offline
    Ian Darling
    wrote on last edited by
    #7

    Norman Fung wrote: get "foreach" construct as part of ANSI standard for C++ Take a shufty at <algorithm> header for the following template:

    template
       Function for_each(
          InputIterator _First, 
          InputIterator _Last, 
          Function _Func
       );
    

    It's already part of the standard. If you really want a foreach rather than a for_each, add in:

    #define foreach for_each
    

    :-) Norman Fung wrote: 2. augment stdio with an XML parser And a CSV parser, and an EDI parser, and a Word parser, and an Excel parser, and a SQL Server database file parser, and an AVI parser, and a ZIP parser, and a BMP parser, and a JPG parser, and an MP3 parser, etc etc Our survey says uh-uh


    Ian Darling "The different versions of the UN*X brand operating system are numbered in a logical sequence: 5, 6, 7, 2, 2.9, 3, 4.0, III, 4.1, V, 4.2, V.2, and 4.3" - Alan Filipski

    R T 2 Replies Last reply
    0
    • I Ian Darling

      Norman Fung wrote: get "foreach" construct as part of ANSI standard for C++ Take a shufty at <algorithm> header for the following template:

      template
         Function for_each(
            InputIterator _First, 
            InputIterator _Last, 
            Function _Func
         );
      

      It's already part of the standard. If you really want a foreach rather than a for_each, add in:

      #define foreach for_each
      

      :-) Norman Fung wrote: 2. augment stdio with an XML parser And a CSV parser, and an EDI parser, and a Word parser, and an Excel parser, and a SQL Server database file parser, and an AVI parser, and a ZIP parser, and a BMP parser, and a JPG parser, and an MP3 parser, etc etc Our survey says uh-uh


      Ian Darling "The different versions of the UN*X brand operating system are numbered in a logical sequence: 5, 6, 7, 2, 2.9, 3, 4.0, III, 4.1, V, 4.2, V.2, and 4.3" - Alan Filipski

      R Offline
      R Offline
      Rob Manderson
      wrote on last edited by
      #8

      Ian Darling wrote: a CSV parser, and an EDI parser, and a Word parser, and an Excel parser, and a SQL Server database file parser, and an AVI parser, and a ZIP parser, and a BMP parser, and a JPG parser, and an MP3 parser Greedy!!! :) Rob Manderson **Paul Watson wrote:**What sense would you most dislike loosing? Ian Darling replied. Telepathy Then I'd no longer be able to find out everyones dirty little secrets The Lounge, December 4 2003

      I N 2 Replies Last reply
      0
      • R Rob Manderson

        Ian Darling wrote: a CSV parser, and an EDI parser, and a Word parser, and an Excel parser, and a SQL Server database file parser, and an AVI parser, and a ZIP parser, and a BMP parser, and a JPG parser, and an MP3 parser Greedy!!! :) Rob Manderson **Paul Watson wrote:**What sense would you most dislike loosing? Ian Darling replied. Telepathy Then I'd no longer be able to find out everyones dirty little secrets The Lounge, December 4 2003

        I Offline
        I Offline
        Ian Darling
        wrote on last edited by
        #9

        Rob Manderson wrote: Greedy!!! Well, how am I going to write that amazing program that does everything without being given the exact bits I need as part of the toolset? <WHINGE CLASS=VB_PROGRAMMER IDIOCY=MORE_MORONIC_THAN_USUAL> Why can't I write a media player that exports playlists as XML for my blog, generates JPG images on the fly for trippy visualisations and streams the audio to a thousand listeners in 10 lines of code and some controls on Form1? Then records all the statistics in SQL Server and processes them into a report for other people, transferred using EDI. In a second 10 lines of code and another control on Form1. And a third set of 10 lines of code can manipulate the Bluetooth dongle into a molecularising nano-constructer, and make me a real, live pony called Blossom Flower. </WHINGE> And this is why C++ shouldn't have a standardised, builtin, XML parser - because then the VBers would demand to be able to do the above :-)


        Ian Darling "The different versions of the UN*X brand operating system are numbered in a logical sequence: 5, 6, 7, 2, 2.9, 3, 4.0, III, 4.1, V, 4.2, V.2, and 4.3" - Alan Filipski

        R 1 Reply Last reply
        0
        • R Rob Manderson

          Ian Darling wrote: a CSV parser, and an EDI parser, and a Word parser, and an Excel parser, and a SQL Server database file parser, and an AVI parser, and a ZIP parser, and a BMP parser, and a JPG parser, and an MP3 parser Greedy!!! :) Rob Manderson **Paul Watson wrote:**What sense would you most dislike loosing? Ian Darling replied. Telepathy Then I'd no longer be able to find out everyones dirty little secrets The Lounge, December 4 2003

          N Offline
          N Offline
          Norman Fung
          wrote on last edited by
          #10

          Greedy, yes. ;P Would you recommend an Open Source C/XML parser though? Norman Fung

          R I M 3 Replies Last reply
          0
          • I Ian Darling

            Rob Manderson wrote: Greedy!!! Well, how am I going to write that amazing program that does everything without being given the exact bits I need as part of the toolset? <WHINGE CLASS=VB_PROGRAMMER IDIOCY=MORE_MORONIC_THAN_USUAL> Why can't I write a media player that exports playlists as XML for my blog, generates JPG images on the fly for trippy visualisations and streams the audio to a thousand listeners in 10 lines of code and some controls on Form1? Then records all the statistics in SQL Server and processes them into a report for other people, transferred using EDI. In a second 10 lines of code and another control on Form1. And a third set of 10 lines of code can manipulate the Bluetooth dongle into a molecularising nano-constructer, and make me a real, live pony called Blossom Flower. </WHINGE> And this is why C++ shouldn't have a standardised, builtin, XML parser - because then the VBers would demand to be able to do the above :-)


            Ian Darling "The different versions of the UN*X brand operating system are numbered in a logical sequence: 5, 6, 7, 2, 2.9, 3, 4.0, III, 4.1, V, 4.2, V.2, and 4.3" - Alan Filipski

            R Offline
            R Offline
            Rob Manderson
            wrote on last edited by
            #11

            :laugh::laugh::laugh::laugh: You remind me of someone over on http:/www.dvdrhelp.com[^] about a year ago. At the time a couple of programs had been released that did amazing things in compressing a 2 layer DVD to a single layer without losing all that much quality. Anyway, this guy was somewhat dissatisfied with either offering and had this 'amazing' idea of how it could be much better. All he needed was a programmer to write a couple of 'easy' pieces to his grand scheme. I must confess I did play with his mind a bit :) Rob Manderson **Paul Watson wrote:**What sense would you most dislike loosing? Ian Darling replied. Telepathy Then I'd no longer be able to find out everyones dirty little secrets The Lounge, December 4 2003

            1 Reply Last reply
            0
            • N Norman Fung

              Greedy, yes. ;P Would you recommend an Open Source C/XML parser though? Norman Fung

              R Offline
              R Offline
              Rob Manderson
              wrote on last edited by
              #12

              If I could I would. Alas, I haven't dabbled in XMS yet (but it will happen) :) Rob Manderson **Paul Watson wrote:**What sense would you most dislike loosing? Ian Darling replied. Telepathy Then I'd no longer be able to find out everyones dirty little secrets The Lounge, December 4 2003

              1 Reply Last reply
              0
              • N Norman Fung

                Greedy, yes. ;P Would you recommend an Open Source C/XML parser though? Norman Fung

                I Offline
                I Offline
                Ian Darling
                wrote on last edited by
                #13

                Norman Fung wrote: Would you recommend an Open Source C/XML parser though? Given my XML experiences starts with me trying to write my own, and ending with MSXML and System.Xml, I'm afraid not. I keep hearing about this SAX thing though.


                Ian Darling "The different versions of the UN*X brand operating system are numbered in a logical sequence: 5, 6, 7, 2, 2.9, 3, 4.0, III, 4.1, V, 4.2, V.2, and 4.3" - Alan Filipski

                N 1 Reply Last reply
                0
                • I Ian Darling

                  Norman Fung wrote: Would you recommend an Open Source C/XML parser though? Given my XML experiences starts with me trying to write my own, and ending with MSXML and System.Xml, I'm afraid not. I keep hearing about this SAX thing though.


                  Ian Darling "The different versions of the UN*X brand operating system are numbered in a logical sequence: 5, 6, 7, 2, 2.9, 3, 4.0, III, 4.1, V, 4.2, V.2, and 4.3" - Alan Filipski

                  N Offline
                  N Offline
                  Norman Fung
                  wrote on last edited by
                  #14

                  Thanks. Will look it up. In case if someone is curious: SAX[^] Norman Fung

                  1 Reply Last reply
                  0
                  • N Norman Fung

                    Greedy, yes. ;P Would you recommend an Open Source C/XML parser though? Norman Fung

                    M Offline
                    M Offline
                    Mike Dimmick
                    wrote on last edited by
                    #15

                    How about Xerces[^], from the Apache group? OK, C++ rather than C.

                    1 Reply Last reply
                    0
                    • N Norman Fung

                      If Code Project can get organized, submit a petition and... 1. get "foreach" construct as part of ANSI standard for C++ 2. augment stdio with an XML parser :) Norman Fung

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

                      std::for_each already exists in <algorithm> My article on a reference-counted smart pointer that supports polymorphic objects and raw pointers

                      1 Reply Last reply
                      0
                      • I Ian Darling

                        Norman Fung wrote: get "foreach" construct as part of ANSI standard for C++ Take a shufty at <algorithm> header for the following template:

                        template
                           Function for_each(
                              InputIterator _First, 
                              InputIterator _Last, 
                              Function _Func
                           );
                        

                        It's already part of the standard. If you really want a foreach rather than a for_each, add in:

                        #define foreach for_each
                        

                        :-) Norman Fung wrote: 2. augment stdio with an XML parser And a CSV parser, and an EDI parser, and a Word parser, and an Excel parser, and a SQL Server database file parser, and an AVI parser, and a ZIP parser, and a BMP parser, and a JPG parser, and an MP3 parser, etc etc Our survey says uh-uh


                        Ian Darling "The different versions of the UN*X brand operating system are numbered in a logical sequence: 5, 6, 7, 2, 2.9, 3, 4.0, III, 4.1, V, 4.2, V.2, and 4.3" - Alan Filipski

                        T Offline
                        T Offline
                        Tim Smith
                        wrote on last edited by
                        #17

                        The STL for each is a primitive excuse for a for each. The construct is a kludge. Not to mention that even people like Meyers produce slower and more obscure bugs with this nasty construct trying to get it to do what they want. A true for each would be nice. Tim Smith I'm going to patent thought. I have yet to see any prior art.

                        J 1 Reply Last reply
                        0
                        • N Norman Fung

                          If Code Project can get organized, submit a petition and... 1. get "foreach" construct as part of ANSI standard for C++ 2. augment stdio with an XML parser :) Norman Fung

                          J Offline
                          J Offline
                          Joe Woodbury
                          wrote on last edited by
                          #18

                          Boo! Hiss! If we're going to have a petition, why not get rid of the absurd abbreviations for wide string functions and, while at it, change wchar_t to wchar? By rule, unicode equivilants of standard library functions should simply have a 'w' in front of them. Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                          N 1 Reply Last reply
                          0
                          • J Joe Woodbury

                            Boo! Hiss! If we're going to have a petition, why not get rid of the absurd abbreviations for wide string functions and, while at it, change wchar_t to wchar? By rule, unicode equivilants of standard library functions should simply have a 'w' in front of them. Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                            N Offline
                            N Offline
                            Norman Fung
                            wrote on last edited by
                            #19

                            haha.. but it's the underscore that make us proud C++ programmers. Norman Fung

                            1 Reply Last reply
                            0
                            • T Tim Smith

                              The STL for each is a primitive excuse for a for each. The construct is a kludge. Not to mention that even people like Meyers produce slower and more obscure bugs with this nasty construct trying to get it to do what they want. A true for each would be nice. Tim Smith I'm going to patent thought. I have yet to see any prior art.

                              J Offline
                              J Offline
                              Joe Woodbury
                              wrote on last edited by
                              #20

                              Tim Smith wrote: produce slower and more obscure bugs What are slower bugs? Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                              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