Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
xerus
xerus
Commits
f39f0d2b
Commit
f39f0d2b
authored
May 31, 2017
by
Ben Huber
Browse files
faster lookup of doxygen tags and finding version without git tags
parent
c766e0a8
Pipeline
#761
passed with stages
in 8 minutes and 19 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
doc/jekyll/_plugins/tabs.rb
View file @
f39f0d2b
...
...
@@ -24,7 +24,7 @@ class TabsConverter < Converter
.
gsub
(
'<p>__infoEnd</p>'
,
"</div>"
)
.
gsub
(
'__breakFix1</a></p>'
,
""
)
.
gsub
(
'<p>__breakFix2'
,
"</a>"
)
.
gsub
(
'__version'
,
%x(
git describe --tags --always --abbrev=0
)
)
.
gsub
(
'__version'
,
%x(
cat ../VERSION
)
)
.
gsub
(
/__doxyref\(([^\)]+)\)/
){
|
m
|
%x( ./findDoxytag
#{
$1
}
)
}
end
end
...
...
src/docHelper/findDoxytag.cpp
View file @
f39f0d2b
...
...
@@ -13,6 +13,33 @@ int main(int argc, char *argv[]) {
std
::
string
memberName
(
argv
[
1
]);
std
::
ifstream
inFile
(
"xerus.tags"
);
std
::
string
line
;
std
::
size_t
jumpSize
=
100
;
// seek rough position
auto
lastPos
=
inFile
.
tellg
();
while
(
!
inFile
.
eof
())
{
lastPos
=
inFile
.
tellg
();
for
(
size_t
i
=
0
;
i
<
jumpSize
;
++
i
)
{
std
::
getline
(
inFile
,
line
);
}
std
::
vector
<
std
::
string
>
parts
;
boost
::
split
(
parts
,
line
,
boost
::
is_any_of
(
"
\t
"
));
if
(
parts
[
0
]
==
memberName
)
{
std
::
cout
<<
parts
[
1
]
<<
std
::
endl
;
return
0
;
}
if
(
parts
[
0
]
>
memberName
)
{
inFile
.
seekg
(
lastPos
);
jumpSize
/=
10
;
if
(
jumpSize
==
1
)
{
break
;
}
}
}
if
(
inFile
.
eof
())
{
inFile
.
clear
();
inFile
.
seekg
(
lastPos
);
}
while
(
std
::
getline
(
inFile
,
line
))
{
std
::
vector
<
std
::
string
>
parts
;
boost
::
split
(
parts
,
line
,
boost
::
is_any_of
(
"
\t
"
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment