Пример #1
0
        static string ParamToArg(VariableElement v)
        {
            if (v.IsArray)
            {
                return($"{v.CsClassName}[] {v.CsFieldName}");
            }

            if (v.ClassIsStruct)
            {
                return($"in {v.CsClassName} {v.CsFieldName}");
            }

            return($"{v.CsClassName} {v.CsFieldName}");
        }
Пример #2
0
        static bool IsVariableBlittable(string rosPackage, VariableElement v)
        {
            if (v.IsArray || v.RosClassName == "string")
            {
                return(false);
            }

            if (BuiltInTypes.Contains(v.RosClassName))
            {
                return(true);
            }

            string resolvedName = v.RosClassName.Contains("/") ? $"{rosPackage}/{v.RosClassName}" : v.RosClassName;

            return(BlittableStructs.Contains(resolvedName));
        }