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
1b356292
Commit
1b356292
authored
Dec 15, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(codegen): назвал функцию получения указателя на значение по objectId - valptr
parent
ae78e4d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+6
-4
TestGen.cc
Utilities/codegen/tests/TestGen.cc
+1
-1
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
1b356292
...
...
@@ -330,8 +330,10 @@
VMonitor vmon;
<xsl:if
test=
"normalize-space($VARMAP)='1'"
>
/*! Получить указатель на переменную храняющую значение, по идентификатору */
long* pvar( UniSetTypes::ObjectId id );
/*! Получить указатель на переменную храняющую значение, по идентификатору
* \return nullptr если элемент не найден
*/
long* valptr( UniSetTypes::ObjectId id );
</xsl:if>
</xsl:template>
...
...
@@ -365,7 +367,7 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::processingMessage( UniSetTypes::Voi
case Message::SysCommand:
preSysCommand( reinterpret_cast
<
SystemMessage*
>
(_msg) );
break;
default:
break;
}
...
...
@@ -462,7 +464,7 @@ bool <xsl:value-of select="$CLASSNAME"/>_SK::checkTestMode()
// -----------------------------------------------------------------------------
</xsl:if>
<xsl:if
test=
"normalize-space($VARMAP)='1'"
>
long*
<xsl:value-of
select=
"$CLASSNAME"
/>
_SK::
getVariable
( UniSetTypes::ObjectId id )
long*
<xsl:value-of
select=
"$CLASSNAME"
/>
_SK::
valptr
( UniSetTypes::ObjectId id )
{
auto i = vmap.find(id);
if( i!= vmap.end() )
...
...
Utilities/codegen/tests/TestGen.cc
View file @
1b356292
...
...
@@ -10,7 +10,7 @@ TestGen::TestGen( UniSetTypes::ObjectId id, xmlNode* confnode ):
vmonit
(
int_var
);
vmonit
(
bool_var
);
long
*
i
=
getVariable
(
input2_s
);
long
*
i
=
valptr
(
input2_s
);
if
(
!
i
)
cerr
<<
"input2_s NOT FOUND!!!"
<<
endl
;
else
...
...
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