Author Topic: Class designer  (Read 1526 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12027
    • Travis build status
Re: Class designer
« Reply #15 on: July 30, 2019, 07:22:39 pm »
... The difficult part will be inheritance relationships between classes...
Hm, what about macros and templates? 8)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sodev

  • Regular
  • ***
  • Posts: 327
Re: Class designer
« Reply #16 on: July 30, 2019, 07:24:38 pm »
It is way more than that.

There are more keywords than class to look for, you have to understand modifiers, virtual inheritance, multiple inheritance, visibility, namespaces, namespace aliases, inline namespaces. And then of course all the nasty things you can do with the preprocessor, conditional compilation, macros. Even the syntax is not that easy than you think, scatter some inline comments between the components, move the separators around, omit whitespace, don't get confused by forward declarations. Plus that what oBFusCATed wrote before i finished this text :D.

If you don't deal with all that you end up with very limited functionality that pretty much only covers cases in which you don't need the diagram at all or simply can take a look whatever doxygen generates for you.

Offline Krice

  • Almost regular
  • **
  • Posts: 130
Re: Class designer
« Reply #17 on: July 30, 2019, 10:31:22 pm »
There are more keywords than class to look for, you have to understand modifiers, virtual inheritance, multiple inheritance, visibility, namespaces, namespace aliases, inline namespaces.

I don't have to, because I can write that tool only for my own code. Besides now that I think about it you seem to know a lot about this subject. Why don't you create a class designer tool for Code::Blocks? Yes, yes. It's all clear now. You must do it. I put my faith and trust on you.

Offline Krice

  • Almost regular
  • **
  • Posts: 130
Re: Class designer
« Reply #18 on: August 01, 2019, 05:47:48 pm »
The project can now find classes and structs with total of 278 lines of code. Using std::find for strings is easy and also ifstream for loading file data. The output is taken from the project itself and looks like this:

Code: [Select]
File: filedata.cpp
-
File: filedata.h
classFiledata{
classFiles{
File: main.cpp
-
File: parser.cpp
-
File: parser.h
structToken{
classParser{