mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-05 15:54:39 +02:00
Fix docs generation
[SVN r37315]
This commit is contained in:
@@ -76,14 +76,14 @@ For any |Forward Sequence| ``s``, |Lambda Expression| ``op`` , and an
|
|||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
typedef begin<Sequence>::type i\ :sub:`1`;
|
typedef begin<Sequence>::type i\ :sub:`1`;
|
||||||
|value_initialized|< deref<i\ :sub:`1`>::type > x\ :sub:`1`;
|
|value_initialized|\ < deref<i\ :sub:`1`>::type > x\ :sub:`1`;
|
||||||
f(boost::get(x\ :sub:`1`));
|
f(boost::get(x\ :sub:`1`));
|
||||||
|
|
||||||
typedef next<i\ :sub:`1`>::type i\ :sub:`2`;
|
typedef next<i\ :sub:`1`>::type i\ :sub:`2`;
|
||||||
|value_initialized|< deref<i\ :sub:`2`>::type > x\ :sub:`2`;
|
|value_initialized|\ < deref<i\ :sub:`2`>::type > x\ :sub:`2`;
|
||||||
f(boost::get(x\ :sub:`2`));
|
f(boost::get(x\ :sub:`2`));
|
||||||
|...|
|
|...|
|
||||||
|value_initialized|< deref<i\ :sub:`n`>::type > x\ :sub:`n`;
|
|value_initialized|\ < deref<i\ :sub:`n`>::type > x\ :sub:`n`;
|
||||||
f(boost::get(x\ :sub:`n`));
|
f(boost::get(x\ :sub:`n`));
|
||||||
typedef next<i\ :sub:`n`>::type last;
|
typedef next<i\ :sub:`n`>::type last;
|
||||||
|
|
||||||
|
@@ -76,14 +76,14 @@ For any |Forward Sequence| ``s``, |Lambda Expression| ``op`` , and an
|
|||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
typedef begin<Sequence>::type i\ :sub:`1`;
|
typedef begin<Sequence>::type i\ :sub:`1`;
|
||||||
|value_initialized|< deref<i\ :sub:`1`>::type > x\ :sub:`1`;
|
|value_initialized|\ < deref<i\ :sub:`1`>::type > x\ :sub:`1`;
|
||||||
f(boost::get(x\ :sub:`1`));
|
f(boost::get(x\ :sub:`1`));
|
||||||
|
|
||||||
typedef next<i\ :sub:`1`>::type i\ :sub:`2`;
|
typedef next<i\ :sub:`1`>::type i\ :sub:`2`;
|
||||||
|value_initialized|< deref<i\ :sub:`2`>::type > x\ :sub:`2`;
|
|value_initialized|\ < deref<i\ :sub:`2`>::type > x\ :sub:`2`;
|
||||||
f(boost::get(x\ :sub:`2`));
|
f(boost::get(x\ :sub:`2`));
|
||||||
|...|
|
|...|
|
||||||
|value_initialized|< deref<i\ :sub:`n`>::type > x\ :sub:`n`;
|
|value_initialized|\ < deref<i\ :sub:`n`>::type > x\ :sub:`n`;
|
||||||
f(boost::get(x\ :sub:`n`));
|
f(boost::get(x\ :sub:`n`));
|
||||||
typedef next<i\ :sub:`n`>::type last;
|
typedef next<i\ :sub:`n`>::type last;
|
||||||
|
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
# Copyright (c) Aleksey Gurtovoy 2001-2007
|
||||||
|
#
|
||||||
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
|
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
# http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import os.path
|
import os.path
|
||||||
@@ -6,6 +12,8 @@ import re
|
|||||||
import string
|
import string
|
||||||
|
|
||||||
underlines = ['+', '/']
|
underlines = ['+', '/']
|
||||||
|
special_cases = [ 'inserter', '_1,_2,..._n' ]
|
||||||
|
|
||||||
|
|
||||||
def __section_header(section):
|
def __section_header(section):
|
||||||
parts = section.split('/')
|
parts = section.split('/')
|
||||||
@@ -22,21 +30,14 @@ def __section_intro(section):
|
|||||||
return '%s.rst' % '-'.join( [x.split(' ')[0] for x in parts] )
|
return '%s.rst' % '-'.join( [x.split(' ')[0] for x in parts] )
|
||||||
|
|
||||||
|
|
||||||
def __include_page( output, page ):
|
def __include_page( output, page, name = None ):
|
||||||
output.write( '.. include:: %s\n' % page )
|
output.write( '.. include:: %s\n' % page )
|
||||||
# output.write( '.. raw:: LaTeX\n\n' )
|
# output.write( '.. raw:: LaTeX\n\n' )
|
||||||
# output.write( ' \\newpage\n\n')
|
# output.write( ' \\newpage\n\n')
|
||||||
|
|
||||||
ref = '/'.join( page.split('.')[0].split('-') )
|
if name and name not in special_cases: ref = name
|
||||||
if ref.upper() == ref: # macros
|
else: ref = '/'.join( page.split('.')[0].split('-') )
|
||||||
ref = 'BOOST_MPL_%s' % ref
|
if ref.upper() == ref or ref.lower() == ref:
|
||||||
output.write(
|
|
||||||
( '.. |%(ref)s| replace:: |``%(ref)s``|__\n'
|
|
||||||
+ '.. |``%(ref)s``| replace:: :refentry:`%(ref)s`\n'
|
|
||||||
+ '__ `%(ref)s`_\n' )
|
|
||||||
% { 'ref': ref }
|
|
||||||
)
|
|
||||||
elif ref.lower() == ref:
|
|
||||||
output.write(
|
output.write(
|
||||||
( '.. |%(ref)s| replace:: |``%(ref)s``|__\n'
|
( '.. |%(ref)s| replace:: |``%(ref)s``|__\n'
|
||||||
+ '.. |``%(ref)s``| replace:: :refentry:`%(ref)s`\n'
|
+ '.. |``%(ref)s``| replace:: :refentry:`%(ref)s`\n'
|
||||||
@@ -82,7 +83,7 @@ def main( filename, dir ):
|
|||||||
placement_spec = open(src, 'r').readline()
|
placement_spec = open(src, 'r').readline()
|
||||||
|
|
||||||
topic = 'Unclassified'
|
topic = 'Unclassified'
|
||||||
name = None
|
name = None
|
||||||
order = -1
|
order = -1
|
||||||
|
|
||||||
match = re_topic.match(placement_spec)
|
match = re_topic.match(placement_spec)
|
||||||
@@ -95,7 +96,7 @@ def main( filename, dir ):
|
|||||||
if not topics.has_key(topic):
|
if not topics.has_key(topic):
|
||||||
topics[topic] = []
|
topics[topic] = []
|
||||||
|
|
||||||
topics[topic].append((src, order))
|
topics[topic].append((src, order, name))
|
||||||
|
|
||||||
if name:
|
if name:
|
||||||
if topic.find( '/Concepts' ) == -1:
|
if topic.find( '/Concepts' ) == -1:
|
||||||
@@ -115,7 +116,7 @@ def main( filename, dir ):
|
|||||||
__include_page( output, intro )
|
__include_page( output, intro )
|
||||||
|
|
||||||
for src in content:
|
for src in content:
|
||||||
__include_page( output, src[0] )
|
__include_page( output, src[0], src[2] )
|
||||||
|
|
||||||
output.close()
|
output.close()
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
The MPL Reference Manual
|
The MPL Reference Manual
|
||||||
************************
|
************************
|
||||||
|
|
||||||
:Copyright: Copyright <20> Aleksey Gurtovoy and David Abrahams, 2001-2005.
|
:Copyright: Copyright <20> Aleksey Gurtovoy and David Abrahams, 2001-2007.
|
||||||
|
|
||||||
:License: Distributed under the Boost Software License, Version 1.0. (See
|
:License: Distributed under the Boost Software License, Version 1.0. (See
|
||||||
accompanying file ``LICENSE_1_0.txt`` or copy at
|
accompanying file ``LICENSE_1_0.txt`` or copy at
|
||||||
@@ -132,10 +132,6 @@ __ `Placeholders`_
|
|||||||
__ `BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS`_
|
__ `BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS`_
|
||||||
__ `BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS`_
|
__ `BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS`_
|
||||||
|
|
||||||
.. |BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS| replace:: |``BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS``|__
|
|
||||||
.. |``BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS``| replace:: :refentry:`BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS`
|
|
||||||
__ `BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS`_
|
|
||||||
|
|
||||||
|
|
||||||
.. |transformation algorithm disclaimer| replace::
|
.. |transformation algorithm disclaimer| replace::
|
||||||
[*Note:* This wording applies to a no-inserter version(s) of the algorithm. See the
|
[*Note:* This wording applies to a no-inserter version(s) of the algorithm. See the
|
||||||
|
Reference in New Issue
Block a user