-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
layer method for gds_element objects
- Loading branch information
Showing
4 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function [lay, dtype] = layer(gelm) | ||
%function [lay, dtype] = layer(gelm) | ||
% | ||
% returns layer and data type properties of an element | ||
% (this method is faster than field indexing) | ||
% | ||
% gelm : a gds_element object | ||
% lay : layer property | ||
% dtype : (Optional) data type property | ||
|
||
if isref(gelm.data.internal) | ||
error('gds_element: element has no layer/datatype property.'); | ||
end | ||
|
||
lay = get_element_data(gelm.data.internal, 'layer'); | ||
|
||
if nargout > 1 | ||
dtype = get_element_data(gelm.data.internal, 'dtype'); | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters