Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
373b2172
Commit
373b2172
authored
May 18, 2018
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(codegen): added msgstr() function
parent
5b8d5825
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+21
-0
UObject_SK.h
extensions/include/UObject_SK.h
+0
-0
UObject_SK.cc
extensions/lib/UObject_SK.cc
+0
-0
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
373b2172
...
...
@@ -248,6 +248,13 @@
\param showLinkName - TRUE - выводить SensorName, FALSE - не выводить
*/
std::string strval( uniset::ObjectId id, bool showLinkName=true ) const;
/*! Вывод в строку названия датчика-сообщения: xxx(SensorName)
\param id - идентификатор датчика
\param showLinkName - TRUE - выводить SensorName, FALSE - не выводить
*/
std::string msgstr( uniset::ObjectId id, bool showLinkName=true ) const;
/*! Вывод состояния внутренних переменных */
inline std::string dumpVars(){ return vmon.pretty_str(); }
...
...
@@ -1561,6 +1568,20 @@ std::string <xsl:value-of select="$CLASSNAME"/>_SK::dumpIO()
return s.str();
}
// ----------------------------------------------------------------------------
std::string
<xsl:value-of
select=
"$CLASSNAME"
/>
_SK::msgstr( uniset::ObjectId id, bool showLinkName ) const
{
ostringstream s;
<xsl:for-each
select=
"//msgmap/item"
>
if( id ==
<xsl:value-of
select=
"@name"
/>
)
{
s
<<
"
<xsl:value-of
select=
"@name"
/>
";
if( showLinkName ) s
<<
"("
<<
ORepHelpers::getShortName( uniset_conf()->oind->getMapName(
<xsl:value-of
select=
"@name"
/>
))
<<
")";
return s.str();
}
</xsl:for-each>
return "";
}
// ----------------------------------------------------------------------------
std::string
<xsl:value-of
select=
"$CLASSNAME"
/>
_SK::str( uniset::ObjectId id, bool showLinkName ) const
{
ostringstream s;
...
...
extensions/include/UObject_SK.h
View file @
373b2172
This diff is collapsed.
Click to expand it.
extensions/lib/UObject_SK.cc
View file @
373b2172
This diff is collapsed.
Click to expand it.
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