コード例 #1
0
        public void VectorUnsignedCharErase()
        {
            tlog.Debug(tag, $"VectorUnsignedCharErase START");

            var testingTarget = new VectorUnsignedChar();
            Assert.IsNotNull(testingTarget, "Can't create success object VectorUnsignedChar.");
            Assert.IsInstanceOf<VectorUnsignedChar>(testingTarget, "Should return VectorUnsignedChar instance.");

            try
            {
                testingTarget.PushBack(255);
                byte[] arr = new byte[4];

                /** 1 parameter : byte[] iterator */
                testingTarget.Erase(arr);
                /** 2 parameters : byte[] first, SWIGTYPE_p_unsigned_char last */
                testingTarget.Erase(arr, testingTarget.End());
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"VectorUnsignedCharErase END (OK)");
        }
コード例 #2
0
 public VectorUnsignedCharEnumerator(VectorUnsignedChar collection)
 {
     collectionRef = collection;
     currentIndex  = -1;
     currentObject = null;
     currentSize   = collectionRef.Count;
 }
コード例 #3
0
        public void VectorUnsignedCharSwap()
        {
            tlog.Debug(tag, $"VectorUnsignedCharSwap START");

            var testingTarget = new VectorUnsignedChar();

            Assert.IsNotNull(testingTarget, "Can't create success object VectorUnsignedChar.");
            Assert.IsInstanceOf <VectorUnsignedChar>(testingTarget, "Should return VectorUnsignedChar instance.");

            try
            {
                using (VectorUnsignedChar vector = new VectorUnsignedChar())
                {
                    testingTarget.Swap(vector);
                }
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            testingTarget.Clear();
            testingTarget.Release();
            tlog.Debug(tag, $"VectorUnsignedCharSwap END (OK)");
        }
コード例 #4
0
ファイル: VectorUnsignedChar.cs プロジェクト: yourina/TizenFX
 public VectorUnsignedChar(VectorUnsignedChar vector) : this(NDalicPINVOKE.new_VectorUnsignedChar__SWIG_1(VectorUnsignedChar.getCPtr(vector)), true)
 {
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #5
0
        public void VectorUnsignedCharResize()
        {
            tlog.Debug(tag, $"VectorUnsignedCharResize START");

            var testingTarget = new VectorUnsignedChar();

            Assert.IsNotNull(testingTarget, "Can't create success object VectorUnsignedChar.");
            Assert.IsInstanceOf <VectorUnsignedChar>(testingTarget, "Should return VectorUnsignedChar instance.");

            try
            {
                testingTarget.PushBack(255);
                /** 1 parameter : uint count */
                testingTarget.Resize(1);
                /** 2 parameters : uint count, byte item */
                testingTarget.Resize(1, 111);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"VectorUnsignedCharResize END (OK)");
        }
コード例 #6
0
 public VectorUnsignedChar(VectorUnsignedChar vector) : this(Interop.VectorUnsignedChar.NewVectorUnsignedChar(VectorUnsignedChar.getCPtr(vector)), true)
 {
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #7
0
 public VectorUnsignedChar(VectorUnsignedChar other) : this(otapiPINVOKE.new_VectorUnsignedChar__SWIG_1(VectorUnsignedChar.getCPtr(other)), true)
 {
     if (otapiPINVOKE.SWIGPendingException.Pending)
     {
         throw otapiPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #8
0
 public void Swap(VectorUnsignedChar vector)
 {
     Interop.VectorUnsignedChar.Swap(SwigCPtr, VectorUnsignedChar.getCPtr(vector));
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #9
0
 public void SetRange(int index, VectorUnsignedChar values)
 {
     otapiPINVOKE.VectorUnsignedChar_SetRange(swigCPtr, index, VectorUnsignedChar.getCPtr(values));
     if (otapiPINVOKE.SWIGPendingException.Pending)
     {
         throw otapiPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #10
0
        public VectorUnsignedChar Assign(VectorUnsignedChar vector)
        {
            VectorUnsignedChar ret = new VectorUnsignedChar(Interop.VectorUnsignedChar.Assign(SwigCPtr, VectorUnsignedChar.getCPtr(vector)), false);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #11
0
        public void VectorUnsignedCharContructor()
        {
            tlog.Debug(tag, $"VectorUnsignedCharContructor START");

            var testingTarget = new VectorUnsignedChar();
            Assert.IsNotNull(testingTarget, "Can't create success object VectorUnsignedChar.");
            Assert.IsInstanceOf<VectorUnsignedChar>(testingTarget, "Should return VectorUnsignedChar instance.");

            testingTarget.Dispose();
            tlog.Debug(tag, $"VectorUnsignedCharContructor END (OK)");
        }
コード例 #12
0
        public static VectorUnsignedChar Repeat(byte value, int count)
        {
            global::System.IntPtr cPtr = otapiPINVOKE.VectorUnsignedChar_Repeat(value, count);
            VectorUnsignedChar    ret  = (cPtr == global::System.IntPtr.Zero) ? null : new VectorUnsignedChar(cPtr, true);

            if (otapiPINVOKE.SWIGPendingException.Pending)
            {
                throw otapiPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #13
0
        public VectorUnsignedChar GetRange(int index, int count)
        {
            global::System.IntPtr cPtr = otapiPINVOKE.VectorUnsignedChar_GetRange(swigCPtr, index, count);
            VectorUnsignedChar    ret  = (cPtr == global::System.IntPtr.Zero) ? null : new VectorUnsignedChar(cPtr, true);

            if (otapiPINVOKE.SWIGPendingException.Pending)
            {
                throw otapiPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #14
0
        public void VectorUnsignedCharAssign()
        {
            tlog.Debug(tag, $"VectorUnsignedCharAssign START");

            using (VectorUnsignedChar vector = new VectorUnsignedChar())
            {
                var testingTarget = vector.Assign(vector);
                Assert.IsNotNull(testingTarget, "Can't create success object VectorUnsignedChar.");
                Assert.IsInstanceOf <VectorUnsignedChar>(testingTarget, "Should return VectorUnsignedChar instance.");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"VectorUnsignedCharAssign END (OK)");
        }
コード例 #15
0
        public void VectorUnsignedCharEnd()
        {
            tlog.Debug(tag, $"VectorUnsignedCharEnd START");

            var testingTarget = new VectorUnsignedChar();
            Assert.IsNotNull(testingTarget, "Can't create success object VectorUnsignedChar.");
            Assert.IsInstanceOf<VectorUnsignedChar>(testingTarget, "Should return VectorUnsignedChar instance.");

            try
            {
                testingTarget.End();
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"VectorUnsignedCharEnd END (OK)");
        }
コード例 #16
0
        public void VectorUnsignedCharPushBack()
        {
            tlog.Debug(tag, $"VectorUnsignedCharPushBack START");

            var testingTarget = new VectorUnsignedChar();
            Assert.IsNotNull(testingTarget, "Can't create success object VectorUnsignedChar.");
            Assert.IsInstanceOf<VectorUnsignedChar>(testingTarget, "Should return VectorUnsignedChar instance.");

            try
            {
                testingTarget.PushBack(255);
                var result = testingTarget.ValueOfIndex(0);
                tlog.Debug(tag, "ValueOfIndex(0) : " + result);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"VectorUnsignedCharPushBack END (OK)");
        }
コード例 #17
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorUnsignedChar obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr);
 }