Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
VACore
Commits
d3afab9c
Commit
d3afab9c
authored
Dec 06, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Adding macro getter via module call in core
parent
aa529134
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/VACoreImpl.cpp
View file @
d3afab9c
...
...
@@ -5096,6 +5096,14 @@ CVAStruct CVACoreImpl::CallObject( const CVAStruct& oArgs )
oReturn
[
"searchpaths"
]
=
oSearchPaths
;
}
if
(
oArgs
.
HasKey
(
"getmacros"
)
)
{
CVAStruct
oMacros
;
for
(
auto
&
macro
:
m_oCoreConfig
.
mMacros
.
GetMacroMapCopy
()
)
oMacros
[
macro
.
first
]
=
macro
.
second
;
oReturn
[
"macros"
]
=
oMacros
;
}
if
(
oArgs
.
HasKey
(
"getloglevel"
)
)
{
oReturn
[
"loglevel"
]
=
VALog_GetLogLevel
();
...
...
src/VAMacroMap.cpp
View file @
d3afab9c
...
...
@@ -54,3 +54,8 @@ std::string CVAMacroMap::SubstituteMacros( const std::string& sStr ) const
return
sOutput
;
}
std
::
map
<
std
::
string
,
std
::
string
>
CVAMacroMap
::
GetMacroMapCopy
()
const
{
return
m_mMacroMap
;
}
src/VAMacroMap.h
View file @
d3afab9c
...
...
@@ -29,6 +29,8 @@ public:
// Makros in einem String durch deren Werte ersetzen
std
::
string
SubstituteMacros
(
const
std
::
string
&
sStr
)
const
;
std
::
map
<
std
::
string
,
std
::
string
>
GetMacroMapCopy
()
const
;
private:
// Macros $(...) = ...
std
::
map
<
std
::
string
,
std
::
string
>
m_mMacroMap
;
...
...
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