Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
a17015d2
Commit
a17015d2
authored
Nov 21, 2019
by
Claes Sjöfors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wb_print_wbl temporarily reverted due to problems with the classcache
parent
85c8328f
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
796 additions
and
778 deletions
+796
-778
wb/lib/wb/src/wb_print_wbl.cpp
wb/lib/wb/src/wb_print_wbl.cpp
+707
-701
wb/lib/wb/src/wb_print_wbl.h
wb/lib/wb/src/wb_print_wbl.h
+89
-77
No files found.
wb/lib/wb/src/wb_print_wbl.cpp
View file @
a17015d2
This diff is collapsed.
Click to expand it.
wb/lib/wb/src/wb_print_wbl.h
View file @
a17015d2
/*
/*
* Proview
R
Open Source Process Control.
* Proview Open Source Process Control.
* Copyright (C) 2005-201
9
SSAB EMEA AB.
* Copyright (C) 2005-201
7
SSAB EMEA AB.
*
*
* This file is part of Proview
R
.
* This file is part of Proview.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
* the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License
* along with Proview
R
. If not, see <http://www.gnu.org/licenses/>
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
*
* Linking Proview
R
statically or dynamically with other modules is
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview
R. Thus, the terms and
* making a combined work based on Proview
. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* conditions of the GNU General Public License cover the whole
* combination.
* combination.
*
*
* In addition, as a special exception, the copyright holders of
* In addition, as a special exception, the copyright holders of
* Proview
R
give you permission to, from the build function in the
* Proview give you permission to, from the build function in the
* Proview
R Configurator, combine ProviewR
with modules generated by the
* Proview
Configurator, combine Proview
with modules generated by the
* Proview
R
PLC Editor to a PLC program, regardless of the license
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview
R (the version used to produce the
* the source code of Proview
(the version used to produce the
* combined work), being distributed under the terms of the GNU
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
* General Public License plus this exception.
*/
*
*
/
/**
/**
* @file wb_print_wbl.h
* @file wb_print_wbl.h
...
@@ -44,10 +44,11 @@
...
@@ -44,10 +44,11 @@
#ifndef wb_print_wbl_h
#ifndef wb_print_wbl_h
#define wb_print_wbl_h
#define wb_print_wbl_h
#include <ostream>
#include <iostream>
#include "pwr_class.h"
#include "wb_ldh.h"
using
namespace
std
;
#include "co_tree.h"
class
wb_adef
;
class
wb_adef
;
class
wb_attribute
;
class
wb_attribute
;
...
@@ -55,68 +56,79 @@ class wb_cdef;
...
@@ -55,68 +56,79 @@ class wb_cdef;
class
wb_object
;
class
wb_object
;
class
wb_volume
;
class
wb_volume
;
class
wb_print_wbl
{
class
wb_print_wbl
{
protected:
protected:
int
m_errCnt
;
int
m_errCnt
;
int
m_lineCnt
;
bool
m_idxFlag
;
bool
m_idxFlag
;
bool
m_noFoCodeFlag
;
bool
m_noFoCodeFlag
;
bool
m_timeFlag
;
bool
m_timeFlag
;
int
m_level
;
int
m_level
;
int
m_levelInd
;
int
m_levelInd
;
char
m_indBuf
[
256
];
char
m_indBuf
[
256
];
bool
m_keepName
;
bool
m_keepName
;
bool
m_isTemplateObject
;
bool
m_isTemplateObject
;
std
::
ostream
&
m_os
;
ostream
&
m_os
;
tree_sTable
*
m_body_cache
;
std
::
ostream
&
indent
(
int
levelIncr
=
0
);
ostream
&
indent
(
int
levelIncr
=
0
);
void
printBody
(
void
printAttribute
(
wb_volume
&
v
,
wb_volume
&
vol
,
pwr_tOid
oid
,
pwr_tOid
toid
,
pwr_tCid
cid
,
pwr_eBix
bix
);
wb_attribute
&
attr
,
bool
printValue
(
wb_volume
&
v
,
pwr_eType
type
,
unsigned
int
flags
,
void
*
val
,
wb_attribute
&
tattr
,
///< template attribute
int
varSize
,
char
**
svalp
);
wb_adef
&
adef
,
void
printBuffer
(
wb_volume
&
vol
,
ldh_sParDef
*
par_bd
,
char
*
body
);
int
force
);
void
printClass
(
wb_volume
&
vol
,
ldh_sParDef
*
par_bd
,
char
*
body
,
char
*
tbody
,
char
*
par_path
);
void
printBody
(
wb_volume
&
v
,
void
printText
(
wb_object
&
o
,
wb_volume
&
v
,
const
char
*
aname
,
const
char
*
text
,
int
varSize
);
wb_object
&
templ
,
pwr_tStatus
getBody
(
wb_volume
&
vol
,
pwr_tCid
cid
,
const
char
*
bname
,
wb_cdef
&
cdef
,
int
tsize
,
ldh_sParDef
**
bdef
,
int
*
rows
,
char
**
tbody
);
pwr_eBix
bix
);
void
bodyCacheFree
();
int
attrCmp
(
char
*
a1
,
char
*
a2
,
int
size
,
pwr_eType
type
);
void
printBuffer
(
wb_volume
&
v
,
bool
isFoCodeObject
(
wb_volume
&
v
,
wb_object
&
o
);
wb_attribute
&
attr
,
wb_attribute
&
tattr
,
///< template attribute
wb_adef
&
adef
);
void
printClass
(
wb_volume
&
v
,
wb_attribute
&
attr
,
wb_attribute
&
tattr
,
///< template attribute
wb_adef
&
adef
);
void
printParameter
(
wb_volume
&
v
,
wb_attribute
&
attr
,
wb_attribute
&
tattr
,
///< template attribute
wb_adef
&
adef
);
void
printText
(
wb_volume
&
v
,
wb_adef
&
adef
,
const
char
*
text
,
int
varSize
);
bool
printValue
(
wb_volume
&
v
,
wb_adef
&
adef
,
void
*
val
,
int
varSize
,
char
**
svalp
);
bool
isFoCodeObject
(
wb_volume
&
v
,
wb_object
&
o
);
public:
public:
wb_print_wbl
(
std
::
ostream
&
os
,
int
levelIndentation
=
2
);
wb_print_wbl
(
ostream
&
os
,
int
levelIndentation
=
2
);
~
wb_print_wbl
();
~
wb_print_wbl
();
int
getErrCnt
()
const
int
getErrCnt
()
const
{
return
m_errCnt
;}
{
void
resetErrCnt
()
{
m_errCnt
=
0
;
}
return
m_errCnt
;
void
keepName
()
{
m_keepName
=
true
;}
}
void
noIndex
()
{
m_idxFlag
=
false
;
m_timeFlag
=
false
;}
void
resetErrCnt
()
void
noFoCode
()
{
m_noFoCodeFlag
=
true
;}
{
m_errCnt
=
0
;
void
printHierarchy
(
wb_volume
&
v
,
wb_object
&
o
);
//< Prints a hierarchy
}
void
printObject
(
wb_volume
&
v
,
wb_object
&
o
,
bool
recursive
=
true
);
//< Prints an object
void
keepName
()
void
printVolume
(
wb_volume
&
v
,
bool
recursive
=
true
);
//< Prints the volume
{
m_keepName
=
true
;
}
void
noIndex
()
{
m_idxFlag
=
false
;
m_timeFlag
=
false
;
}
void
noFoCode
()
{
m_noFoCodeFlag
=
true
;
}
void
printHierarchy
(
wb_volume
&
v
,
wb_object
&
o
);
///< Prints a hierarchy
void
printObject
(
wb_volume
&
v
,
wb_object
&
o
,
bool
recursive
=
true
);
///< Prints an object
void
printVolume
(
wb_volume
&
v
,
bool
recursive
=
true
);
///< Prints the volume
};
};
#endif
#endif
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