Find and share HowTos to various installations / configurations!
5 posts • Page 1 of 1
5 posts
• Page 1 of 1
shokkul
Posts:37
Joined: Mon Feb 25, 2019 8:50 am
Parsing Class Definition (class methods etc)
Postby shokkul »
Hello All,
I want to parse class definition to get methods and variables. On top of it I want to parse methods further like which inputs are used, what are the type of these inputs. I checked helped section but I could not find suitable function for my objective. Also I checked HighSpeedProgramming and doxygen classes, since technically these functionalities should parse the class/methods to achieve their goal, whether I can use some function from there but I could not detect it.
So is there any function that can help me? I really don't want write my own parser if there is a function that is already doing what I want to achieve.
e.g For class definition parser, I imagine a function that gives all the information about class methods, variables in a mapping
You can write a parser or use the C++ API to create an CTRL Extension that use getCtrlFuncs() which outputs all functions as well. I did both in the past
CTRL Extension & getCtrlFuncs() is the fast and easiest way. There is no ready to use ctrl function.
Sorry for late reply, we started our feature that needs parsing again. I am using Controller class to get CtrlScript so I can use getCtrlFuncs() as you suggested. However I could not achive to do it. Do you have any example how to use these classes and get script/class functions and its properties with ctrlExtension?
I made some progress, now I can parse scripts with free functions, however when I parse classes, getCtrlFuncs() returns null value. How can I parse the class?