Changes between Initial Version and Version 1 of pjsip-doc/breathe


Ignore:
Timestamp:
Dec 4, 2013 3:29:37 AM (10 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pjsip-doc/breathe

    v1 v1  
     1{{{ 
     2Doxygen Integration with Breathe 
     3================================ 
     4People say that the best way to use C++ with Sphinx is with Breathe. It seems to work, with some limitations though. 
     5 
     6Requirements 
     7------------ 
     8 
     91. Sphinx: http://sphinx-doc.org. I installed with PyPI:: 
     10    
     11   $ sudo pip install sphinx 
     122. Breathe: http://michaeljones.github.io/breathe/index.html. I installed with PyPI:: 
     13    
     14   $ sudo pip install breathe 
     15    
     163. Doxygen. I installed from Ubuntu package. 
     174. Some say Pygments are needed for syntax coloring. I didn't remember installing it, maybe it was preinstalled, and I have no problem with syntax coloring (see demo below). 
     18 
     19 
     20Setup 
     21----- 
     22The emailed a tarball containing the pjsip-book source files with Doxygen integration. HTML output has already been generated for sample. Put this in `$PJ_DIR/doc` so that it becomes `$PJDIR/doc/pjsip-book`. Then just run make:: 
     23 
     24  $ make 
     25   
     26This will build HTML documentation in `_build/html` directory. T build PDF, run:: 
     27 
     28  $ make latexpdf 
     29 
     30 
     31.. default-domain:: cpp 
     32 
     33How to Use Integrate Book with Doxygen 
     34-------------------------------------- 
     35Quick sample:: 
     36 
     37  will be rendered like this: 
     38  +++++++++++++++++++++++++++ 
     39 
     40  This is how to quote a code with syntax coloring: 
     41 
     42  .. code-block:: c++ 
     43 
     44       pj::AudioMediaPlayer *player = new AudioMediaPlayer; 
     45       player->createPlayer("announcement.wav"); 
     46 
     47  There are many ways to refer a symbol:  
     48 
     49  * A method: :cpp:func:`pj::AudioMediaPlayer::createPlayer()` 
     50  * A method with alternate display: :cpp:func:`a method <pj::AudioMediaPlayer::createPlayer()>` 
     51  * A class :cpp:class:`pj::AudioMediaPlayer` 
     52  * A class with alternate display: :cpp:class:`a class <pj::AudioMediaPlayer>` 
     53 
     54  For that links to work, we need to display the link target declaration (a class or method)  
     55  somewhere in the doc, like this: 
     56   
     57  .. doxygenclass:: pj::AudioMediaPlayer 
     58        :path: xml 
     59        :members: 
     60 
     61  Alternatively we can display a single method declaration like this: 
     62 
     63  .. doxygenfunction:: pj::AudioMediaPlayer::createPlayer() 
     64        :path: xml 
     65        :no-link: 
     66 
     67  We can also display class declaration with specific members. 
     68   
     69  For more info see `Breathe documentation <http://michaeljones.github.io/breathe/domains.html>`_ 
     70 
     71      
     72 
     73will be rendered like this: 
     74+++++++++++++++++++++++++++ 
     75 
     76This is how to quote a code with syntax coloring: 
     77 
     78.. code-block:: c++ 
     79 
     80       pj::AudioMediaPlayer *player = new AudioMediaPlayer; 
     81       player->createPlayer("announcement.wav"); 
     82 
     83There are many ways to refer a symbol:  
     84 
     85* A method: :cpp:func:`pj::AudioMediaPlayer::createPlayer()` 
     86* A method with alternate display: :cpp:func:`a method <pj::AudioMediaPlayer::createPlayer()>` 
     87* A class :cpp:class:`pj::AudioMediaPlayer` 
     88* A class with alternate display: :cpp:class:`a class <pj::AudioMediaPlayer>` 
     89 
     90For that links to work, we need to display the link target declaration (a class or method) somewhere in the doc, like this: 
     91   
     92   .. doxygenclass:: pj::AudioMediaPlayer 
     93        :path: xml 
     94        :members: 
     95 
     96Alternatively we can display a single method declaration like this: 
     97 
     98   .. doxygenfunction:: pj::AudioMediaPlayer::createPlayer() 
     99        :path: xml 
     100        :no-link: 
     101 
     102We can also display class declaration with specific members. 
     103 
     104For more info see `Breathe documentation <http://michaeljones.github.io/breathe/domains.html>`_ 
     105 
     106 
     107 
     108}}}