Module: OroGen::TypekitMarshallers::Corba::Type
- Defined in:
- lib/orogen/marshallers/corba.rb
Instance Method Summary collapse
- #corba_arg_type ⇒ Object
- #corba_name ⇒ Object
- #corba_namespace ⇒ Object
- #corba_ref_type ⇒ Object
- #from_corba(typekit, result, *args) ⇒ Object
- #from_corba_array_signature(typekit, options = Hash.new) ⇒ Object
- #from_corba_signature(typekit, options = Hash.new) ⇒ Object
- #inline_fromAny(any_var, corba_var, indent) ⇒ Object
- #inline_fromCorba(result, value, indent) ⇒ Object
- #inline_toAny(any_var, corba_var, indent) ⇒ Object
- #inline_toCorba(result, value, indent) ⇒ Object
- #to_corba(typekit, result, *args) ⇒ Object
- #to_corba_array_signature(typekit, options = Hash.new) ⇒ Object
- #to_corba_signature(typekit, options = Hash.new) ⇒ Object
Instance Method Details
#corba_arg_type ⇒ Object
134 |
# File 'lib/orogen/marshallers/corba.rb', line 134 def corba_arg_type; "#{corba_name} const&" end |
#corba_name ⇒ Object
101 102 103 104 105 106 107 108 109 |
# File 'lib/orogen/marshallers/corba.rb', line 101 def corba_name if inlines_code? normalize_cxxname(basename) elsif contains_opaques? "#{corba_namespace}::#{normalize_cxxname(basename.gsub(/[^\w]/, '_'))}_m" else "#{corba_namespace}::#{normalize_cxxname(basename.gsub(/[^\w]/, '_'))}" end end |
#corba_namespace ⇒ Object
110 111 112 |
# File 'lib/orogen/marshallers/corba.rb', line 110 def corba_namespace "orogen#{namespace('::')}Corba" end |
#corba_ref_type ⇒ Object
135 |
# File 'lib/orogen/marshallers/corba.rb', line 135 def corba_ref_type; "#{corba_name}&" end |
#from_corba(typekit, result, *args) ⇒ Object
140 141 142 |
# File 'lib/orogen/marshallers/corba.rb', line 140 def from_corba(typekit, result, *args) raise NotImplementedError end |
#from_corba_array_signature(typekit, options = Hash.new) ⇒ Object
129 130 131 132 |
# File 'lib/orogen/marshallers/corba.rb', line 129 def from_corba_array_signature(typekit, = Hash.new) target_type = typekit.intermediate_type_for(self) "bool #{[:namespace]}fromCORBA( #{ref_type} value, int length, #{target_type.corba_arg_type} corba )" end |
#from_corba_signature(typekit, options = Hash.new) ⇒ Object
124 125 126 127 |
# File 'lib/orogen/marshallers/corba.rb', line 124 def from_corba_signature(typekit, = Hash.new) target_type = typekit.intermediate_type_for(self) "bool #{[:namespace]}fromCORBA( #{ref_type} value, #{target_type.corba_arg_type} corba )" end |
#inline_fromAny(any_var, corba_var, indent) ⇒ Object
147 148 149 |
# File 'lib/orogen/marshallers/corba.rb', line 147 def inline_fromAny(any_var, corba_var, indent) "#{indent}if (!(#{any_var} >>= #{corba_var})) return false;" end |
#inline_fromCorba(result, value, indent) ⇒ Object
144 145 146 |
# File 'lib/orogen/marshallers/corba.rb', line 144 def inline_fromCorba(result, value, indent) "#{indent}#{result} = #{value};\n" end |
#inline_toAny(any_var, corba_var, indent) ⇒ Object
153 154 155 |
# File 'lib/orogen/marshallers/corba.rb', line 153 def inline_toAny(any_var, corba_var, indent) "#{indent}#{any_var} <<= #{corba_var};" end |
#inline_toCorba(result, value, indent) ⇒ Object
150 151 152 |
# File 'lib/orogen/marshallers/corba.rb', line 150 def inline_toCorba(result, value, indent) "#{indent}#{result} = #{value};\n" end |
#to_corba(typekit, result, *args) ⇒ Object
137 138 139 |
# File 'lib/orogen/marshallers/corba.rb', line 137 def to_corba(typekit, result, *args) raise NotImplementedError end |
#to_corba_array_signature(typekit, options = Hash.new) ⇒ Object
119 120 121 122 |
# File 'lib/orogen/marshallers/corba.rb', line 119 def to_corba_array_signature(typekit, = Hash.new) target_type = typekit.intermediate_type_for(self) "bool #{[:namespace]}toCORBA( #{target_type.corba_ref_type} corba, #{arg_type} value, int length )" end |
#to_corba_signature(typekit, options = Hash.new) ⇒ Object
114 115 116 117 |
# File 'lib/orogen/marshallers/corba.rb', line 114 def to_corba_signature(typekit, = Hash.new) target_type = typekit.intermediate_type_for(self) "bool #{[:namespace]}toCORBA( #{target_type.corba_ref_type} corba, #{arg_type} value )" end |