Add documentation

This commit is contained in:
Dustin Spicuzza
2020-12-31 01:55:29 -05:00
parent e361d4443a
commit 1392fceeb5
16 changed files with 342 additions and 42 deletions

41
docs/tools.rst Normal file
View File

@@ -0,0 +1,41 @@
Tools
=====
There are a variety of command line tools provided by the cxxheaderparser
project.
dump tool
---------
Dump data from a header to stdout
.. code-block:: sh
# pprint format
python -m cxxheaderparser myheader.h
# JSON format
python -m cxxheaderparser --mode=json myheader.h
# dataclasses repr format
python -m cxxheaderparser --mode=repr myheader.h
# dataclasses repr format (formatted with black)
python -m cxxheaderparser --mode=brepr myheader.h
Anything more than that and you should use the python API, start with the
:ref:`simple API <simple>` first.
test generator
--------------
To generate a unit test for cxxheaderparser:
* Put the C++ header content in a file
* Run the following:
.. code-block:: sh
python -m cxxheaderparser.gentest FILENAME.h TESTNAME
You can copy/paste the stdout to one of the test files in the tests directory.