How to get list of C++ class names from source code
-
How to get list of C++ class name from source code. I have created few sequence and class diagram using EA tool which I need to verify. I tried to use sourcmonitor tool but it gives only number of classes in a particular source file. But does not generate any class name list.
-
How to get list of C++ class name from source code. I have created few sequence and class diagram using EA tool which I need to verify. I tried to use sourcmonitor tool but it gives only number of classes in a particular source file. But does not generate any class name list.
Some pseudocode to get you started:
Open .h file
Repeat
Read line from file
If line starts with "class ", next word is class name
Until EOF
Close fileThere may be some situations where this might not work.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
-
Some pseudocode to get you started:
Open .h file
Repeat
Read line from file
If line starts with "class ", next word is class name
Until EOF
Close fileThere may be some situations where this might not work.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
Ha Ha!! Up voted Man!