// 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
{
///
/// Base class for object factories.
///
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);
///
/// Create an object. Implemented in templated subclasses.
///
public UrhoObject CreateObject ()
{
Runtime.ValidateRefCounted (this);
return Runtime.LookupRefCounted (ObjectFactory_CreateObject (handle));
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr ObjectFactory_GetContext (IntPtr handle);
///
/// Return execution context.
///
private Context GetContext ()
{
return Runtime.LookupRefCounted (ObjectFactory_GetContext (handle));
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern TypeInfo* ObjectFactory_GetTypeInfo (IntPtr handle);
///
/// Return type info of objects created by this factory.
///
private TypeInfo* GetTypeInfo ()
{
Runtime.ValidateRefCounted (this);
return ObjectFactory_GetTypeInfo (handle);
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern int ObjectFactory_GetType (IntPtr handle);
///
/// Return type hash of objects created by this factory.
///
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);
///
/// Return type name of objects created by this factory.
///
private string GetTypeName ()
{
Runtime.ValidateRefCounted (this);
return Marshal.PtrToStringAnsi (ObjectFactory_GetTypeName (handle));
}
///
/// Return execution context.
///
public Context Context {
get {
return GetContext ();
}
}
///
/// Return type info of objects created by this factory.
///
public TypeInfo* TypeInfo {
get {
return GetTypeInfo ();
}
}
///
/// Return type hash of objects created by this factory.
///
public StringHash Type {
get {
return UrhoGetType ();
}
}
///
/// Return type name of objects created by this factory.
///
public string TypeName {
get {
return GetTypeName ();
}
}
}
}