Пример #1
0
 public BasicString(string __s, global::Std.Allocator __a)
 {
     __Instance = Marshal.AllocHGlobal(sizeof(global::Std.Cxx11.BasicString.__Internal));
     __ownsNativeInstance = true;
     NativeToManagedMap[__Instance] = this;
     if (ReferenceEquals(__a, null))
         throw new global::System.ArgumentNullException("__a", "Cannot be null because it is a C++ reference (&).");
     var __arg1 = ((global::Std.Allocator) (object) __a).__Instance;
     global::Std.Cxx11.BasicString.__Internal.ctorc__N_std_N___cxx11_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C_0((__Instance + __PointerAdjustment), __s, __arg1);
 }
Пример #2
0
        public Allocator(global::Std.Allocator <_Ty> _0)
        {
            var ___Ty = typeof(_Ty);

            if (___Ty.IsAssignableFrom(typeof(sbyte)))
            {
                throw new MissingMethodException("Method allocator__Ty_ missing from explicit specialization global::Std.Allocator<sbyte>.");
                return;
            }
            throw new ArgumentOutOfRangeException("_Ty", string.Join(", ", new[] { typeof(_Ty).FullName }), "global::Std.Allocator<_Ty> maps a C++ template class and therefore it only supports a limited set of types and their subclasses: <sbyte>.");
        }
Пример #3
0
        public Allocator(global::Std.Allocator <_Tp> __a)
        {
            var ___Tp = typeof(_Tp);

            if (___Tp.IsAssignableFrom(typeof(sbyte)))
            {
                __Instance                     = Marshal.AllocHGlobal(sizeof(global::Std.Allocator.__Internal));
                __ownsNativeInstance           = true;
                NativeToManagedMap[__Instance] = this;
                if (ReferenceEquals(__a, null))
                {
                    throw new global::System.ArgumentNullException("__a", "Cannot be null because it is a C++ reference (&).");
                }
                var __arg0 = __a.__Instance;
                global::Std.Allocator.__Internal.cctorc__N_std_S_allocator__C((__Instance + __PointerAdjustment), __arg0);
                return;
            }
            throw new ArgumentOutOfRangeException("_Tp", string.Join(", ", new[] { typeof(_Tp).FullName }), "global::Std.Allocator<_Tp> maps a C++ template class and therefore it only supports a limited set of types and their subclasses: <sbyte>.");
        }
Пример #4
0
        public static global::Std.BasicString <sbyte, global::Std.CharTraits <sbyte>, global::Std.Allocator <sbyte> > BasicString(string __s, global::Std.Allocator <sbyte> __a)
        {
            if (ReferenceEquals(__a, null))
            {
                throw new global::System.ArgumentNullException("__a", "Cannot be null because it is a C++ reference (&).");
            }
            var __arg1 = __a.__Instance;
            var __ret  = Marshal.AllocHGlobal(24);

            __Internal.BasicString(__ret, __s, __arg1);
            global::Std.BasicString <sbyte, global::Std.CharTraits <sbyte>, global::Std.Allocator <sbyte> > __result0;
            if (__ret == IntPtr.Zero)
            {
                __result0 = null;
            }
            else if (global::Std.BasicString <sbyte, global::Std.CharTraits <sbyte>, global::Std.Allocator <sbyte> > .NativeToManagedMap.ContainsKey(__ret))
            {
                __result0 = (global::Std.BasicString <sbyte, global::Std.CharTraits <sbyte>, global::Std.Allocator <sbyte> >)global::Std.BasicString <sbyte, global::Std.CharTraits <sbyte>, global::Std.Allocator <sbyte> > .NativeToManagedMap[__ret];
            }
            else
            {
                __result0 = global::Std.BasicString <sbyte, global::Std.CharTraits <sbyte>, global::Std.Allocator <sbyte> > .__CreateInstance(__ret);
            }
            return(__result0);
        }