feat:replace boost library with C++11 std library

This commit is contained in:
Livox-SDK
2020-04-01 20:53:55 +08:00
parent 6d06233944
commit d3258bbd97
1936 changed files with 241862 additions and 60153 deletions
+44 -65
View File
@@ -1,28 +1,4 @@
/*
@licstart The following is the entire license notice for the
JavaScript code in this file.
Copyright (C) 1997-2019 by Dimitri van Heesch
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@licend The above is the entire license notice
for the JavaScript code in this file
*/
var navTreeSubIndices = new Array();
var arrowDown = '▼';
var arrowRight = '►';
function getData(varName)
{
@@ -69,6 +45,7 @@ function localStorageSupported()
}
}
function storeLink(link)
{
if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
@@ -94,13 +71,21 @@ function cachedLink()
function getScript(scriptName,func,show)
{
var head = document.getElementsByTagName("head")[0];
var head = document.getElementsByTagName("head")[0];
var script = document.createElement('script');
script.id = scriptName;
script.type = 'text/javascript';
script.onload = func;
script.src = scriptName+'.js';
head.appendChild(script);
script.onload = func;
script.src = scriptName+'.js';
if ($.browser.msie && $.browser.version<=8) {
// script.onload does not work with older versions of IE
script.onreadystatechange = function() {
if (script.readyState=='complete' || script.readyState=='loaded') {
func(); if (show) showRoot();
}
}
}
head.appendChild(script);
}
function createIndent(o,domNode,node,level)
@@ -109,17 +94,18 @@ function createIndent(o,domNode,node,level)
var n = node;
while (n.parentNode) { level++; n=n.parentNode; }
if (node.childrenData) {
var imgNode = document.createElement("span");
imgNode.className = 'arrow';
var imgNode = document.createElement("img");
imgNode.style.paddingLeft=(16*level).toString()+'px';
imgNode.innerHTML=arrowRight;
imgNode.width = 16;
imgNode.height = 22;
imgNode.border = 0;
node.plus_img = imgNode;
node.expandToggle = document.createElement("a");
node.expandToggle.href = "javascript:void(0)";
node.expandToggle.onclick = function() {
if (node.expanded) {
$(node.getChildrenUL()).slideUp("fast");
node.plus_img.innerHTML=arrowRight;
node.plus_img.src = node.relpath+"arrowright.png";
node.expanded = false;
} else {
expandNode(o, node, false, false);
@@ -127,13 +113,15 @@ function createIndent(o,domNode,node,level)
}
node.expandToggle.appendChild(imgNode);
domNode.appendChild(node.expandToggle);
imgNode.src = node.relpath+"arrowright.png";
} else {
var span = document.createElement("span");
span.className = 'arrow';
span.style.display = 'inline-block';
span.style.width = 16*(level+1)+'px';
span.style.height = '22px';
span.innerHTML = '&#160;';
domNode.appendChild(span);
}
}
}
var animationInProgress = false;
@@ -143,7 +131,6 @@ function gotoAnchor(anchor,aname,updateLocation)
var pos, docContent = $('#doc-content');
var ancParent = $(anchor.parent());
if (ancParent.hasClass('memItemLeft') ||
ancParent.hasClass('memtitle') ||
ancParent.hasClass('fieldname') ||
ancParent.hasClass('fieldtype') ||
ancParent.is(':header'))
@@ -208,7 +195,7 @@ function newNode(o, po, text, link, childrenData, lastNode)
var aname = '#'+link.split('#')[1];
var srcPage = stripPath(pathName());
var targetPage = stripPath(link.split('#')[0]);
a.href = srcPage!=targetPage ? url : "javascript:void(0)";
a.href = srcPage!=targetPage ? url : "javascript:void(0)";
a.onclick = function(){
storeLink(link);
if (!$(a).parent().parent().hasClass('selected'))
@@ -226,7 +213,7 @@ function newNode(o, po, text, link, childrenData, lastNode)
a.onclick = function() { storeLink(link); }
}
} else {
if (childrenData != null)
if (childrenData != null)
{
a.className = "nolink";
a.href = "javascript:void(0)";
@@ -256,7 +243,7 @@ function showRoot()
(function (){ // retry until we can scroll to the selected item
try {
var navtree=$('#nav-tree');
navtree.scrollTo('#selected',100,{offset:-windowHeight/2});
navtree.scrollTo('#selected',0,{offset:-windowHeight/2});
} catch (err) {
setTimeout(arguments.callee, 0);
}
@@ -275,9 +262,17 @@ function expandNode(o, node, imm, showRoot)
} else {
if (!node.childrenVisited) {
getNode(o, node);
} if (imm || ($.browser.msie && $.browser.version>8)) {
// somehow slideDown jumps to the start of tree for IE9 :-(
$(node.getChildrenUL()).show();
} else {
$(node.getChildrenUL()).slideDown("fast");
}
if (node.isLast) {
node.plus_img.src = node.relpath+"arrowdown.png";
} else {
node.plus_img.src = node.relpath+"arrowdown.png";
}
$(node.getChildrenUL()).slideDown("fast");
node.plus_img.innerHTML = arrowDown;
node.expanded = true;
}
}
@@ -306,6 +301,7 @@ function highlightAnchor()
} else {
glowEffect(anchor.next(),1000); // normal member
}
gotoAnchor(anchor,aname,false);
}
function selectAndHighlight(hash,n)
@@ -345,7 +341,7 @@ function showNode(o, node, index, hash)
getNode(o, node);
}
$(node.getChildrenUL()).css({'display':'block'});
node.plus_img.innerHTML = arrowDown;
node.plus_img.src = node.relpath+"arrowdown.png";
node.expanded = true;
var n = node.children[o.breadcrumbs[index]];
if (index+1<o.breadcrumbs.length) {
@@ -467,18 +463,6 @@ function toggleSyncButton(relpath)
}
}
var loadTriggered = false;
var readyTriggered = false;
var loadObject,loadToRoot,loadUrl,loadRelPath;
$(window).on('load',function(){
if (readyTriggered) { // ready first
navTo(loadObject,loadToRoot,loadUrl,loadRelPath);
showRoot();
}
loadTriggered=true;
});
function initNavTree(toroot,relpath)
{
var o = new Object();
@@ -494,9 +478,10 @@ function initNavTree(toroot,relpath)
o.node.relpath = relpath;
o.node.expanded = false;
o.node.isLast = true;
o.node.plus_img = document.createElement("span");
o.node.plus_img.className = 'arrow';
o.node.plus_img.innerHTML = arrowRight;
o.node.plus_img = document.createElement("img");
o.node.plus_img.src = relpath+"arrowright.png";
o.node.plus_img.width = 16;
o.node.plus_img.height = 22;
if (localStorageSupported()) {
var navSync = $('#nav-sync');
@@ -509,16 +494,10 @@ function initNavTree(toroot,relpath)
navSync.click(function(){ toggleSyncButton(relpath); });
}
if (loadTriggered) { // load before ready
$(window).load(function(){
navTo(o,toroot,hashUrl(),relpath);
showRoot();
} else { // ready before load
loadObject = o;
loadToRoot = toroot;
loadUrl = hashUrl();
loadRelPath = relpath;
readyTriggered=true;
}
});
$(window).bind('hashchange', function(){
if (window.location.hash && window.location.hash.length>1){
@@ -541,4 +520,4 @@ function initNavTree(toroot,relpath)
}
})
}
/* @license-end */