Replies: 4 comments
-
The PQName has a |
Beta Was this translation helpful? Give feedback.
-
I will note that I definitely agree that using this for very simple things is still rather annoying. I'm definitely open to ideas for adding things to make it simpler to retrieve information. Or maybe someone needs to create a few examples to show how to do these things? Or add documentation. |
Beta Was this translation helpful? Give feedback.
-
I guess that if one knows the syntax, many things are workable. The structure of C++ can be 'hard' so that a perfect and extremely syntax is never easy. I will play around and consider submitting an example for review. For now I document this example: from cxxheaderparser.simple import parse_string
docstrings = {}
data = parse_string(txt)
for namespace in data.namespace.namespaces:
for i in data.namespace.namespaces[namespace].functions:
if i.doxygen:
docstrings[f"{namespace}::{i.name.format()}"] = i.doxygen
for i in data.namespace.namespaces[namespace].classes:
class_name = i.class_decl.typename.format().split("class ")[1]
docstrings[f"{namespace}::{class_name}"] = i.class_decl.doxygen
for j in i.methods:
if j.doxygen:
docstrings[f"{namespace}::{class_name}::{j.name.format()}"] = j.doxygen |
Beta Was this translation helpful? Give feedback.
-
The class name thing is a bit weird. Probably should add a cxxheaderparser/cxxheaderparser/types.py Line 181 in 29b71ab |
Beta Was this translation helpful? Give feedback.
-
Problem description
Thanks for the module!!
Consider
What is the API to read the doxygen doc of
name::foo
,name::Bar
, orname::Bar::count
?In trying to get the first I already got lost. This is up to where I have gotten:
whereby I get stuck as I don't know how to easily match the name.
Reproducible example code
Beta Was this translation helpful? Give feedback.
All reactions