/* * Copyright(c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System; using System.ComponentModel; using System.Collections.Generic; using Tizen.NUI.Binding; namespace Tizen.NUI { internal class Property : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; internal Property(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(Property obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } //A Flag to check who called Dispose(). (By User or DisposeQueue) private bool isDisposeQueued = false; /// /// 3 /// A Flat to check if it is already disposed. /// protected bool disposed = false; ~Property() { if(!isDisposeQueued) { isDisposeQueued = true; DisposeQueue.Instance.Add(this); } } public void Dispose() { //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); } if (isDisposeQueued) { Dispose(DisposeTypes.Implicit); } else { Dispose(DisposeTypes.Explicit); System.GC.SuppressFinalize(this); } } protected virtual void Dispose(DisposeTypes type) { if (disposed) { return; } if(type == DisposeTypes.Explicit) { //Called by User //Release your own managed resources here. //You should release all of your own disposable objects here. } //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicPINVOKE.delete_Property(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } disposed = true; } internal static int INVALID_INDEX { get { int ret = NDalicPINVOKE.Property_INVALID_INDEX_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } internal static int INVALID_KEY { get { int ret = NDalicPINVOKE.Property_INVALID_KEY_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } internal static int INVALID_COMPONENT_INDEX { get { int ret = NDalicPINVOKE.Property_INVALID_COMPONENT_INDEX_get(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// This constructor creates a property instance. /// /// A valid handle to the target object. /// The index of a property. /// 3 public Property(Animatable arg0, int propertyIndex) : this(NDalicPINVOKE.new_Property__SWIG_0(Animatable.getCPtr(arg0), propertyIndex), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// This constructor creates a property instance. /// /// A valid handle to the target object. /// The index of a property. /// Index to a sub component of a property, for use with Vector2, Vector3 and Vector4. -1 for the main property (default is -1). /// 3 public Property(Animatable arg0, int propertyIndex, int componentIndex) : this(NDalicPINVOKE.new_Property__SWIG_1(Animatable.getCPtr(arg0), propertyIndex, componentIndex), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// This constructor creates a property instance.
/// This performs a property index query and is therefore slower than constructing a property directly with the index.
///
/// A valid handle to the target object. /// The property name. /// 3 public Property(Animatable arg0, string propertyName) : this(NDalicPINVOKE.new_Property__SWIG_2(Animatable.getCPtr(arg0), propertyName), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// This constructor creates a property instance.
/// This performs a property index query and is therefore slower than constructing a property directly with the index.
///
/// A valid handle to the target object. /// The property name. /// Index to a sub component of a property, for use with Vector2, Vector3 and Vector4. -1 for main property (default is -1). /// 3 public Property(Animatable arg0, string propertyName, int componentIndex) : this(NDalicPINVOKE.new_Property__SWIG_3(Animatable.getCPtr(arg0), propertyName, componentIndex), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal Animatable _object { set { NDalicPINVOKE.Property__object_set(swigCPtr, Animatable.getCPtr(value)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { Animatable ret = new Animatable(NDalicPINVOKE.Property__object_get(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// Gets or sets the index of the property. /// /// 3 public int propertyIndex { set { NDalicPINVOKE.Property_propertyIndex_set(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { int ret = NDalicPINVOKE.Property_propertyIndex_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// Gets or sets the component index of the property. /// /// 3 public int componentIndex { set { NDalicPINVOKE.Property_componentIndex_set(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { int ret = NDalicPINVOKE.Property_componentIndex_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } } /// /// An array of property values. /// /// 3 public class PropertyArray : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; internal PropertyArray(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(PropertyArray obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } //A Flag to check who called Dispose(). (By User or DisposeQueue) private bool isDisposeQueued = false; /// /// A Flat to check if it is already disposed. /// /// 3 protected bool disposed = false; /// /// Dispose. /// /// 3 ~PropertyArray() { if(!isDisposeQueued) { isDisposeQueued = true; DisposeQueue.Instance.Add(this); } } /// /// Dispose. /// /// 3 public void Dispose() { //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); } if (isDisposeQueued) { Dispose(DisposeTypes.Implicit); } else { Dispose(DisposeTypes.Explicit); System.GC.SuppressFinalize(this); } } /// /// Dispose. /// /// 3 protected virtual void Dispose(DisposeTypes type) { if (disposed) { return; } if(type == DisposeTypes.Explicit) { //Called by User //Release your own managed resources here. //You should release all of your own disposable objects here. } //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicPINVOKE.delete_Property_Array(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } disposed = true; } /// /// The operator to access an element. /// /// The element index to access. No bounds checking is performed. /// The reference to the element. /// 3 public PropertyValue this[uint index] { get { return ValueOfIndex(index); } } /// /// The constructor. /// /// 3 public PropertyArray() : this(NDalicPINVOKE.new_Property_Array__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal PropertyArray(PropertyArray other) : this(NDalicPINVOKE.new_Property_Array__SWIG_1(PropertyArray.getCPtr(other)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Retrieves the number of elements in the array. /// /// The number of elements in the array. /// 3 public uint Size() { uint ret = NDalicPINVOKE.Property_Array_Size(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves the number of elements in the array. /// /// The number of elements in the array. /// 3 public uint Count() { uint ret = NDalicPINVOKE.Property_Array_Count(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Returns whether the array is empty. /// /// Returns true if empty, false otherwise. /// 3 public bool Empty() { bool ret = NDalicPINVOKE.Property_Array_Empty(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Clears the array. /// /// 3 public void Clear() { NDalicPINVOKE.Property_Array_Clear(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Increases the capacity of the array. /// /// The size to reserve. /// 3 public void Reserve(uint size) { NDalicPINVOKE.Property_Array_Reserve(swigCPtr, size); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Resizes to size. /// /// The size to resize /// 3 public void Resize(uint size) { NDalicPINVOKE.Property_Array_Resize(swigCPtr, size); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Retrieves the capacity of the array. /// /// The allocated capacity of the array. /// 3 public uint Capacity() { uint ret = NDalicPINVOKE.Property_Array_Capacity(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Adds an element to the array. /// /// The value to add at the end of the array. /// 3 public void PushBack(PropertyValue value) { NDalicPINVOKE.Property_Array_PushBack(swigCPtr, PropertyValue.getCPtr(value)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Adds an keyvalue to the array. /// This function should be first /// /// The value to add at the end of the array. public PropertyArray Add(KeyValue value) { PropertyArray ret = new PropertyArray(NDalicPINVOKE.Property_Array_Add(swigCPtr, PropertyValue.getCPtr(value.TrueValue)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Adds an element to the array. /// /// The value to add at the end of the array. /// 3 public PropertyArray Add(PropertyValue value) { PropertyArray ret = new PropertyArray(NDalicPINVOKE.Property_Array_Add(swigCPtr, PropertyValue.getCPtr(value)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Accesses an element. /// /// The element index to access. No bounds checking is performed. /// The reference to the element. /// 3 public PropertyValue GetElementAt(uint index) { PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Array_GetElementAt__SWIG_0(swigCPtr, index), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves the value of elements in the array. /// /// The element index to retrieve. /// The reference to the element. private PropertyValue ValueOfIndex(uint index) { PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Array_ValueOfIndex__SWIG_0(swigCPtr, index), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// A key type which can be either a std::string or a Property::Index. /// /// 3 public class PropertyKey : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; internal PropertyKey(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(PropertyKey obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } //A Flag to check who called Dispose(). (By User or DisposeQueue) private bool isDisposeQueued = false; /// /// A Flat to check if it is already disposed. /// /// 3 protected bool disposed = false; /// /// Dispose. /// /// 3 ~PropertyKey() { if(!isDisposeQueued) { isDisposeQueued = true; DisposeQueue.Instance.Add(this); } } /// /// Dispose. /// /// 3 public void Dispose() { //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); } if (isDisposeQueued) { Dispose(DisposeTypes.Implicit); } else { Dispose(DisposeTypes.Explicit); System.GC.SuppressFinalize(this); } } /// /// Dispose. /// /// 3 protected virtual void Dispose(DisposeTypes type) { if (disposed) { return; } if(type == DisposeTypes.Explicit) { //Called by User //Release your own managed resources here. //You should release all of your own disposable objects here. } //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicPINVOKE.delete_Property_Key(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } disposed = true; } /// /// The type of the key. /// /// 3 public PropertyKey.KeyType Type { set { NDalicPINVOKE.Property_Key_type_set(swigCPtr, (int)value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { PropertyKey.KeyType ret = (PropertyKey.KeyType)NDalicPINVOKE.Property_Key_type_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// The index key. /// /// 3 public int IndexKey { set { NDalicPINVOKE.Property_Key_indexKey_set(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { int ret = NDalicPINVOKE.Property_Key_indexKey_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// The string key. /// /// 3 public string StringKey { set { NDalicPINVOKE.Property_Key_stringKey_set(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { string ret = NDalicPINVOKE.Property_Key_stringKey_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// The constructor. /// /// The string key. /// 3 public PropertyKey(string key) : this(NDalicPINVOKE.new_Property_Key__SWIG_0(key), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// The constructor. /// /// The index key. /// 3 public PropertyKey(int key) : this(NDalicPINVOKE.new_Property_Key__SWIG_1(key), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Compares if rhs is equal to. /// /// A string key to compare against. /// Returns true if the key compares, or false if it isn't equal or of the wrong type. /// 3 public bool EqualTo(string rhs) { bool ret = NDalicPINVOKE.Property_Key_EqualTo__SWIG_0(swigCPtr, rhs); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Compares if rhs is equal to. /// /// The index key to compare against. /// Returns true if the key compares, or false if it isn't equal or of the wrong type. /// 3 public bool EqualTo(int rhs) { bool ret = NDalicPINVOKE.Property_Key_EqualTo__SWIG_1(swigCPtr, rhs); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Compares if rhs is equal to /// /// A key to compare against /// Returns true if the keys are of the same type and have the same value. /// 3 public bool EqualTo(PropertyKey rhs) { bool ret = NDalicPINVOKE.Property_Key_EqualTo__SWIG_2(swigCPtr, PropertyKey.getCPtr(rhs)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Compares if rhs is not equal to. /// /// The index key to compare against. /// Returns true if the key is not equal or not a string key. /// 3 public bool NotEqualTo(string rhs) { bool ret = NDalicPINVOKE.Property_Key_NotEqualTo__SWIG_0(swigCPtr, rhs); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Compares if rhs is not equal to. /// /// The index key to compare against. /// Returns true if the key is not equal, or not the index key. /// 3 public bool NotEqualTo(int rhs) { bool ret = NDalicPINVOKE.Property_Key_NotEqualTo__SWIG_1(swigCPtr, rhs); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Compares if rhs is not equal to. /// /// A key to compare against. /// Returns true if the keys are not of the same type or are not equal. /// 3 public bool NotEqualTo(PropertyKey rhs) { bool ret = NDalicPINVOKE.Property_Key_NotEqualTo__SWIG_2(swigCPtr, PropertyKey.getCPtr(rhs)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// The type of key. /// /// 3 public enum KeyType { /// /// The type of key is index. /// /// 3 Index, /// /// The type of key is string. /// /// 3 String } } /// /// A map of property values, the key type could be string or Property::Index. /// /// 3 public class PropertyMap : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; internal PropertyMap(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(PropertyMap obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } //A Flag to check who called Dispose(). (By User or DisposeQueue) private bool isDisposeQueued = false; /// /// A Flat to check if it is already disposed. /// /// 3 protected bool disposed = false; /// /// Dispose. /// /// 3 ~PropertyMap() { if(!isDisposeQueued) { isDisposeQueued = true; DisposeQueue.Instance.Add(this); } } /// /// Dispose. /// /// 3 public void Dispose() { //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); } if (isDisposeQueued) { Dispose(DisposeTypes.Implicit); } else { Dispose(DisposeTypes.Explicit); System.GC.SuppressFinalize(this); } } /// /// Dispose. /// /// 3 protected virtual void Dispose(DisposeTypes type) { if (disposed) { return; } if(type == DisposeTypes.Explicit) { //Called by User //Release your own managed resources here. //You should release all of your own disposable objects here. } //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicPINVOKE.delete_Property_Map(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } disposed = true; } /// /// The operator to access the element with the specified string key.
/// If an element with the key does not exist, then it is created.
///
/// The key whose value to access. /// A value for the element with the specified key. /// 3 public PropertyValue this[string key] { get { return ValueOfIndex(key); } } /// /// The operator to access the element with the specified index key.
/// If an element with the key does not exist, then it is created.
///
/// The key whose value to access. /// A value for the element with the specified key. /// 3 public PropertyValue this[int key] { get { return ValueOfIndex(key); } } /// /// The constructor. /// /// 3 public PropertyMap() : this(NDalicPINVOKE.new_Property_Map__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// The copy constructor. /// /// The map to copy from. /// 3 public PropertyMap(PropertyMap other) : this(NDalicPINVOKE.new_Property_Map__SWIG_1(PropertyMap.getCPtr(other)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Retrieves the number of elements in the map. /// /// The number of elements in the map. /// 3 public uint Count() { uint ret = NDalicPINVOKE.Property_Map_Count(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Returns whether the map is empty. /// /// Returns true if empty, false otherwise. /// 3 public bool Empty() { bool ret = NDalicPINVOKE.Property_Map_Empty(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Inserts the key-value pair in the map, with the key type as string.
/// Does not check for duplicates.
///
/// The key to insert. /// The value to insert. /// 3 public void Insert(string key, PropertyValue value) { NDalicPINVOKE.Property_Map_Insert__SWIG_0(swigCPtr, key, PropertyValue.getCPtr(value)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Inserts the key-value pair in the map, with the key type as index.
/// Does not check for duplicates.
///
/// The key to insert. /// The value to insert. /// 3 public void Insert(int key, PropertyValue value) { NDalicPINVOKE.Property_Map_Insert__SWIG_2(swigCPtr, key, PropertyValue.getCPtr(value)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Inserts the key-value pair in the map, with the key type as string.
/// Does not check for duplicates.
///
/// The key to insert. /// The value to insert. /// Returns a reference to this object. /// 3 public PropertyMap Add(string key, PropertyValue value) { PropertyMap ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_0(swigCPtr, key, PropertyValue.getCPtr(value)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Inserts the key-value pair in the map, with the key type as string.
/// Does not check for duplicates.
///
/// The key to insert. /// The value to insert. /// Returns a reference to this object. /// 3 public PropertyMap Add(int key, PropertyValue value) { PropertyMap ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_2(swigCPtr, key, PropertyValue.getCPtr(value)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Inserts the keyvalue to the map.
/// Does not check for duplicates.
///
/// The keyvalue to insert. /// Returns a reference to this object. public PropertyMap Add(KeyValue keyValue) { PropertyMap ret = new PropertyMap(); if ( keyValue.KeyInt != null ) { ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_2(swigCPtr, (int)keyValue.KeyInt, PropertyValue.getCPtr(keyValue.TrueValue)), false); } else if ( keyValue.KeyString != null) { ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_0(swigCPtr, keyValue.KeyString, PropertyValue.getCPtr(keyValue.TrueValue)), false); } if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves the value at the specified position. /// /// The specified position. /// A reference to the value at the specified position. /// 3 public PropertyValue GetValue(uint position) { PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Map_GetValue(swigCPtr, position), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves the key at the specified position. /// /// The specified position. /// A copy of the key at the specified position. /// 3 public PropertyKey GetKeyAt(uint position) { PropertyKey ret = new PropertyKey(NDalicPINVOKE.Property_Map_GetKeyAt(swigCPtr, position), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Finds the value for the specified key if it exists. /// /// The key to find. /// The value if it exists, an empty object otherwise. /// 3 public PropertyValue Find(int key) { global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_2(swigCPtr, key); PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Finds the value for the specified keys if either exist. /// /// The index key to find. /// The string key to find. /// The value if it exists, an empty object otherwise. /// 3 public PropertyValue Find(int indexKey, string stringKey) { global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_3(swigCPtr, indexKey, stringKey); PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Clears the map. /// /// 3 public void Clear() { NDalicPINVOKE.Property_Map_Clear(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Merges values from the map 'from' to the current.
/// Any values in 'from' will overwrite the values in the current map.
///
/// The map to merge from. /// 3 public void Merge(PropertyMap from) { NDalicPINVOKE.Property_Map_Merge(swigCPtr, PropertyMap.getCPtr(from)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Retrieves the element with the specified string key. /// /// The key whose value to retrieve. /// The value for the element with the specified key. internal PropertyValue ValueOfIndex(string key) { PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Map_ValueOfIndex__SWIG_0(swigCPtr, key), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves the element with the specified index key. /// /// The key whose value to retrieve. /// The value for the element with the specified key. internal PropertyValue ValueOfIndex(int key) { PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Map_ValueOfIndex__SWIG_2(swigCPtr, key), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// A value-type representing a property value. /// /// 3 public class PropertyValue : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; internal PropertyValue(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(PropertyValue obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } //A Flag to check who called Dispose(). (By User or DisposeQueue) private bool isDisposeQueued = false; /// /// A Flat to check if it is already disposed. /// /// 3 protected bool disposed = false; /// /// Dispose. /// /// 3 ~PropertyValue() { if(!isDisposeQueued) { isDisposeQueued = true; DisposeQueue.Instance.Add(this); } } /// /// Dispose. /// /// 3 public void Dispose() { //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); } if (isDisposeQueued) { Dispose(DisposeTypes.Implicit); } else { Dispose(DisposeTypes.Explicit); System.GC.SuppressFinalize(this); } } /// /// Dispose. /// /// 3 protected virtual void Dispose(DisposeTypes type) { if (disposed) { return; } if(type == DisposeTypes.Explicit) { //Called by User //Release your own managed resources here. //You should release all of your own disposable objects here. } //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicPINVOKE.delete_Property_Value(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } disposed = true; } /// /// An extension to the property value class that allows us to create a /// Property value from a C# object, for example, integer, float, or string.
///
/// An object to create. /// The created value. /// 3 static public PropertyValue CreateFromObject(System.Object obj) { System.Type type = obj.GetType(); PropertyValue value; if (type.IsEnum) { value = new PropertyValue((int)obj);//Enum.Parse(type, str); } else if (type.Equals(typeof(int))) { value = new PropertyValue((int)obj); } else if (type.Equals(typeof(System.Int32))) { value = new PropertyValue((int)obj); } else if (type.Equals(typeof(bool))) { value = new PropertyValue((bool)obj); } else if (type.Equals(typeof(float))) { value = new PropertyValue((float)obj); } else if (type.Equals(typeof(string))) { value = new PropertyValue((string)obj); } else if (type.Equals(typeof(Vector2))) { value = new PropertyValue((Vector2)obj); } else if (type.Equals(typeof(Vector3))) { value = new PropertyValue((Vector3)obj); } else if (type.Equals(typeof(Vector4))) { value = new PropertyValue((Vector4)obj); } else if (type.Equals(typeof(Position))) { value = new PropertyValue((Position)obj); } else if (type.Equals(typeof(Position2D))) { value = new PropertyValue((Position2D)obj); } else if (type.Equals(typeof(Size))) { value = new PropertyValue((Size)obj); } else if (type.Equals(typeof(Size2D))) { value = new PropertyValue((Size2D)obj); } else if (type.Equals(typeof(Color))) { value = new PropertyValue((Color)obj); } else if (type.Equals(typeof(Rotation))) { value = new PropertyValue((Rotation)obj); } else if (type.Equals(typeof(RelativeVector2))) { value = new PropertyValue((RelativeVector2)obj); } else if (type.Equals(typeof(RelativeVector3))) { value = new PropertyValue((RelativeVector3)obj); } else if (type.Equals(typeof(RelativeVector4))) { value = new PropertyValue((RelativeVector4)obj); } else if(type.Equals(typeof(Extents))) { value = new PropertyValue((Extents)obj); } else { throw new global::System.InvalidOperationException("Unimplemented type for Property Value :" + type.Name); } //NUILog.Debug(" got an property value of =" + type.Name); return value; } /// /// Creates a Size2D property value. /// /// Size2D values. /// 3 public PropertyValue(Size2D vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Size2D.getCPtr(vectorValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a Position2D property value. /// /// Position2D values. /// 3 public PropertyValue(Position2D vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Position2D.getCPtr(vectorValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a Size property value. /// /// Size values. internal PropertyValue(Size vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Size.getCPtr(vectorValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a Position property value. /// /// Position values. /// 3 public PropertyValue(Position vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Position.getCPtr(vectorValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a Color property value. /// /// Color values. /// 3 public PropertyValue(Color vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_6(Color.getCPtr(vectorValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Retrieves a Size2D value. /// /// On return, a Size2D value. /// 3 public bool Get(Size2D vectorValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Size2D.getCPtr(vectorValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a Position2D value. /// /// On return, a Position2D value. /// 3 public bool Get(Position2D vectorValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Position2D.getCPtr(vectorValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a Size value. /// /// On return, a size value. internal bool Get(Size vectorValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Size.getCPtr(vectorValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a Position value. /// /// On return, a position value. /// 3 public bool Get(Position vectorValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Position.getCPtr(vectorValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a Color value. /// /// On return, a color value. /// 3 public bool Get(Color vectorValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_7(swigCPtr, Color.getCPtr(vectorValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// The default constructor. /// /// 3 public PropertyValue() : this(NDalicPINVOKE.new_Property_Value__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a boolean property value. /// /// A boolean value. /// 3 public PropertyValue(bool boolValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_1(boolValue), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates an integer property value. /// /// An integer value. /// 3 public PropertyValue(int integerValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_2(integerValue), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a float property value. /// /// A floating-point value. /// 3 public PropertyValue(float floatValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_3(floatValue), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a Vector2 property value. /// /// A vector of 2 floating-point values. /// 3 public PropertyValue(Vector2 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Vector2.getCPtr(vectorValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a Vector3 property value. /// /// A vector of 3 floating-point values. /// 3 public PropertyValue(Vector3 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Vector3.getCPtr(vectorValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a Vector4 property value. /// /// A vector of 4 floating-point values. /// 3 public PropertyValue(Vector4 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_6(Vector4.getCPtr(vectorValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal PropertyValue(Matrix3 matrixValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_7(Matrix3.getCPtr(matrixValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal PropertyValue(Matrix matrixValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_8(Matrix.getCPtr(matrixValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a Rectangle property value. /// /// Rectangle values. /// 3 public PropertyValue(Rectangle vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_9(Rectangle.getCPtr(vectorValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal PropertyValue(AngleAxis angleAxis) : this(NDalicPINVOKE.new_Property_Value__SWIG_10(AngleAxis.getCPtr(angleAxis)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a Rotation property value. /// /// Rotation values. /// 3 public PropertyValue(Rotation quaternion) : this(NDalicPINVOKE.new_Property_Value__SWIG_11(Rotation.getCPtr(quaternion)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a string property value. /// /// A string. /// 3 public PropertyValue(string stringValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_12(stringValue), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates an array property value. /// /// An array. /// 3 public PropertyValue(PropertyArray arrayValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_14(PropertyArray.getCPtr(arrayValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a map property value. /// /// An array. /// 3 public PropertyValue(PropertyMap mapValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_15(PropertyMap.getCPtr(mapValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a Extents value. /// /// A Extents value. /// 4 public PropertyValue(Extents extentsValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_16(Extents.getCPtr(extentsValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a PropertyType value. /// /// A PropertyType value. /// 3 public PropertyValue(PropertyType type) : this(NDalicPINVOKE.new_Property_Value__SWIG_17((int)type), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Creates a PropertyValue value. /// /// A PropertyValue value. /// 3 public PropertyValue(PropertyValue value) : this(NDalicPINVOKE.new_Property_Value__SWIG_18(PropertyValue.getCPtr(value)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// Queries the type of this property value. /// /// The type ID /// 3 public new PropertyType GetType() { PropertyType ret = (PropertyType)NDalicPINVOKE.Property_Value_GetType(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a boolean value. /// /// On return, a boolean value. /// Returns true if the value is successfully retrieved, false if the type is not convertible. /// 3 public bool Get(out bool boolValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_1(swigCPtr, out boolValue); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a floating-point value. /// /// On return, a floating-point value. /// Returns true if the value is successfully retrieved, false if the type is not convertible. /// 3 public bool Get(out float floatValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_2(swigCPtr, out floatValue); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves an integer value. /// /// On return, an integer value. /// Returns true if the value is successfully retrieved, false if the type is not convertible. /// 3 public bool Get(out int integerValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_3(swigCPtr, out integerValue); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves an integer rectangle. /// /// On return, an integer rectangle. /// Returns true if the value is successfully retrieved, false if the type is not convertible. /// 3 public bool Get(Rectangle rect) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_4(swigCPtr, Rectangle.getCPtr(rect)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a vector value. /// /// On return, a vector value. /// Returns true if the value is successfully retrieved, false if the type is not convertible. /// 3 public bool Get(Vector2 vectorValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Vector2.getCPtr(vectorValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a vector value. /// /// On return, a vector value. /// Returns true if the value is successfully retrieved, false if the type is not convertible. /// 3 public bool Get(Vector3 vectorValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Vector3.getCPtr(vectorValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a vector value. /// /// On return, a vector value. /// Returns true if the value is successfully retrieved, false if the type is not convertible. /// 3 public bool Get(Vector4 vectorValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_7(swigCPtr, Vector4.getCPtr(vectorValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } internal bool Get(Matrix3 matrixValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_8(swigCPtr, Matrix3.getCPtr(matrixValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } internal bool Get(Matrix matrixValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_9(swigCPtr, Matrix.getCPtr(matrixValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } internal bool Get(AngleAxis angleAxisValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_10(swigCPtr, AngleAxis.getCPtr(angleAxisValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a Rotation value. /// /// On return, a rotation value. /// Returns true if the value is successfully retrieved, false if the type is not convertible. /// 3 public bool Get(Rotation quaternionValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_11(swigCPtr, Rotation.getCPtr(quaternionValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a string property value. /// /// On return, a string. /// Returns true if the value is successfully retrieved, false if the type is not convertible. /// 3 public bool Get(out string stringValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_12(swigCPtr, out stringValue); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves an array property value. /// /// On return, the array as a vector property values. /// Returns true if the value is successfully retrieved, false if the type is not convertible. /// 3 public bool Get(PropertyArray arrayValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_13(swigCPtr, PropertyArray.getCPtr(arrayValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a map property value. /// /// On return, the map as vector of string and property value pairs. /// Returns true if the value is successfully retrieved, false if the type is not convertible. /// 3 public bool Get(PropertyMap mapValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_14(swigCPtr, PropertyMap.getCPtr(mapValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Retrieves a Extents value. /// /// On return, a extents. /// Returns true if the value is successfully retrieved, false if the type is not convertible. /// 4 public bool Get(Extents extentsValue) { bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_15(swigCPtr, Extents.getCPtr(extentsValue)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } /// /// KeyValue class. /// public class KeyValue { private string _key = null; private object _originalValue = null; private object _originalKey = null; /// /// Int key. /// public int? KeyInt = null; /// /// String key. /// public string KeyString = null; /// /// True value. /// public PropertyValue TrueValue = null; /// /// Default Constructor. /// public KeyValue() {} /// /// Key property. /// public string Key { get { return _key; } set { _key = value; ParseKey(value); } } /// /// OriginalKey property. /// public object OriginalKey { get { return _originalKey; } set { _originalKey = value; if (value is int || value is Int32) { KeyInt = (int)value; } if (value is string) { KeyString = value.ToString(); } if (value.GetType().Equals(typeof(int)) || value.GetType().Equals(typeof(Int32))) { KeyInt = (int)value; } else if (value.GetType().Equals(typeof(string))) { KeyString = value.ToString(); } KeyInt = (int)value; } } /// /// Value property. /// public object Value { get { return _originalValue; } set { _originalValue = value; TrueValue = PropertyValue.CreateFromObject(value); } } /// /// IntergerValue property. /// public int IntergerValue { set { TrueValue = new PropertyValue(value); } } /// /// BooleanValue property. /// public bool BooleanValue { set { TrueValue = new PropertyValue(value); } } /// /// SingleValue property. /// public float SingleValue { set { TrueValue = new PropertyValue(value); } } /// /// StringValue property. /// public string StringValue { set { TrueValue = new PropertyValue(value); } } /// /// Vector2Value property. /// public Vector2 Vector2Value { set { TrueValue = new PropertyValue(value); } } /// /// Vector3Value property. /// public Vector3 Vector3Value { set { TrueValue = new PropertyValue(value); } } /// /// Vector4Value property. /// public Vector4 Vector4Value { set { TrueValue = new PropertyValue(value); } } /// /// PositionValue property. /// public Position PositionValue { set { TrueValue = new PropertyValue(value); } } /// /// Position2DValue property. /// public Position2D Position2DValue { set { TrueValue = new PropertyValue(value); } } /// /// SizeValue property. /// public Size SizeValue { set { TrueValue = new PropertyValue(value); } } /// /// Size2DValue property. /// public Size2D Size2DValue { set { TrueValue = new PropertyValue(value); } } /// /// ColorValue property. /// public Color ColorValue { set { TrueValue = new PropertyValue(value); } } /// /// RectangleValue property. /// public Rectangle RectangleValue { set { TrueValue = new PropertyValue(value); } } /// /// RotationValue property. /// public Rotation RotationValue { set { TrueValue = new PropertyValue(value); } } /// /// RelativeVector2Value property. /// public RelativeVector2 RelativeVector2Value { set { TrueValue = new PropertyValue(value); } } /// /// RelativeVector3Value property. /// public RelativeVector3 RelativeVector3Value { set { TrueValue = new PropertyValue(value); } } /// /// RelativeVector4Value property. /// public RelativeVector4 RelativeVector4Value { set { TrueValue = new PropertyValue(value); } } /// /// ExtentsValue property. /// public Extents ExtentsValue { set { TrueValue = new PropertyValue(value); } } /// /// PropertyArrayValue property. /// public PropertyArray PropertyArrayValue { set { TrueValue = new PropertyValue(value); } } /// /// PropertyMapValue property. /// public PropertyMap PropertyMapValue { set { TrueValue = new PropertyValue(value); } } private void ParseKey(string key) { int v = -1; if (VisualExtension.KeyDictionary.ContainsKey(key)) { VisualExtension.KeyDictionary.TryGetValue(key, out v); KeyInt = v; } else { KeyString = Key; } } } }