Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RBComb Sample Visualizer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Pascal Engeler
RBComb Sample Visualizer
Commits
ffc3f0af
Commit
ffc3f0af
authored
1 year ago
by
Pascal Engeler
Browse files
Options
Downloads
Patches
Plain Diff
Added association loading in bottom metal marking
parent
6060a7f9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gui/src/metadata_manager.cpp
+48
-0
48 additions, 0 deletions
gui/src/metadata_manager.cpp
with
48 additions
and
0 deletions
gui/src/metadata_manager.cpp
+
48
−
0
View file @
ffc3f0af
...
...
@@ -31,6 +31,9 @@ bool MetadataManager::load(std::string filename, std::string layername) {
data
.
status
=
status
;
newDataVector
.
push_back
(
data
);
}
else
if
(
c
==
'x'
)
{
//read nothing, probably happens on the last line
continue
;
}
else
{
std
::
cerr
<<
"Encountered unknown directive "
<<
c
<<
" while parsing file "
<<
filename
<<
std
::
endl
;
}
...
...
@@ -76,6 +79,51 @@ bool MetadataManager::addLayer(const Layer& layer) {
_metadataMap
[
layer
.
name
()]
=
std
::
vector
<
ObjectMetadata
>
(
layer
.
numObjects
(),
{
0
});
return
true
;
}
void
MetadataManager
::
markBottomMetal
(
std
::
string
layername
)
{
std
::
ifstream
file
(
"C:
\\
Users
\\
Pascal
\\
repos
\\
rbcomb-sample-visualizer
\\
gui
\\
resources
\\
association
\\
sample-minicircuit-association.txt"
);
std
::
string
line
;
while
(
std
::
getline
(
file
,
line
))
{
if
(
line
[
0
]
==
'#'
)
{
continue
;
}
std
::
istringstream
iss
(
line
);
unsigned
index
;
if
(
!
(
iss
>>
index
))
{
continue
;
}
if
(
index
>=
_metadataMap
[
layername
].
size
())
{
continue
;
}
if
(
line
.
back
()
==
'e'
)
{
//"None"
_metadataMap
[
layername
][
index
].
info
=
"Assignment:
\n\t
Unconnected"
;
continue
;
}
else
{
std
::
vector
<
std
::
string
>
split_line
;
std
::
string
tempstr
=
""
;
for
(
auto
c
:
line
)
{
if
(
c
==
' '
)
{
if
(
tempstr
!=
""
)
{
split_line
.
push_back
(
tempstr
);
}
tempstr
.
clear
();
}
else
{
tempstr
+=
c
;
}
}
split_line
.
push_back
(
tempstr
);
//append last one
std
::
string
infostr
=
""
;
infostr
+=
"
\t
Breakout zif pad "
+
split_line
[
3
]
+
" on net "
+
split_line
[
1
];
infostr
+=
"
\n\t
Adapter zif pad "
+
split_line
[
4
]
+
" on net "
+
split_line
[
5
];
infostr
+=
"
\n\t
Minicircuit "
+
split_line
[
2
]
+
" on channel ("
+
split_line
[
6
]
+
", "
+
split_line
[
7
]
+
")"
;
_metadataMap
[
layername
][
index
].
info
=
infostr
;
}
}
}
ObjectMetadata
&
MetadataManager
::
getData
(
std
::
string
layername
,
int
objectIndex
)
{
return
_metadataMap
[
layername
][
objectIndex
];
}
...
...
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