| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // ObjectFactory.cs
- //
- // Copyright 2015 Xamarin Inc. All rights reserved.
- using System;
- using System.Runtime.InteropServices;
- using System.Collections.Generic;
- using Urho.Urho2D;
- using Urho.Gui;
- using Urho.Resources;
- using Urho.IO;
- using Urho.Navigation;
- using Urho.Network;
- namespace Urho
- {
- /// <summary>
- /// Base class for object factories.
- /// </summary>
- public unsafe partial class ObjectFactory : RefCounted
- {
- unsafe partial void OnObjectFactoryCreated ();
- [Preserve]
- public ObjectFactory (IntPtr handle) : base (handle)
- {
- OnObjectFactoryCreated ();
- }
- [Preserve]
- protected ObjectFactory (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnObjectFactoryCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr ObjectFactory_CreateObject (IntPtr handle);
- /// <summary>
- /// Create an object. Implemented in templated subclasses.
- /// </summary>
- public UrhoObject CreateObject ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupRefCounted<UrhoObject> (ObjectFactory_CreateObject (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr ObjectFactory_GetContext (IntPtr handle);
- /// <summary>
- /// Return execution context.
- /// </summary>
- private Context GetContext ()
- {
- return Runtime.LookupRefCounted<Context> (ObjectFactory_GetContext (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern TypeInfo* ObjectFactory_GetTypeInfo (IntPtr handle);
- /// <summary>
- /// Return type info of objects created by this factory.
- /// </summary>
- private TypeInfo* GetTypeInfo ()
- {
- Runtime.ValidateRefCounted (this);
- return ObjectFactory_GetTypeInfo (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int ObjectFactory_GetType (IntPtr handle);
- /// <summary>
- /// Return type hash of objects created by this factory.
- /// </summary>
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (ObjectFactory_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr ObjectFactory_GetTypeName (IntPtr handle);
- /// <summary>
- /// Return type name of objects created by this factory.
- /// </summary>
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (ObjectFactory_GetTypeName (handle));
- }
- /// <summary>
- /// Return execution context.
- /// </summary>
- public Context Context {
- get {
- return GetContext ();
- }
- }
- /// <summary>
- /// Return type info of objects created by this factory.
- /// </summary>
- public TypeInfo* TypeInfo {
- get {
- return GetTypeInfo ();
- }
- }
- /// <summary>
- /// Return type hash of objects created by this factory.
- /// </summary>
- public StringHash Type {
- get {
- return UrhoGetType ();
- }
- }
- /// <summary>
- /// Return type name of objects created by this factory.
- /// </summary>
- public string TypeName {
- get {
- return GetTypeName ();
- }
- }
- }
- }
|