zoukankan      html  css  js  c++  java
  • C# Bridge Pattern(Handle/Body)

    /* ----------------------------------------------------------------------------
     * This file was automatically generated by SWIG (http://www.swig.org).
     * Version 3.0.2
     *
     * Do not make changes to this file unless you know what you are doing--modify
     * the SWIG interface file instead.
     * ----------------------------------------------------------------------------- */
    
    
    public class RenderTarget2D : global::System.IDisposable
    {
        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
        protected bool swigCMemOwn;
        
        internal RenderTarget2D(global::System.IntPtr cPtr, bool cMemoryOwn)
        {
            swigCMemOwn = cMemoryOwn;
            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
        }
        
        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RenderTarget2D obj)
        {
            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
        }
        
        ~RenderTarget2D()
        {
            Dispose();
        }
        
        public virtual void Dispose()
        {
            lock(this)
            {
                if (swigCPtr.Handle != global::System.IntPtr.Zero)
                {
                    if (swigCMemOwn)
                    {
                        swigCMemOwn = false;
                        examplePINVOKE.delete_RenderTarget2D(swigCPtr);
                    }
                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
                }
                global::System.GC.SuppressFinalize(this);
            }
        }
        
        public int width
        {
            set
            {
                examplePINVOKE.RenderTarget2D_width_set(swigCPtr, value);
            } 
            get
            {
                int ret = examplePINVOKE.RenderTarget2D_width_get(swigCPtr);
                return ret;
            } 
        }
        
        public int height
        {
            set
            {
                examplePINVOKE.RenderTarget2D_height_set(swigCPtr, value);
            } 
            get
            {
                int ret = examplePINVOKE.RenderTarget2D_height_get(swigCPtr);
                return ret;
            } 
        }
        
        public RenderTarget2D() : this(examplePINVOKE.new_RenderTarget2D(), true)
        {
    
        }
    }
  • 相关阅读:
    【洛谷P2967】【USACO 2009 Dec】电子游戏 Video Game Troubles
    2021-09-11 刷题 39. 组合总和
    2021-09-10 刷题 160. 相交链表
    2021-09-09 刷题 141. 环形链表
    2021-09-08 刷题 20. 有效的括号
    2021-09-07 刷题 119杨辉三角2
    2021-08-01 刷题 合并两个有序链表
    2021-07-31 leetcode刷题记录 两数之和
    根据需要数据库的内容,封装增删改查的sql函数
    QT 对XML 文件进行增删改查
  • 原文地址:https://www.cnblogs.com/lilei9110/p/4390108.html
Copyright © 2011-2022 走看看