Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabComm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sven Gestegård Robertz
LabComm
Commits
af74718b
Commit
af74718b
authored
10 years ago
by
Anders Blomdell
Browse files
Options
Downloads
Patches
Plain Diff
Removed dependency on python typedefs
parent
96bdb079
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/user_types/example_encoder.py
+27
-41
27 additions, 41 deletions
examples/user_types/example_encoder.py
with
27 additions
and
41 deletions
examples/user_types/example_encoder.py
+
27
−
41
View file @
af74718b
...
...
@@ -8,45 +8,31 @@ if __name__ == '__main__':
version
=
sys
.
argv
[
2
]
if
len
(
sys
.
argv
)
==
3
else
"
LabComm20141009
"
encoder
=
labcomm
.
Encoder
(
labcomm
.
StreamWriter
(
open
(
sys
.
argv
[
1
],
'
w
'
)),
version
)
encoder
.
add_decl
(
test
.
twoLines
.
signature
)
l1
=
test
.
line
()
c1s
=
test
.
point
()
c1sx
=
test
.
coord
()
c1sx
.
val
=
1
c1sy
=
test
.
coord
()
c1sy
.
val
=
11
c1s
.
x
=
c1sx
;
c1s
.
y
=
c1sy
;
c1e
=
test
.
point
()
c1ex
=
test
.
coord
()
c1ex
.
val
=
2
c1ey
=
test
.
coord
()
c1ey
.
val
=
22
c1e
.
x
=
c1ex
;
c1e
.
y
=
c1ey
;
l1
.
start
=
c1s
l1
.
end
=
c1e
l2
=
test
.
line
()
c2s
=
test
.
point
()
c2sx
=
test
.
coord
()
c2sx
.
val
=
3
c2sy
=
test
.
coord
()
c2sy
.
val
=
33
c2s
.
x
=
c2sx
;
c2s
.
y
=
c2sy
;
c2e
=
test
.
point
()
c2ex
=
test
.
coord
()
c2ex
.
val
=
4
c2ey
=
test
.
coord
()
c2ey
.
val
=
44
c2e
.
x
=
c2ex
;
c2e
.
y
=
c2ey
;
l2
.
start
=
c2s
l2
.
end
=
c2e
tl
=
test
.
twoLines
()
tl
.
l1
=
l1
tl
.
l2
=
l2
tl
.
f
=
test
.
foo
()
tl
.
f
.
a
=
10
;
tl
.
f
.
b
=
20
;
tl
.
f
.
c
=
False
;
tl
=
dict
(
l1
=
dict
(
start
=
dict
(
x
=
dict
(
val
=
1
),
y
=
dict
(
val
=
11
)
),
end
=
dict
(
x
=
dict
(
val
=
2
),
y
=
dict
(
val
=
22
)
)
),
l2
=
dict
(
start
=
dict
(
x
=
dict
(
val
=
3
),
y
=
dict
(
val
=
33
)
),
end
=
dict
(
x
=
dict
(
val
=
4
),
y
=
dict
(
val
=
44
)
)
),
f
=
dict
(
a
=
10
,
b
=
20
,
c
=
False
)
)
encoder
.
encode
(
tl
,
test
.
twoLines
.
signature
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment