|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r84383 - in website/public_html/live: . common/code doc generated
From: dnljms_at_[hidden]
Date: 2013-05-20 04:21:28
Author: danieljames
Date: 2013-05-20 04:21:27 EDT (Mon, 20 May 2013)
New Revision: 84383
URL: http://svn.boost.org/trac/boost/changeset/84383
Log:
Merge versioned library info from beta.
Needed because polygon will have different information in 1.54 to older
releases.
Properties modified:
website/public_html/live/ (props changed)
Text files modified:
website/public_html/live/common/code/boost_libraries.php | 24 ++++++++++++++++--------
website/public_html/live/doc/libraries.php | 15 ++++++++++-----
website/public_html/live/doc/libraries.xml | 15 +++++++++++++++
website/public_html/live/sitemap.xml.php | 6 +++++-
4 files changed, 46 insertions(+), 14 deletions(-)
Modified: website/public_html/live/common/code/boost_libraries.php
==============================================================================
--- website/public_html/live/common/code/boost_libraries.php (original)
+++ website/public_html/live/common/code/boost_libraries.php 2013-05-20 04:21:27 EDT (Mon, 20 May 2013)
@@ -10,8 +10,8 @@
class boost_libraries
{
- var $categories = array();
- var $db = array();
+ private $categories = array();
+ private $db = array();
function boost_libraries($xml_file)
{
@@ -61,6 +61,8 @@
}
break;
case 'boost-version':
+ case 'boost-min-version':
+ case 'boost-max-version':
{
if (isset($val['value'])) { $lib[$val['tag']] = BoostVersion::from($val['value']); }
else { $lib[$val['tag']] = ''; }
@@ -93,19 +95,21 @@
}
else if ($val['tag'] == 'library' && $val['type'] == 'close' && $lib)
{
- $this->db[$lib['key']] = $lib;
+ $key_base = $key = $lib['key'];
+ $count = 0;
+ while (isset($this->db[$key])) {
+ $key = $key_base.(++$count);
+ }
+ $this->db[$key] = $lib;
$lib = NULL;
}
}
}
- function sort_by($field)
- {
- uasort($this->db, sort_by_field($field));
- }
-
function get($sort = null, $filter = null) {
$libs = $filter ? array_filter($this->db, $filter) : $this->db;
+ // Strip out the array keys, as they shouldn't be used externally.
+ $libs = array_values($libs);
if($sort) {
uasort($libs, sort_by_field($sort));
}
@@ -129,5 +133,9 @@
return $categories;
}
+
+ function get_categories() {
+ return $this->categories;
+ }
}
?>
Modified: website/public_html/live/doc/libraries.php
==============================================================================
--- website/public_html/live/doc/libraries.php (original)
+++ website/public_html/live/doc/libraries.php 2013-05-20 04:21:27 EDT (Mon, 20 May 2013)
@@ -24,6 +24,7 @@
$libs = USE_SERIALIZED_INFO ?
unserialize(file_get_contents(dirname(__FILE__) . '/../generated/libraries.txt')) :
new boost_libraries(dirname(__FILE__) . '/libraries.xml');
+$categories = $libs->get_categories();
// Display types:
@@ -66,7 +67,7 @@
}
else if(strpos($view_value, 'category_') === 0) {
$category_value = substr($view_value, strlen('category_'));
- if(!isset($libs->categories[$category_value])) {
+ if(!isset($categories[$category_value])) {
echo 'Invalid category: '.htmlentities($category_value); exit(0);
}
}
@@ -89,7 +90,7 @@
// Page title
$page_title = boost_title().' Library Documentation';
-if($category_value) $page_title.= ' - '. $libs->categories[$category_value]['title'];
+if($category_value) $page_title.= ' - '. $categories[$category_value]['title'];
// Functions
@@ -97,6 +98,10 @@
global $filter_value, $category_value;
return BoostVersion::page()->compare($lib['boost-version']) >= 0 &&
+ (!isset($lib['boost-min-version']) ||
+ BoostVersion::page()->compare($lib['boost-min-version']) >= 0) &&
+ (!isset($lib['boost-max-version']) ||
+ BoostVersion::page()->compare($lib['boost-max-version']) <= 0) &&
(!$filter_value || ($lib[$filter_value] && $lib[$filter_value] !== 'false')) &&
(!isset($_GET['filter']) || $lib[$_GET['filter']]) &&
(!$category_value || $category_value === 'all' ||
@@ -244,11 +249,11 @@
<?php if($view_value != 'categorized') { ?>
- <?php if($category_value) echo '<h2>', htmlentities($libs->categories[$category_value]['title']), '</h2>'; ?>
+ <?php if($category_value) echo '<h2>', htmlentities($categories[$category_value]['title']), '</h2>'; ?>
<dl>
<?php
- foreach ($libs->get($sort_value, 'library_filter') as $key => $lib) { ?>
+ foreach ($libs->get($sort_value, 'library_filter') as $lib) { ?>
<dt><?php libref($lib); ?></dt>
@@ -271,7 +276,7 @@
<dt>Categories</dt>
- <dd><?php libcategories($lib, $libs->categories); ?></dd>
+ <dd><?php libcategories($lib, $categories); ?></dd>
</dl>
</dd><!-- --><?php } ?>
</dl>
Modified: website/public_html/live/doc/libraries.xml
==============================================================================
--- website/public_html/live/doc/libraries.xml (original)
+++ website/public_html/live/doc/libraries.xml 2013-05-20 04:21:27 EDT (Mon, 20 May 2013)
@@ -1053,6 +1053,7 @@
<library>
<key>polygon</key>
<boost-version>1.44.0</boost-version>
+ <boost-max-version>1.53.0</boost-max-version>
<name>Polygon</name>
<authors>Lucanus Simonson</authors>
<description>Booleans/clipping, resizing/offsetting and more for planar polygons with integral coordinates.</description>
@@ -1062,6 +1063,20 @@
<category>Miscellaneous</category>
</library>
<library>
+ <key>polygon</key>
+ <boost-version>1.44.0</boost-version>
+ <boost-min-version>1.54.0</boost-min-version>
+ <name>Polygon</name>
+ <authors>Lucanus Simonson, Andrii Sydorchuk</authors>
+ <description>Voronoi diagram construction and booleans/clipping, resizing/offsetting and more for planar polygons with integral coordinates.</description>
+ <documentation>libs/polygon/</documentation>
+ <std-proposal>false</std-proposal>
+ <std-tr1>false</std-tr1>
+ <category>Algorithms</category>
+ <category>Data</category>
+ <category>Math</category>
+ </library>
+ <library>
<key>pool</key>
<boost-version>1.21.0</boost-version>
<name>Pool</name>
Modified: website/public_html/live/generated/libraries.txt
==============================================================================
Binary files website/public_html/live/generated/libraries.txt (original) and website/public_html/live/generated/libraries.txt 2013-05-20 04:21:27 EDT (Mon, 20 May 2013) differ
Modified: website/public_html/live/sitemap.xml.php
==============================================================================
--- website/public_html/live/sitemap.xml.php (original)
+++ website/public_html/live/sitemap.xml.php 2013-05-20 04:21:27 EDT (Mon, 20 May 2013)
@@ -12,7 +12,11 @@
// Returns true if the library is part of the current release of boost.
function current_version_filter($lib) {
- return BoostVersion::current()->compare($lib['boost-version']) >= 0;
+ return BoostVersion::current()->compare($lib['boost-version']) >= 0 &&
+ (!isset($lib['boost-min-version']) ||
+ BoostVersion::current()->compare($lib['boost-min-version']) >= 0) &&
+ (!isset($lib['boost-max-version']) ||
+ BoostVersion::current()->compare($lib['boost-max-version']) <= 0);
}
function xmlentities($text) {
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk