Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9018523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:32:55+00:00 2026-06-16T04:32:55+00:00

Django comes with this great approach, where all you have todo is write your

  • 0

Django comes with this great approach, where all you have todo is write your data model, and Django will generate the correct (most basic) view according to your model properties.

E.g:

class Article(models.Model):
    pub_date = models.DateTimeField()
    headline = models.CharField(max_length=200)
    content = models.TextField()
    reporter = models.ForeignKey(Reporter)

    def __unicode__(self):
        return self.headline

Any forms displayed by Django will already use the correct and appropriate field type that matches the property type (DateTimeField, CharField, TextField, etc).

I was wondering whether the same is possible with C++? I’m thinking of writing an application settings class, and I don’t want to build the dialog window by hand. I’d prefer if I could build a dialog automatically. I don’t care about the order and position of the individual input-fields. I think that this should be possible, given that I follow the Model View Controller pattern anyway.

EDIT I’d appreciate it if answers could include example code or links to examples.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:32:56+00:00Added an answer on June 16, 2026 at 4:32 am

    In C++ there is no reflection mechanism allowing you to query members of a class, so it is not possible to achieve what you want as easily as in Python. But, you can apply techniques used by C++ serialization libraries, for example Boost. In essence, you need to add to your class an equivalent of the boost serialization serialize method, which will compensate for the lack of the reflection facilities needed to retrieve information on class’ members, here is a boost serialization tutorial explaining this: http://www.boost.org/doc/libs/1_35_0/libs/serialization/doc/serialization.html.

    Another option, also used by some C++ serialization systems, is to parse the C++ class source code and generate C++ code which does the serialization (in your case that would be generating GUI dialogs as well).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the standard User model (django.contrib.auth) which comes with Django. I have
I have some Django models with a structure similar to this: class Grandparent(models.Model): name
This doesn't seem to work in django 1.1 (I believe this will require a
I have a problem with django's MVC. I understand that this is not the
I seem to have a problem with Django when it comes Rendering ManyToManyField in
Base class looks like this (code comes from Django, but the question isn't Django
I am sure many Django developers must come across this issue when using the
django guardian https://github.com/lukaszb/django-guardian is a really well written object-level permissions app; and I have
django 1.4,python 2.6.6. I have an app jobs. my files tree: djproject/ |-- djproject
When I run python ./manage.py sql grading my django site comes up with: Error:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.