Skip to content

Commit 3bfcc62

Browse files
committed
Greatly simplify and cleanup first page of the documentation
1 parent fcd4f9e commit 3bfcc62

File tree

1 file changed

+20
-69
lines changed

1 file changed

+20
-69
lines changed

docs/index.rst

Lines changed: 20 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,40 @@
11
pygccxml
22
========
33

4-
The purpose of `pygccxml` is to read a generated file and provide a simple
4+
The purpose of `pygccxml` is to read a generated xml file and provide a simple
55
framework to navigate C++ declarations, using Python classes.
66

7-
What can you do with it?
8-
------------------------
97
Using `pygccxml` you can:
108

11-
* parse C++ source code
12-
* create a powerful code generator
13-
14-
+ `Py++ <http://sourceforge.net/projects/pygccxml/files/pyplusplus/>`_ is heavily based on `pygccxml`
15-
+ generate `WSDL`_ file from sources
16-
+ ...
17-
18-
* generate UML diagrams
19-
* build code analyzer
9+
* Parse C++ source code
10+
* Create a powerful code generator
11+
* Generate UML diagrams
12+
* Build code analyzers
2013
* ...
2114

22-
Query interface
23-
---------------
24-
`pygccxml` provides simple and powerful API to query declarations tree.
25-
26-
How many lines are needed to write the following query?
27-
::
28-
29-
select all free functions from the project
30-
where
31-
name equal to "do_smth"
32-
return type is void
33-
function has two arguments
34-
second argument type is int
35-
36-
Only single line of code is needed:
37-
38-
.. code-block:: python
39-
40-
# global_ns is the reference to declarations, which describes the global(::) namespace
41-
# "None" means any type.
42-
global_ns.free_functions("do_smth", return_type="void", arg_types=[None, "int"])
15+
Installing
16+
==========
4317

44-
If you want to know more about provided API read the :doc:`query interface <query_interface>`
45-
document or the :doc:`API documentation <apidocs/api>`
18+
You can use pip to install pygccxml::
4619

47-
Type traits
48-
-----------
49-
`pygccxml` provides a lot of functionality to analyze C++ types and relationship
50-
between them. For more information please refer to the :doc:`design <design>` document or
51-
the :doc:`API documentation <apidocs/api>`. A few examples:
20+
pip install pygccxml
5221

53-
* ``is_convertible(from, to)``
22+
To install from source, you can use the usual procedure::
5423

55-
returns ``True`` if there is a conversion from type ``from`` to type ``to``,
56-
otherwise ``False``
24+
python setup.py install
5725

58-
* ``is_unary_operator(oper)``
59-
60-
returns ``True`` if ``oper`` describes an unary operator
61-
62-
63-
Declaration dependencies
64-
------------------------
65-
You can query a declaration, about it dependencies - declarations it depends on.
66-
This is a very powerful and useful feature. `Py++ <http://sourceforge.net/projects/pygccxml/files/pyplusplus/>`_, for example, uses this functionality to check that user creates Python
67-
bindings for all relevant declarations.
68-
69-
Caching
70-
-------
71-
Consider the following situation: you have to parse the same set of files every
72-
day. There are 2 possible ways to complete the task:
26+
Examples
27+
========
7328

74-
* create a header file that includes all files you need to parse
29+
The :doc:`examples <examples>` are a good way to learn how to use `pygccxml`.
7530

76-
* parse each file separately and then join the results
31+
`pygccxml` provides a powerful API. If you want to know more about the provided API
32+
read the :doc:`query interface <query_interface>` document or the
33+
:doc:`API documentation <apidocs/api>`.
7734

78-
The difference between these approaches is the caching algorithm used in the
79-
second case. `pygccxml` supports both of them. Actually `pygccxml` supports
80-
more caching strategies, read the API documentation for more information.
35+
Contributing
36+
============
8137

82-
Binary files parser
83-
-------------------
84-
`pygccxml` contains a functionality which allows to extract different information
85-
from binary files (`.map`, `.dll`, `.so`) and integrate it with the existing
86-
declarations tree.
8738

8839
License
8940
=======
@@ -105,6 +56,7 @@ Documentation contents
10556
:maxdepth: 1
10657

10758
download
59+
examples
10860
documentation
10961
query_interface
11062
design
@@ -133,4 +85,3 @@ Indices and tables
13385
* :ref:`genindex`
13486
* :ref:`modindex`
13587
* :ref:`search`
136-

0 commit comments

Comments
 (0)