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. General Programming
  3. C / C++ / MFC
  4. Reflection in c++

Reflection in c++

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
4 Posts 4 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.
  • R Offline
    R Offline
    Ravi Jadhav
    wrote on last edited by
    #1

    Hi I wanted to produce a mechanism like Reflection in c++ (without using dot net framework).can i do that..? How..? Is there any framework available to achieve this mechanism? Or simple i will provide a class name in a string to a function that function will return me a new object of that class. is it possible in simple C++ (Not using MFC or dot net). If yes please let me know also. Thanks in advance Ravi

    J M F 3 Replies Last reply
    0
    • R Ravi Jadhav

      Hi I wanted to produce a mechanism like Reflection in c++ (without using dot net framework).can i do that..? How..? Is there any framework available to achieve this mechanism? Or simple i will provide a class name in a string to a function that function will return me a new object of that class. is it possible in simple C++ (Not using MFC or dot net). If yes please let me know also. Thanks in advance Ravi

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

      It's possible to emulate the effects of reflection and there are several attempts to provide this on the net. A few starters are http://cppxmlobj.sourceforge.net/index.html[^] and https://sourceforge.net/projects/reflection/[^] - have a look through google for more.

      1 Reply Last reply
      0
      • R Ravi Jadhav

        Hi I wanted to produce a mechanism like Reflection in c++ (without using dot net framework).can i do that..? How..? Is there any framework available to achieve this mechanism? Or simple i will provide a class name in a string to a function that function will return me a new object of that class. is it possible in simple C++ (Not using MFC or dot net). If yes please let me know also. Thanks in advance Ravi

        M Offline
        M Offline
        melwyn
        wrote on last edited by
        #3

        What is Reflection? I have heard about it in the context of Java.

        1 Reply Last reply
        0
        • R Ravi Jadhav

          Hi I wanted to produce a mechanism like Reflection in c++ (without using dot net framework).can i do that..? How..? Is there any framework available to achieve this mechanism? Or simple i will provide a class name in a string to a function that function will return me a new object of that class. is it possible in simple C++ (Not using MFC or dot net). If yes please let me know also. Thanks in advance Ravi

          F Offline
          F Offline
          FearlessBurner
          wrote on last edited by
          #4

          I am also not familiar with Reflection. However if all you want to do is to produce a new class object based on the string passed into a function, one of the factory methods would work fine. For achieving your simple aim, the Builder method or the Abstract Factory should suffice. I believe that there are various cool methods already on CodeProject on these subjects.

          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