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
d252cd8a
Commit
d252cd8a
authored
Feb 12, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Commandot 'replace attribute' implementerat
parent
78eb209c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
305 additions
and
93 deletions
+305
-93
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+235
-1
xtt/lib/ge/src/ge_dyn.h
xtt/lib/ge/src/ge_dyn.h
+43
-1
xtt/lib/ge/src/ge_graph.h
xtt/lib/ge/src/ge_graph.h
+8
-0
xtt/lib/ge/src/ge_graph_command.cpp
xtt/lib/ge/src/ge_graph_command.cpp
+19
-91
No files found.
xtt/lib/ge/src/ge_dyn.cpp
View file @
d252cd8a
This diff is collapsed.
Click to expand it.
xtt/lib/ge/src/ge_dyn.h
View file @
d252cd8a
This diff is collapsed.
Click to expand it.
xtt/lib/ge/src/ge_graph.h
View file @
d252cd8a
...
...
@@ -926,6 +926,14 @@ class Graph {
*/
int
export_TrendTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
);
//! Export java code for dynamics of a table object.
/*!
\param fp Output file.
\param object Object.
\param cnt Index for javabean name.
*/
int
export_TableTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
);
//! Export java code for dynamics of a slider object.
/*!
\param fp Output file.
...
...
xtt/lib/ge/src/ge_graph_command.cpp
View file @
d252cd8a
...
...
@@ -41,6 +41,7 @@ extern "C" {
#include "co_dcli_msg.h"
#include "ge_msg.h"
#include "ge.h"
#include "ge_dyn.h"
extern
"C"
{
#include "flow_x.h"
...
...
@@ -2307,16 +2308,10 @@ static int graph_replace_func( void *client_data,
{
grow_tObject
*
sel_list
;
int
sel_count
;
glow_sTraceData
*
trace_data
;
bool
modified
;
char
*
s
;
char
tmp
[
120
];
char
from_str
[
120
];
char
to_str
[
120
];
int
offs
;
int
replace_cnt
=
0
;
int
strict
;
char
str
[
120
];
if
(
EVEN
(
dcli_get_qualifier
(
"/FROM"
,
from_str
)))
{
graph
->
message
(
'E'
,
"Syntax error"
);
...
...
@@ -2341,46 +2336,16 @@ static int graph_replace_func( void *client_data,
case
glow_eObjectType_GrowNode
:
case
glow_eObjectType_GrowSlider
:
case
glow_eObjectType_GrowTrend
:
case
glow_eObjectType_GrowBar
:
grow_GetTraceAttr
(
sel_list
[
i
],
&
trace_data
);
modified
=
false
;
for
(
int
j
=
0
;
j
<
(
int
)(
sizeof
(
trace_data
->
data
)
/
sizeof
(
trace_data
->
data
[
0
]));
j
++
)
{
strncpy
(
str
,
trace_data
->
data
[
j
],
sizeof
(
str
));
if
(
!
strict
)
cdh_ToLower
(
str
,
str
);
s
=
strstr
(
str
,
from_str
);
if
(
s
)
{
offs
=
(
int
)(
s
-
str
);
strcpy
(
tmp
,
s
+
strlen
(
from_str
));
strncpy
(
&
trace_data
->
data
[
j
][
offs
],
to_str
,
sizeof
(
trace_data
->
data
[
0
])
-
offs
);
trace_data
->
data
[
j
][
sizeof
(
trace_data
->
data
[
0
])
-
1
]
=
0
;
strncat
(
trace_data
->
data
[
j
],
tmp
,
sizeof
(
trace_data
->
data
[
0
])
-
strlen
(
trace_data
->
data
[
j
]));
modified
=
true
;
}
}
strncpy
(
str
,
trace_data
->
ref_object
,
sizeof
(
str
));
if
(
!
strict
)
cdh_ToLower
(
str
,
str
);
s
=
strstr
(
str
,
from_str
);
if
(
s
)
{
offs
=
(
int
)(
s
-
str
);
strcpy
(
tmp
,
s
+
strlen
(
from_str
));
strncpy
(
&
trace_data
->
ref_object
[
offs
],
to_str
,
sizeof
(
trace_data
->
ref_object
)
-
offs
);
trace_data
->
ref_object
[
sizeof
(
trace_data
->
ref_object
)
-
1
]
=
0
;
strncat
(
trace_data
->
ref_object
,
tmp
,
sizeof
(
trace_data
->
ref_object
)
-
strlen
(
trace_data
->
ref_object
));
modified
=
true
;
}
if
(
modified
)
{
grow_SetTraceAttr
(
sel_list
[
i
],
trace_data
);
replace_cnt
++
;
}
case
glow_eObjectType_GrowTable
:
case
glow_eObjectType_GrowWindow
:
case
glow_eObjectType_GrowFolder
:
case
glow_eObjectType_GrowBar
:
{
GeDyn
*
dyn
;
grow_GetUserData
(
sel_list
[
i
],
(
void
**
)
&
dyn
);
dyn
->
replace_attribute
(
from_str
,
to_str
,
&
replace_cnt
,
strict
);
break
;
}
default:
;
}
...
...
@@ -2408,12 +2373,6 @@ static void graph_group_replace_attr( grow_tObject group, char *from_str, char *
{
grow_tObject
*
objectlist
;
int
object_cnt
;
glow_sTraceData
*
trace_data
;
bool
modified
;
char
*
s
;
char
tmp
[
120
];
int
offs
;
char
str
[
120
];
grow_GetGroupObjectList
(
group
,
&
objectlist
,
&
object_cnt
);
for
(
int
i
=
0
;
i
<
object_cnt
;
i
++
)
{
...
...
@@ -2425,47 +2384,16 @@ static void graph_group_replace_attr( grow_tObject group, char *from_str, char *
case
glow_eObjectType_GrowNode
:
case
glow_eObjectType_GrowSlider
:
case
glow_eObjectType_GrowTrend
:
case
glow_eObjectType_GrowBar
:
grow_GetTraceAttr
(
objectlist
[
i
],
&
trace_data
);
modified
=
false
;
for
(
int
j
=
0
;
j
<
(
int
)(
sizeof
(
trace_data
->
data
)
/
sizeof
(
trace_data
->
data
[
0
]));
j
++
)
{
strncpy
(
str
,
trace_data
->
data
[
j
],
sizeof
(
str
));
if
(
strict
)
cdh_ToLower
(
str
,
str
);
s
=
strstr
(
str
,
from_str
);
if
(
s
)
{
offs
=
(
int
)(
s
-
str
);
strcpy
(
tmp
,
s
+
strlen
(
from_str
));
strncpy
(
&
trace_data
->
data
[
j
][
offs
],
to_str
,
sizeof
(
trace_data
->
data
[
0
])
-
offs
);
trace_data
->
data
[
j
][
sizeof
(
trace_data
->
data
[
0
])
-
1
]
=
0
;
strncat
(
trace_data
->
data
[
j
],
tmp
,
sizeof
(
trace_data
->
data
[
0
])
-
strlen
(
trace_data
->
data
[
j
]));
modified
=
true
;
}
}
strncpy
(
str
,
trace_data
->
ref_object
,
sizeof
(
str
));
if
(
strict
)
cdh_ToLower
(
str
,
str
);
s
=
strstr
(
str
,
from_str
);
if
(
s
)
{
offs
=
(
int
)(
s
-
str
);
strcpy
(
tmp
,
s
+
strlen
(
from_str
));
strncpy
(
&
trace_data
->
ref_object
[
offs
],
to_str
,
sizeof
(
trace_data
->
ref_object
)
-
offs
);
trace_data
->
ref_object
[
sizeof
(
trace_data
->
ref_object
)
-
1
]
=
0
;
strncat
(
trace_data
->
ref_object
,
tmp
,
sizeof
(
trace_data
->
ref_object
)
-
strlen
(
trace_data
->
ref_object
));
modified
=
true
;
}
if
(
modified
)
{
grow_SetTraceAttr
(
objectlist
[
i
],
trace_data
);
(
*
replace_cnt
)
++
;
}
case
glow_eObjectType_GrowTable
:
case
glow_eObjectType_GrowWindow
:
case
glow_eObjectType_GrowFolder
:
case
glow_eObjectType_GrowBar
:
{
GeDyn
*
dyn
;
grow_GetUserData
(
objectlist
[
i
],
(
void
**
)
&
dyn
);
dyn
->
replace_attribute
(
from_str
,
to_str
,
replace_cnt
,
strict
);
break
;
}
default:
;
}
...
...
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