Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
9988671e
Commit
9988671e
authored
Apr 27, 2012
by
Sebastian Eichelbaum
Browse files
[CHANGE
#9
] - metainfo class now loads online info too
parent
fa22632e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
src/core/kernel/WModuleMetaInformation.cpp
src/core/kernel/WModuleMetaInformation.cpp
+24
-1
No files found.
src/core/kernel/WModuleMetaInformation.cpp
View file @
9988671e
...
...
@@ -171,7 +171,30 @@ std::vector< WModuleMetaInformation::Online > WModuleMetaInformation::getOnlineR
return
r
;
}
// TODO(ebaum): implement me
// get the "online"-subtrees
typedef
std
::
vector
<
WStructuredTextParser
::
StructuredValueTree
>
TreeList
;
TreeList
onlineInfos
=
m_metaData
.
getSubTrees
(
m_name
+
"/online"
);
for
(
TreeList
::
const_iterator
i
=
onlineInfos
.
begin
();
i
!=
onlineInfos
.
end
();
++
i
)
{
WModuleMetaInformation
::
Online
o
;
// get all info:
// these are required
o
.
m_name
=
(
*
i
).
getValue
<
std
::
string
>
(
"name"
,
""
);
o
.
m_url
=
(
*
i
).
getValue
<
std
::
string
>
(
"url"
,
""
);
if
(
o
.
m_name
.
empty
()
||
o
.
m_url
.
empty
()
)
{
continue
;
}
// optional
o
.
m_description
=
(
*
i
).
getValue
<
std
::
string
>
(
"description"
,
""
);
// add
r
.
push_back
(
o
);
}
return
r
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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