Class: VORuby::STC::V1_30::GenericCoordFrameType
- Inherits:
-
CoordFrameType
- Object
- STCBaseType
- CoordFrameType
- VORuby::STC::V1_30::GenericCoordFrameType
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#coord_flavor ⇒ Object
Returns the value of attribute coord_flavor.
-
#coord_ref_frame ⇒ Object
Returns the value of attribute coord_ref_frame.
-
#coord_ref_pos ⇒ Object
Returns the value of attribute coord_ref_pos.
Attributes inherited from CoordFrameType
Attributes included from STCReference
#id, #idref, #ucd, #xlink_href, #xlink_type
Class Method Summary collapse
Instance Method Summary collapse
- #==(f) ⇒ Object
-
#initialize(coord_ref_frame, coord_ref_pos, coord_flavor, name = nil, options = {}) ⇒ GenericCoordFrameType
constructor
A new instance of GenericCoordFrameType.
- #to_xml(name = nil) ⇒ Object
Methods inherited from CoordFrameType
Methods inherited from STCBaseType
Methods included from STCReference
#stc_reference_eq, stc_reference_from_xml, #stc_reference_to_xml
Methods included from SerializableToXml
Constructor Details
#initialize(coord_ref_frame, coord_ref_pos, coord_flavor, name = nil, options = {}) ⇒ GenericCoordFrameType
Returns a new instance of GenericCoordFrameType.
6316 6317 6318 6319 6320 6321 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6316 def initialize(coord_ref_frame, coord_ref_pos, coord_flavor, name=nil, ={}) super(name, ) self.coord_ref_frame = coord_ref_frame self.coord_ref_pos = coord_ref_pos self.coord_flavor = coord_flavor end |
Instance Attribute Details
#coord_flavor ⇒ Object
Returns the value of attribute coord_flavor.
6314 6315 6316 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6314 def coord_flavor @coord_flavor end |
#coord_ref_frame ⇒ Object
Returns the value of attribute coord_ref_frame.
6314 6315 6316 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6314 def coord_ref_frame @coord_ref_frame end |
#coord_ref_pos ⇒ Object
Returns the value of attribute coord_ref_pos.
6314 6315 6316 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6314 def coord_ref_pos @coord_ref_pos end |
Class Method Details
.from_xml(xml) ⇒ Object
6367 6368 6369 6370 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6367 def self.from_xml(xml) root = element_from(xml) self.new(*generic_coord_frame_from_xml(root)) end |
.generic_coord_frame_from_xml(root) ⇒ Object
6358 6359 6360 6361 6362 6363 6364 6365 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6358 def self.generic_coord_frame_from_xml(root) [ xml_to_obj(root, CoordRefFrame, true), xml_to_obj(root, CoordRefPos, true), xml_to_obj(root, CoordFlavor, true), *CoordFrameType.coord_frame_from_xml(root) ] end |
Instance Method Details
#==(f) ⇒ Object
6341 6342 6343 6344 6345 6346 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6341 def ==(f) super(f) and self.coord_ref_frame == f.coord_ref_frame and self.coord_ref_pos == f.coord_ref_pos and self.coord_flavor == f.coord_flavor end |
#to_xml(name = nil) ⇒ Object
6348 6349 6350 6351 6352 6353 6354 6355 6356 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6348 def to_xml(name=nil) el = super(name) el.add_element(self.coord_ref_frame.to_xml) if self.coord_ref_frame el.add_element(self.coord_ref_pos.to_xml) if self.coord_ref_pos el.add_element(self.coord_flavor.to_xml) el end |