-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DELETE ME: test / debugging helper files, etc.
Literal landfill...
- Loading branch information
1 parent
4219201
commit 92c4f36
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
namespaces | ||
using | ||
lambdas | ||
friend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
C++ testing grounds | ||
=================== | ||
|
||
Classes | ||
------- | ||
|
||
.. cpp:autodoc:: ../cpp/class.cpp | ||
|
||
Structs | ||
------- | ||
|
||
.. cpp:autodoc:: ../cpp/struct-class.cpp | ||
|
||
Enum class | ||
---------- | ||
|
||
.. cpp:autodoc:: ../cpp/enum-class.cpp | ||
|
||
Templates | ||
--------- | ||
|
||
.. cpp:autodoc:: ../cpp/template.cpp | ||
:clang: --std=c++17 | ||
|
||
.. A link to a struct documentation from the docs :cpp:any:`stfoo`. | ||
.. | ||
.. .. cpp:autodoc:: test-cpp.cpp | ||
.. | ||
.. .. cpp:autovar:: fooer | ||
.. :file: test-cpp.cpp | ||
.. | ||
.. .. cpp:autodoc:: enum.cpp | ||
.. | ||
.. .. cpp:enum:: MyEnum | ||
.. | ||
.. An unscoped enum. | ||
.. | ||
.. .. cpp:enum:: MySpecificEnum : long | ||
.. | ||
.. An unscoped enum with specified underlying type. | ||
.. | ||
.. .. cpp:enum-class:: MyScopedEnum | ||
.. | ||
.. A scoped enum. | ||
.. | ||
.. .. cpp:enum-struct:: protected MyScopedVisibilityEnum : std::underlying_type<MySpecificEnum>::type | ||
.. | ||
.. A scoped enum with non-default visibility, and with a specified underlying | ||
.. type. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env python | ||
|
||
import sys | ||
import textwrap | ||
from clang.cindex import Index, TranslationUnit, CursorKind | ||
|
||
index = Index.create() | ||
|
||
tu = index.parse(sys.argv[1], args=['-xc++'], | ||
options=TranslationUnit.PARSE_CACHE_COMPLETION_RESULTS | | ||
TranslationUnit.PARSE_DETAILED_PROCESSING_RECORD | | ||
TranslationUnit.PARSE_SKIP_FUNCTION_BODIES) | ||
|
||
for cursor in tu.cursor.get_children(): | ||
print(cursor.kind) | ||
print('\t', cursor.type.spelling, cursor.spelling) | ||
|
||
for c in cursor.get_children(): | ||
print('\t', c.kind) | ||
print('\t\t', c.type.spelling, c.spelling) | ||
|
||
print('\t\tconst:\t\t', c.is_const_method()) | ||
print('\t\tpure virtual:\t', c.is_pure_virtual_method()) | ||
print('\t\tvirtual:\t', c.is_virtual_method()) | ||
print('\t\tstatic:\t\t', c.is_static_method()) | ||
print('\t\tmutable:\t', c.is_mutable_field()) | ||
print('\t\tscoped enum:\t', c.is_scoped_enum()) | ||
print('\t\tanonymous:\t', c.is_anonymous()) | ||
|