Document the API using breathe.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
add_custom_command(OUTPUT html/index.html
|
||||
COMMAND doxygen
|
||||
COMMAND rm -rf ../html
|
||||
COMMAND sphinx-build -b html . ../html
|
||||
DEPENDS conf.py index.rst)
|
||||
add_custom_target(doc DEPENDS html/index.html)
|
||||
|
||||
+11
-1229
File diff suppressed because it is too large
Load Diff
+4
-2
@@ -23,6 +23,8 @@ import sys, os
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
|
||||
sys.path.append("../breathe")
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['sphinx.ext.ifconfig', 'breathe']
|
||||
@@ -52,9 +54,9 @@ copyright = u'1990-2012, Python Software Foundation'
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.2'
|
||||
version = '0.3'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.2'
|
||||
release = '0.3'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
||||
+12
-32
@@ -1,39 +1,19 @@
|
||||
.. highlight:: c++
|
||||
|
||||
.. _string-formatting:
|
||||
|
||||
String Formatting
|
||||
-----------------
|
||||
|
||||
.. doxygenfunction:: format::Format(StringRef)
|
||||
|
||||
.. doxygenclass:: format::Formatter
|
||||
:members:
|
||||
|
||||
.. ifconfig:: False
|
||||
|
||||
.. _string-formatting:
|
||||
|
||||
String Formatting
|
||||
-----------------
|
||||
|
||||
The built-in string class provides the ability to do complex variable
|
||||
substitutions and value formatting via the :func:`format` method described in
|
||||
:pep:`3101`. The :class:`Formatter` class in the :mod:`format` module allows
|
||||
you to create and customize your own string formatting behaviors using the same
|
||||
implementation as the built-in :meth:`format` method.
|
||||
|
||||
|
||||
.. class:: Formatter
|
||||
|
||||
The :class:`Formatter` class has the following public methods:
|
||||
|
||||
.. method:: format(format_string, *args, **kwargs)
|
||||
|
||||
:meth:`format` is the primary API method. It takes a format string and
|
||||
an arbitrary set of positional and keyword arguments.
|
||||
:meth:`format` is just a wrapper that calls :meth:`vformat`.
|
||||
|
||||
.. method:: vformat(format_string, args, kwargs)
|
||||
|
||||
This function does the actual work of formatting. It is exposed as a
|
||||
separate function for cases where you want to pass in a predefined
|
||||
dictionary of arguments, rather than unpacking and repacking the
|
||||
dictionary as individual arguments using the ``*args`` and ``**kwds``
|
||||
syntax. :meth:`vformat` does the work of breaking up the format string
|
||||
into character data and replacement fields. It calls the various
|
||||
methods described below.
|
||||
|
||||
In addition, the :class:`Formatter` defines a number of methods that are
|
||||
intended to be replaced by subclasses:
|
||||
|
||||
@@ -111,8 +91,8 @@
|
||||
Format String Syntax
|
||||
--------------------
|
||||
|
||||
The :meth:`Format` function and the :class:`Formatter` class share the same
|
||||
syntax for format strings.
|
||||
The :cpp:func:`format::Format()` function and the :cpp:class:`format::Formatter`
|
||||
class share the same syntax for format strings.
|
||||
|
||||
Format strings contain "replacement fields" surrounded by curly braces ``{}``.
|
||||
Anything that is not contained in braces is considered literal text, which is
|
||||
|
||||
Reference in New Issue
Block a user