module OroGen::TypekitMarshallers::Corba::ArrayType
Public Instance Methods
corba_arg_type()
click to toggle source
# File lib/orogen/marshallers/corba.rb, line 384 def corba_arg_type; "#{deference.corba_name} const*" end
corba_ref_type()
click to toggle source
# File lib/orogen/marshallers/corba.rb, line 385 def corba_ref_type; "#{deference.corba_name}*" end
from_corba(typekit, result, indent)
click to toggle source
# File lib/orogen/marshallers/corba.rb, line 401 def from_corba(typekit, result, indent) element_type = deference.name element_type = registry.build(element_type) # Special case for array of numerics, we can do a simple memcpy if element_type < NumericType result << "#{indent}const int array_size = length * sizeof(#{element_type.cxx_name});\n" result << "#{indent}memcpy(value, corba, array_size);" else code_copy(typekit, result, indent, "value", "corba", "fromCORBA") do |type, _| type.inlines_code? end end end
to_corba(typekit, result, indent)
click to toggle source
# File lib/orogen/marshallers/corba.rb, line 387 def to_corba(typekit, result, indent) element_type = deference.name element_type = registry.build(element_type) # Special case for array of numerics, we can do a simple memcpy if element_type < NumericType result << "#{indent}const int array_size = length * sizeof(#{element_type.cxx_name});\n" result << "#{indent}memcpy(corba, value, array_size);" else code_copy(typekit, result, indent, "corba", "value", "toCORBA") do |type, _| type.inlines_code? end end end