Skip to content

Instantly share code, notes, and snippets.

@kdheepak
Created May 16, 2020 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kdheepak/84f8da048140c3f632633fabfdec1f97 to your computer and use it in GitHub Desktop.
Save kdheepak/84f8da048140c3f632633fabfdec1f97 to your computer and use it in GitHub Desktop.
import helics as h
print("""## Enum""")
print("")
enum_blacklist = [
"helics_true",
"helics_false",
"helics_message",
"helics_complex",
"helics_time_epsilon",
"helics_time_invalid",
"helics_time_maxtime",
"helics_time_zero",
]
print("""```eval_rst""")
for name in dir(h):
if name.startswith("helics_") and name not in enum_blacklist:
print(f"""
.. doxygenenumvalue:: {name}
:project: helics
""")
print("""```""")
print()
print("## Functions")
print("""
1. `Broker`
1. `Core`
1. `Endpoint`
1. `FederateInfo`
1. `Federate`
1. `Filter`
1. `Input`
1. `Message`
1. `Publication`
1. `Query`
""")
print("### Broker")
print()
print("""```eval_rst""")
for name in dir(h):
if name.startswith("helicsBroker"):
print(f"""
.. doxygenfunction:: {name}
:project: helics
""")
print("""```""")
print()
print("### Core")
print()
print("""```eval_rst""")
for name in dir(h):
if name.startswith("helicsCore"):
print(f"""
.. doxygenfunction:: {name}
:project: helics
""")
print("""```""")
print()
print("### Endpoint")
print()
print("""```eval_rst""")
for name in dir(h):
if name.startswith("helicsEndpoint"):
print(f"""
.. doxygenfunction:: {name}
:project: helics
""")
print("""```""")
print()
print("### FederateInfo")
print()
print("""```eval_rst""")
for name in dir(h):
if name.startswith("helicsFederateInfo"):
print(f"""
.. doxygenfunction:: {name}
:project: helics
""")
print("""```""")
print()
print("### Federate")
print()
print("""```eval_rst""")
for name in dir(h):
if name.startswith("helicsFederate") and not name.startswith("helicsFederateInfo"):
print(f"""
.. doxygenfunction:: {name}
:project: helics
""")
print("""```""")
print()
print("### Filter")
print()
print("""```eval_rst""")
for name in dir(h):
if name.startswith("helicsFilter"):
print(f"""
.. doxygenfunction:: {name}
:project: helics
""")
print("""```""")
print()
print("### Input")
print()
print("""```eval_rst""")
for name in dir(h):
if name.startswith("helicsInput"):
print(f"""
.. doxygenfunction:: {name}
:project: helics
""")
print("""```""")
print()
print("### Message")
print()
print("""```eval_rst""")
for name in dir(h):
if name.startswith("helicsMessage"):
print(f"""
.. doxygenfunction:: {name}
:project: helics
""")
print("""```""")
print()
print("### Publication")
print()
print("""```eval_rst""")
for name in dir(h):
if name.startswith("helicsPublication"):
print(f"""
.. doxygenfunction:: {name}
:project: helics
""")
print("""```""")
print()
print("### Query")
print()
print("""```eval_rst""")
for name in dir(h):
if name.startswith("helicsQuery"):
print(f"""
.. doxygenfunction:: {name}
:project: helics
""")
print("""```""")
print()
print("""### Others""")
print()
print("""```eval_rst""")
for name in dir(h):
if not any(name.startswith(n) for n in [
"helicsBroker",
"helicsCore",
"helicsEndpoint",
"helicsFederate",
"helicsFederateInfo",
"helicsFilter",
"helicsInput",
"helicsMessage",
"helicsPublication",
"helicsQuery"
]) and not name.startswith("helics_") and name.startswith("helics"):
print(f"""
.. doxygenfunction:: {name}
:project: helics
""")
print("""```""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment