Module: OroGen::TypekitMarshallers::Corba::NumericType

Defined in:
lib/orogen/marshallers/corba.rb

Instance Method Summary collapse

Instance Method Details

#corba_nameObject



159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/orogen/marshallers/corba.rb', line 159

def corba_name
    if integer?
        if name == "/bool"
            "CORBA::Boolean"
        elsif size == 1
            if unsigned?
                "CORBA::Octet"
            else
                "CORBA::Char"
            end
        elsif size == 2
            "CORBA::#{'U' if unsigned?}Short"
        elsif size == 4
            "CORBA::#{'U' if unsigned?}Long"
        elsif size == 8
            "CORBA::#{'U' if unsigned?}LongLong"
        else
            raise "unexpected integer size #{size}"
        end
    else
        if size == 4
            "CORBA::Float"
        elsif size == 8
            "CORBA::Double"
        else
            raise "unexpected floating-point size #{size}"
        end
    end
end