diff --git a/src/bindings/mono/eina_mono/eina_value.cs b/src/bindings/mono/eina_mono/eina_value.cs
index d3791bd4f3..f2e4c17ec0 100644
--- a/src/bindings/mono/eina_mono/eina_value.cs
+++ b/src/bindings/mono/eina_mono/eina_value.cs
@@ -25,6 +25,7 @@ namespace EinaNative
// Structs to be passed from/to C when dealing with containers and
// optional values.
[StructLayout(LayoutKind.Sequential)]
+[EditorBrowsable(EditorBrowsableState.Never)]
struct Value_Array
{
public IntPtr subtype;
@@ -33,6 +34,7 @@ struct Value_Array
}
[StructLayout(LayoutKind.Sequential)]
+[EditorBrowsable(EditorBrowsableState.Never)]
struct Value_List
{
public IntPtr subtype;
@@ -40,6 +42,7 @@ struct Value_List
}
[SuppressUnmanagedCodeSecurityAttribute]
+[EditorBrowsable(EditorBrowsableState.Never)]
static internal class UnsafeNativeMethods
{
[DllImport(efl.Libs.Eina)]
@@ -538,9 +541,12 @@ static internal class UnsafeNativeMethods
/// Struct for passing Values by value to Unmanaged functions.
///
-/// Since EFL 1.23.
+/// Used internally by the marshalling code.
+///
+/// Since EFL 1.23.
///
[StructLayout(LayoutKind.Sequential)]
+[EditorBrowsable(EditorBrowsableState.Never)]
public struct ValueNative
{
public IntPtr Type;
@@ -554,27 +560,48 @@ public struct ValueNative
/// Exception for failures when setting an container item.
///
-/// Since EFL 1.23.
+/// Since EFL 1.23.
///
[Serializable]
public class SetItemFailedException : Exception
{
- /// Default constructor.
+ ///
+ /// Default constructor.
+ ///
+ /// Since EFL 1.23.
+ ///
public SetItemFailedException() : base()
{
}
- /// Most commonly used contructor.
+ ///
+ /// Most commonly used contructor. Allows setting a custom message.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The message of the exception.
public SetItemFailedException(string msg) : base(msg)
{
}
- /// Wraps an inner exception.
+ ///
+ /// Wraps an inner exception.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The message of the exception.
+ /// The exception to be wrapped.
public SetItemFailedException(string msg, Exception inner) : base(msg, inner)
{
}
- /// Serializable constructor.
+ ///
+ /// Serializable constructor.
+ ///
+ /// Since EFL 1.23.
+ /// Serialized object data about the exception.
+ /// Contextual information about the source or destination.
+ ///
protected SetItemFailedException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
@@ -582,27 +609,48 @@ public class SetItemFailedException : Exception
/// Exception for methods that must have been called on a container.
///
-/// Since EFL 1.23.
+/// Since EFL 1.23.
///
[Serializable]
public class InvalidValueTypeException: Exception
{
- /// Default constructor.
+ ///
+ /// Default constructor.
+ ///
+ /// Since EFL 1.23.
+ ///
public InvalidValueTypeException() : base()
{
}
- /// Most commonly used contructor.
+ ///
+ /// Most commonly used contructor. Allows setting a custom message.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The message of the exception.
public InvalidValueTypeException(string msg) : base(msg)
{
}
- /// Wraps an inner exception.
+ ///
+ /// Wraps an inner exception.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The message of the exception.
+ /// The exception to be wrapped.
public InvalidValueTypeException(string msg, Exception inner) : base(msg, inner)
{
}
- /// Serializable constructor.
+ ///
+ /// Serializable constructor.
+ ///
+ /// Since EFL 1.23.
+ /// Serialized object data about the exception.
+ /// Contextual information about the source or destination.
+ ///
protected InvalidValueTypeException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
@@ -611,53 +659,103 @@ public class InvalidValueTypeException: Exception
/// Managed-side Enum to represent Eina_Value_Type constants.
///
-/// Since EFL 1.23.
+/// Since EFL 1.23.
///
public enum ValueType
{
- /// Signed 8 bit integer. Same as 'sbyte'
+ /// Signed 8 bit integer. Same as 'sbyte'.
+ /// Since EFL 1.23.
+ ///
SByte,
- /// Unsigned 8 bit integer. Same as 'byte'
+ /// Unsigned 8 bit integer. Same as 'byte'.
+ /// Since EFL 1.23.
+ ///
Byte,
- /// Signed 16 bit integer. Same as 'short'
+ /// Signed 16 bit integer. Same as 'short'.
+ /// Since EFL 1.23.
+ ///
Short,
- /// Unsigned 16 bit integer. Same as 'ushort'
+ /// Unsigned 16 bit integer. Same as 'ushort'.
+ /// Since EFL 1.23.
+ ///
UShort,
- /// Signed 32 bit integer. Same as 'int'
+ /// Signed 32 bit integer. Same as 'int'.
+ /// Since EFL 1.23.
+ ///
Int32,
- /// Unsigned 32 bit integer. Same as 'uint'
+ /// Unsigned 32 bit integer. Same as 'uint'.
+ /// Since EFL 1.23.
+ ///
UInt32,
- /// Signed long integer. Same as 'long'
+ /// Signed long integer. Same as 'long'.
+ /// Since EFL 1.23.
+ ///
Long,
- /// Unsigned long integer. Same as 'ulong'
+ /// Unsigned long integer. Same as 'ulong'.
+ /// Since EFL 1.23.
+ ///
ULong,
- /// Signed 64 bit integer. Same as 'long'
+ /// Signed 64 bit integer. Same as 'long'.
+ /// Since EFL 1.23.
+ ///
Int64,
- /// Unsigned 64 bit integer. Same as 'ulong'
+ /// Unsigned 64 bit integer. Same as 'ulong'.
+ /// Since EFL 1.23.
+ ///
UInt64,
- /// 4-byte float. Same as 'float'
+ /// 4-byte float. Same as 'float'.
+ /// Since EFL 1.23.
+ ///
Float,
- /// 8-byte double. Same as 'double'
+ /// 8-byte double. Same as 'double'.
+ /// Since EFL 1.23.
+ ///
Double,
- /// Strings
+ /// Strings.
+ /// Since EFL 1.23.
+ ///
String,
- /// Array of Value items.
+ /// Array of Value items.
+ /// Since EFL 1.23.
+ ///
Array,
- /// Linked list of Value items.
+ /// Linked list of Value items.
+ /// Since EFL 1.23.
+ ///
List,
- /// Map of string keys to Value items.
+ /// Map of string keys to Value items.
+ /// Since EFL 1.23.
+ ///
Hash,
- /// Optional (aka empty) values.
+ /// Optional (aka empty) values.
+ /// Since EFL 1.23.
+ ///
Optional,
- /// Error values.
+ /// Error values.
+ /// Since EFL 1.23.
+ ///
Error,
+ /// Eo Object values.
+ /// Since EFL 1.23.
+ ///
Object,
- /// Empty values.
+ /// Empty values.
+ /// Since EFL 1.23.
+ ///
Empty,
}
+/// Extension methods for .
+///
+/// Since EFL 1.23.
+///
static class ValueTypeMethods
{
+ /// Checks if this type is a numeric value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// Whether this type is a numeric one.
public static bool IsNumeric(this ValueType val)
{
switch (val)
@@ -680,6 +778,11 @@ static class ValueTypeMethods
}
}
+ /// Checks if this type is a string value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// Whether this type is a string.
public static bool IsString(this ValueType val)
{
switch (val)
@@ -691,6 +794,11 @@ static class ValueTypeMethods
}
}
+ /// Checks if this type is a container value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// Whether this type is a container.
public static bool IsContainer(this ValueType val)
{
switch (val)
@@ -704,22 +812,41 @@ static class ValueTypeMethods
}
}
+ /// Checks if this type is optional. (i.e. can be empty).
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// Whether this type is optional.
public static bool IsOptional(this ValueType val)
{
return val == ValueType.Optional;
}
+ /// Checks if this type represents an error value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// Whether this type is a error one.
public static bool IsError(this ValueType val)
{
return val == ValueType.Error;
}
+ /// Checks if this type is an .
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// Whether this type is an .
public static bool IsObject(this ValueType val)
{
return val == ValueType.Object;
}
- /// Returns the Marshal.SizeOf for the given ValueType native structure.
+ /// Returns the Marshal.SizeOf for the given ValueType native structure.
+ ///
+ /// Since EFL 1.23.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static int MarshalSizeOf(this ValueType val)
{
switch (val)
@@ -769,7 +896,7 @@ public class ValueTypeBox
}
}
-static class ValueTypeBridge
+internal static class ValueTypeBridge
{
private static Dictionary ManagedToNative = new Dictionary();
private static Dictionary NativeToManaged = new Dictionary();
@@ -947,7 +1074,7 @@ static class ValueTypeBridge
/// blobs and structs. It is able to convert between data types, including
/// to and from strings.
///
-/// Since EFL 1.23.
+/// Since EFL 1.23.
///
public class Value : IDisposable, IComparable, IEquatable
{
@@ -977,12 +1104,20 @@ public class Value : IDisposable, IComparable, IEquatable
internal IntPtr Handle { get; set;}
- /// Whether this wrapper owns (can free) the native value.
+ /// Whether this wrapper owns (can free) the native value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The kind of ownership of this wrapper.
public Ownership Ownership { get; protected set;}
private bool Disposed;
- /// Whether this is an Optional value (meaning it can have a value or not).
+ /// Whether this is an Optional value (meaning it can have a value or not).
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// True if this value may contain no value.
public bool Optional
{
get
@@ -999,7 +1134,17 @@ public class Value : IDisposable, IComparable, IEquatable
} */
}
- /// Whether this wrapper is actually empty/uninitialized (zeroed). This is different from an empty optional value.
+ /// Whether this wrapper is actually empty/uninitialized (zeroed).
+ ///
+ /// This is different from an value. An
+ /// Optional value is an initialized value that may or may not hold a value,
+ /// while an value is an uninitialized value and it
+ /// should be initialized (e.g. with )
+ /// with a non-empty value to actually store/retrieve values.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// true if this value is unintialized.
public bool Empty
{
get
@@ -1009,7 +1154,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Whether this optional value is empty.
+ /// Whether this optional value is empty.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// true if this optional value is empty.
public bool OptionalEmpty
{
get
@@ -1051,7 +1200,10 @@ public class Value : IDisposable, IComparable, IEquatable
MemoryNative.Memset(this.Handle, 0, eina_value_sizeof());
}
- /// Creates a new Value from the given C# value.
+ /// Creates a new Value from the given C# value.
+ ///
+ /// Since EFL 1.23.
+ ///
/// The object to be wrapped.
public Value(object obj) : this()
{
@@ -1145,13 +1297,22 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
+ /// Creates a new Value from the given native pointer.
+ ///
+ /// Since EFL 1.23.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Value(IntPtr handle, Ownership ownership = Ownership.Managed)
{
this.Handle = handle;
this.Ownership = ownership;
}
- /// Creates a new value storage for values of type 'type'.
+ /// Creates a new value storage for values of type type.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The type of the value that will be stored.
public Value(ValueType type)
{
if (type.IsContainer())
@@ -1172,7 +1333,14 @@ public class Value : IDisposable, IComparable, IEquatable
Setup(type);
}
- /// Constructor for container values, like Array, Hash.
+ /// Constructor for container values, like Array, Hash. It also requires an extra parameter
+ /// with the type of the contained items.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The type of the container to store values.
+ /// The type of the values contained.
+ /// Amount to increase the capacity of the container by when it needs to grow.
public Value(ValueType containerType, ValueType subtype, uint step = 0)
{
if (!containerType.IsContainer())
@@ -1186,7 +1354,11 @@ public class Value : IDisposable, IComparable, IEquatable
Setup(containerType, subtype, step);
}
- /// Deep copies the given eina Value
+ /// Deep copies the given eina Value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be copied.
public Value(Value v)
{
Handle = Alloc();
@@ -1200,7 +1372,7 @@ public class Value : IDisposable, IComparable, IEquatable
}
/// Constructor to build value from Values_Natives passed by value from C.
- public Value(ValueNative value)
+ internal Value(ValueNative value)
{
IntPtr tmp = IntPtr.Zero;
try
@@ -1241,7 +1413,10 @@ public class Value : IDisposable, IComparable, IEquatable
this.Ownership = Ownership.Managed;
}
- /// Type-specific constructor, for convenience.
+ /// Type-specific constructor, for convenience.
+ /// Since EFL 1.23.
+ ///
+ /// The value to be wrapped.
public Value(byte x) : this(ValueType.Byte)
{
if (!Set(x))
@@ -1250,7 +1425,10 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Type-specific constructor, for convenience.
+ /// Type-specific constructor, for convenience.
+ /// Since EFL 1.23.
+ ///
+ /// The value to be wrapped.
public Value(sbyte x) : this(ValueType.SByte)
{
if (!Set(x))
@@ -1259,7 +1437,10 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Type-specific constructor, for convenience.
+ /// Type-specific constructor, for convenience.
+ /// Since EFL 1.23.
+ ///
+ /// The value to be wrapped.
public Value(short x) : this(ValueType.Short)
{
if (!Set(x))
@@ -1268,7 +1449,10 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Type-specific constructor, for convenience.
+ /// Type-specific constructor, for convenience.
+ /// Since EFL 1.23.
+ ///
+ /// The value to be wrapped.
public Value(ushort x) : this(ValueType.UShort)
{
if (!Set(x))
@@ -1277,7 +1461,10 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Type-specific constructor, for convenience.
+ /// Type-specific constructor, for convenience.
+ /// Since EFL 1.23.
+ ///
+ /// The value to be wrapped.
public Value(int x) : this(ValueType.Int32)
{
if (!Set(x))
@@ -1286,7 +1473,10 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Type-specific constructor, for convenience.
+ /// Type-specific constructor, for convenience.
+ /// Since EFL 1.23.
+ ///
+ /// The value to be wrapped.
public Value(uint x) : this(ValueType.UInt32)
{
if (!Set(x))
@@ -1295,7 +1485,10 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Type-specific constructor, for convenience.
+ /// Type-specific constructor, for convenience.
+ /// Since EFL 1.23.
+ ///
+ /// The value to be wrapped.
public Value(long x) : this(ValueType.Long)
{
if (!Set(x))
@@ -1304,7 +1497,10 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Type-specific constructor, for convenience.
+ /// Type-specific constructor, for convenience.
+ /// Since EFL 1.23.
+ ///
+ /// The value to be wrapped.
public Value(ulong x) : this(ValueType.ULong)
{
if (!Set(x))
@@ -1313,7 +1509,10 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Type-specific constructor, for convenience.
+ /// Type-specific constructor, for convenience.
+ /// Since EFL 1.23.
+ ///
+ /// The value to be wrapped.
public Value(float x) : this(ValueType.Float)
{
if (!Set(x))
@@ -1322,7 +1521,10 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Type-specific constructor, for convenience.
+ /// Type-specific constructor, for convenience.
+ /// Since EFL 1.23.
+ ///
+ /// The value to be wrapped.
public Value(double x) : this(ValueType.Double)
{
if (!Set(x))
@@ -1331,7 +1533,10 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Type-specific constructor, for convenience.
+ /// Type-specific constructor, for convenience.
+ /// Since EFL 1.23.
+ ///
+ /// The value to be wrapped.
public Value(string x) : this(ValueType.String)
{
if (!Set(x))
@@ -1340,19 +1545,27 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Implicit conversion from managed value to native struct representation.
+ /// Implicit conversion from managed value to native struct representation.
+ /// Since EFL 1.23.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static implicit operator ValueNative(Value v)
{
return v.GetNative();
}
- /// Implicit conversion from native struct representation to managed wrapper.
+ /// Implicit conversion from native struct representation to managed wrapper.
+ /// Since EFL 1.23.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static implicit operator Value(ValueNative v)
{
return new Value(v);
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator Value(byte x)
{
var v = new Eina.Value(ValueType.Byte);
@@ -1364,7 +1577,9 @@ public class Value : IDisposable, IComparable, IEquatable
return v;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator byte(Value v)
{
byte b;
@@ -1376,7 +1591,9 @@ public class Value : IDisposable, IComparable, IEquatable
return b;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator Value(sbyte x)
{
var v = new Eina.Value(ValueType.SByte);
@@ -1388,7 +1605,9 @@ public class Value : IDisposable, IComparable, IEquatable
return v;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator sbyte(Value v)
{
sbyte b;
@@ -1400,7 +1619,9 @@ public class Value : IDisposable, IComparable, IEquatable
return b;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator Value(short x)
{
var v = new Eina.Value(ValueType.Short);
@@ -1412,7 +1633,9 @@ public class Value : IDisposable, IComparable, IEquatable
return v;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator short(Value v)
{
short b;
@@ -1424,7 +1647,9 @@ public class Value : IDisposable, IComparable, IEquatable
return b;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator Value(ushort x)
{
var v = new Eina.Value(ValueType.UShort);
@@ -1436,7 +1661,9 @@ public class Value : IDisposable, IComparable, IEquatable
return v;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator ushort(Value v)
{
ushort b;
@@ -1448,7 +1675,9 @@ public class Value : IDisposable, IComparable, IEquatable
return b;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator Value(int x)
{
var v = new Eina.Value(ValueType.Int32);
@@ -1460,7 +1689,9 @@ public class Value : IDisposable, IComparable, IEquatable
return v;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator int(Value v)
{
int b;
@@ -1472,7 +1703,9 @@ public class Value : IDisposable, IComparable, IEquatable
return b;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator Value(uint x)
{
var v = new Eina.Value(ValueType.UInt32);
@@ -1484,7 +1717,9 @@ public class Value : IDisposable, IComparable, IEquatable
return v;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator uint(Value v)
{
uint b;
@@ -1496,7 +1731,9 @@ public class Value : IDisposable, IComparable, IEquatable
return b;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator Value(long x)
{
var v = new Eina.Value(ValueType.Long);
@@ -1508,7 +1745,9 @@ public class Value : IDisposable, IComparable, IEquatable
return v;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator long(Value v)
{
long b;
@@ -1520,7 +1759,9 @@ public class Value : IDisposable, IComparable, IEquatable
return b;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator Value(ulong x)
{
var v = new Eina.Value(ValueType.ULong);
@@ -1532,7 +1773,9 @@ public class Value : IDisposable, IComparable, IEquatable
return v;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator ulong(Value v)
{
ulong b;
@@ -1544,7 +1787,9 @@ public class Value : IDisposable, IComparable, IEquatable
return b;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator Value(float x)
{
var v = new Eina.Value(ValueType.Float);
@@ -1556,7 +1801,9 @@ public class Value : IDisposable, IComparable, IEquatable
return v;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator float(Value v)
{
float b;
@@ -1568,7 +1815,9 @@ public class Value : IDisposable, IComparable, IEquatable
return b;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator Value(double x)
{
var v = new Eina.Value(ValueType.Double);
@@ -1580,7 +1829,9 @@ public class Value : IDisposable, IComparable, IEquatable
return v;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator double(Value v)
{
double b;
@@ -1592,7 +1843,9 @@ public class Value : IDisposable, IComparable, IEquatable
return b;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator Value(string x)
{
var v = new Eina.Value(ValueType.String);
@@ -1604,7 +1857,9 @@ public class Value : IDisposable, IComparable, IEquatable
return v;
}
- /// Implicit conversion.
+ /// Implicit conversion.
+ /// Since EFL 1.23.
+ ///
public static implicit operator string(Value v)
{
string b;
@@ -1620,8 +1875,10 @@ public class Value : IDisposable, IComparable, IEquatable
///
/// Useful for methods like
/// as it will unpack the value to it correct C# type.
+ ///
+ /// Since EFL 1.23.
///
- /// The C# value wrapped by this value.
+ /// The managed value wrapped by this value.
public object Unwrap()
{
switch (GetValueType())
@@ -1734,7 +1991,9 @@ public class Value : IDisposable, IComparable, IEquatable
// Efl.Object conversions are made explicit to avoid ambiguity between
// Set(Efl.Object) and Set(Value) when dealing with classes derived from
// Efl.Object.
- /// Explicit conversion from EFL objects.
+ /// Explicit conversion from EFL objects.
+ /// Since EFL 1.23.
+ ///
public static explicit operator Value(Efl.Object obj)
{
var v = new Eina.Value(ValueType.Object);
@@ -1745,7 +2004,9 @@ public class Value : IDisposable, IComparable, IEquatable
return v;
}
- /// Explicit conversion from Value to Efl.Objects.
+ /// Explicit conversion from Value to Efl.Objects.
+ /// Since EFL 1.23.
+ ///
public static explicit operator Efl.Object(Value v)
{
Efl.Object obj;
@@ -1757,7 +2018,9 @@ public class Value : IDisposable, IComparable, IEquatable
return obj;
}
- /// Creates an Value instance from a given array description.
+ /// Creates an Value instance from a given array description.
+ /// Since EFL 1.23.
+ ///
private static Value FromArrayDesc(Eina.EinaNative.Value_Array arrayDesc)
{
Value value = new Value();
@@ -1767,7 +2030,9 @@ public class Value : IDisposable, IComparable, IEquatable
return value;
}
- /// Creates an Value instance from a given array description.
+ /// Creates an Value instance from a given array description.
+ /// Since EFL 1.23.
+ ///
private static Value FromListDesc(Eina.EinaNative.Value_List listDesc)
{
Value value = new Value();
@@ -1777,26 +2042,36 @@ public class Value : IDisposable, IComparable, IEquatable
return value;
}
- /// Releases the ownership of the underlying value to C.
+ /// Releases the ownership of the underlying value to C.
+ /// Since EFL 1.23.
+ ///
public void ReleaseOwnership()
{
this.Ownership = Ownership.Unmanaged;
}
- /// Takes the ownership of the underlying value to the Managed runtime.
+ /// Takes the ownership of the underlying value to the Managed runtime.
+ /// Since EFL 1.23.
+ ///
public void TakeOwnership()
{
this.Ownership = Ownership.Managed;
}
- /// Public method to explicitly free the wrapped eina value.
+ /// Public method to explicitly free the wrapped eina value.
+ /// Since EFL 1.23.
+ ///
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
- /// Actually free the wrapped eina value. Can be called from Dispose() or through the GC.
+ /// Actually free the wrapped eina value. Can be called from Dispose() or through the Garbage Collector.
+ /// Since EFL 1.23.
+ ///
+ /// true if called from the method
+ /// false if called from the Garbage Collector.
protected virtual void Dispose(bool disposing)
{
if (this.Ownership == Ownership.Unmanaged)
@@ -1821,13 +2096,16 @@ public class Value : IDisposable, IComparable, IEquatable
Disposed = true;
}
- /// Finalizer to be called from the Garbage Collector.
+ /// Finalizer to be called from the Garbage Collector.
+ /// Since EFL 1.23.
+ ///
~Value()
{
Dispose(false);
}
/// Returns the native handle wrapped by this object.
+ /// The native pointer wrapped by this object.
public IntPtr NativeHandle
{
get
@@ -1841,7 +2119,10 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Converts this storage to type 'type'
+ /// Converts this storage to type 'type'.
+ /// Since EFL 1.23.
+ ///
+ /// true if the configuration was successul.
public bool Setup(ValueType type)
{
if (Disposed)
@@ -1871,6 +2152,14 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_setup_wrapper(this.Handle, ValueTypeBridge.GetNative(type));
}
+ /// Converts the storage type of this value to the container type containerType.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The type of the container to store values.
+ /// The type of the values contained.
+ /// Amount to increase the capacity of the container by when it needs to grow.
+ /// true if the configuration was successul.
public bool Setup(ValueType containerType, ValueType subtype, uint step = 0)
{
IntPtr native_subtype = ValueTypeBridge.GetNative(subtype);
@@ -1941,6 +2230,7 @@ public class Value : IDisposable, IComparable, IEquatable
}
/// Get a ValueNative struct with the *value* pointed by this Eina.Value.
+ [EditorBrowsable(EditorBrowsableState.Never)]
public ValueNative GetNative()
{
SanityChecks();
@@ -1948,6 +2238,12 @@ public class Value : IDisposable, IComparable, IEquatable
return value;
}
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(byte value)
{
SanityChecks();
@@ -1968,6 +2264,12 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_uchar(this.Handle, value);
}
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(sbyte value)
{
SanityChecks();
@@ -1988,6 +2290,12 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_char(this.Handle, value);
}
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(short value)
{
SanityChecks();
@@ -2008,6 +2316,12 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_short(this.Handle, value);
}
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(ushort value)
{
SanityChecks();
@@ -2028,7 +2342,12 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_ushort(this.Handle, value);
}
- /// Stores the given uint value.
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(uint value)
{
SanityChecks();
@@ -2049,7 +2368,12 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_uint(this.Handle, value);
}
- /// Stores the given int value.
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(int value)
{
SanityChecks();
@@ -2070,7 +2394,12 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_int(this.Handle, value);
}
- /// Stores the given ulong value.
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(ulong value)
{
SanityChecks();
@@ -2091,7 +2420,12 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_ulong(this.Handle, value);
}
- /// Stores the given int value.
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(long value)
{
SanityChecks();
@@ -2112,7 +2446,12 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_long(this.Handle, value);
}
- /// Stores the given int value.
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(float value)
{
SanityChecks();
@@ -2133,7 +2472,12 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_float(this.Handle, value);
}
- /// Stores the given int value.
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(double value)
{
SanityChecks();
@@ -2154,7 +2498,12 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_double(this.Handle, value);
}
- /// Stores the given string value.
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(string value)
{
SanityChecks();
@@ -2176,7 +2525,12 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_string(this.Handle, value);
}
- /// Stores the given error value.
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(Eina.Error value)
{
SanityChecks();
@@ -2193,10 +2547,14 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_int(this.Handle, error_code);
}
- /// Stores the given object.
+ /// Sets the contained value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(Efl.Object value)
{
- // FIXME Implement me
SanityChecks();
if (this.Optional)
@@ -2209,7 +2567,13 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_set_wrapper_ptr(this.Handle, value.NativeHandle);
}
- /// Stores the given value into this value. The target value must be an optional.
+ /// Stores the given value into this value. This value's must
+ /// be true.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The value to be stored.
+ /// true if the value was successfully stored.
public bool Set(Value value)
{
OptionalSanityChecks();
@@ -2254,7 +2618,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Gets the currently stored value as a byte.
+ /// Gets the currently stored value as a byte.
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out byte value)
{
SanityChecks();
@@ -2268,7 +2636,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Gets the currently stored value as a sbyte.
+ /// Gets the currently stored value as a sbyte.
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out sbyte value)
{
SanityChecks();
@@ -2282,7 +2654,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Gets the currently stored value as a short.
+ /// Gets the currently stored value as a short.
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out short value)
{
SanityChecks();
@@ -2296,7 +2672,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Gets the currently stored value as an ushort.
+ /// Gets the currently stored value as an ushort.
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out ushort value)
{
SanityChecks();
@@ -2310,7 +2690,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Gets the currently stored value as an int.
+ /// Gets the currently stored value as an int.
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out int value)
{
SanityChecks();
@@ -2324,7 +2708,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Gets the currently stored value as an uint.
+ /// Gets the currently stored value as an uint.
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out uint value)
{
SanityChecks();
@@ -2338,7 +2726,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Gets the currently stored value as a long.
+ /// Gets the currently stored value as a long.
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out long value)
{
SanityChecks();
@@ -2352,7 +2744,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Gets the currently stored value as an ulong.
+ /// Gets the currently stored value as an ulong.
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out ulong value)
{
SanityChecks();
@@ -2366,7 +2762,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Gets the currently stored value as a float.
+ /// Gets the currently stored value as a float.
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out float value)
{
SanityChecks();
@@ -2380,7 +2780,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Gets the currently stored value as a double.
+ /// Gets the currently stored value as a double.
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out double value)
{
SanityChecks();
@@ -2394,7 +2798,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
- /// Gets the currently stored value as a string.
+ /// Gets the currently stored value as a string.
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out string value)
{
SanityChecks();
@@ -2417,7 +2825,11 @@ public class Value : IDisposable, IComparable, IEquatable
return true;
}
- /// Gets the currently stored value as an Eina.Error.
+ /// Gets the currently stored value as an Eina.Error.
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out Eina.Error value)
{
SanityChecks();
@@ -2437,7 +2849,11 @@ public class Value : IDisposable, IComparable, IEquatable
return ret;
}
- /// Gets the currently stored value as an .
+ /// Gets the currently stored value as an .
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out Efl.Object obj)
{
// FIXME Implement me
@@ -2467,7 +2883,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
- /// Gets the currently stored value as an complex (e.g. container) Eina.Value.
+ /// Gets the currently stored value as a complex (e.g. container) .
+ /// Since EFL 1.23.
+ ///
+ /// The target variable to receive the value.
+ /// True if the value was correctly retrieved.
public bool Get(out Value value)
{
SanityChecks();
@@ -2508,7 +2928,10 @@ public class Value : IDisposable, IComparable, IEquatable
return true;
}
- /// Gets the 'Type' this value is currently configured to store.
+ /// Gets the 'Type' this value is currently configured to store.
+ /// Since EFL 1.23.
+ ///
+ /// The type of the value stored in this object.
public ValueType GetValueType()
{
if (Disposed)
@@ -2520,21 +2943,44 @@ public class Value : IDisposable, IComparable, IEquatable
return ValueTypeBridge.GetManaged(native_type);
}
- /// Converts the value on this storage to the type of 'target' and stores
- /// the result in 'target'.
- public bool ConvertTo(Value target)
+ /// Stores in destination a value converted from this one.
+ ///
+ /// If the types of this value and destination differ, the library
+ /// searches this value's type for a conversion function to the type of destination.
+ /// If no such conversion is available, it searches the destination's type for a
+ /// function converting from the type of this value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ ///
+ ///
+ /// var value = new Eina.Value("3.14"); // Type is string
+ /// var dest = new Eina.Value(Eina.ValueType.Float); // Type is float
+ /// value.ConvertTo(dest);
+ /// // Dest now contains 3.14.
+ ///
+ ///
+ ///
+ /// The object to receive the converted value.
+ /// true if the value was successfully converted.
+ public bool ConvertTo(Value destination)
{
- if (target == null)
+ if (destination == null)
{
return false;
}
SanityChecks();
- return eina_value_convert(this.Handle, target.Handle);
+ return eina_value_convert(this.Handle, destination.Handle);
}
- /// Compare two eina values.
+ /// Compare two eina values.
+ /// Since EFL 1.23.
+ ///
+ /// The object to be compared to.
+ /// -1, 0 or 1 if this value is respectively smaller than, equal to or greater than
+ /// the other.
public int CompareTo(Value other)
{
if (other == null)
@@ -2547,11 +2993,22 @@ public class Value : IDisposable, IComparable, IEquatable
return eina_value_compare_wrapper(this.Handle, other.Handle);
}
+ /// Compare to other values.
+ /// Since EFL 1.23.
+ ///
+ /// The object to be compared to.
+ /// -1, 0 or 1 if this value is respectively smaller than, equal to or greater than
+ /// the other.
public int Compare(Value other)
{
return this.CompareTo(other);
}
+ /// Returns whether this value is equal to the given object.
+ /// Since EFL 1.23.
+ ///
+ /// The object to be compared to.
+ /// true if this value is equal to other.
public override bool Equals(object obj)
{
if (obj == null)
@@ -2568,6 +3025,11 @@ public class Value : IDisposable, IComparable, IEquatable
return this.Equals(v);
}
+ /// Returns whether this value is equal to the given value.
+ /// Since EFL 1.23.
+ ///
+ /// The value to be compared to.
+ /// true if this value is equal to other.
public bool Equals(Value other)
{
try
@@ -2580,11 +3042,22 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
+ /// Gets the hash code for this value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The hash code of this value.
public override int GetHashCode()
{
return this.Handle.ToInt32();
}
+ /// Returns whether both values are null or x is equal to y.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// true if both parameters are null or if x is equal
+ /// to y.
public static bool operator==(Value x, Value y)
{
if (object.ReferenceEquals(x, null))
@@ -2595,6 +3068,11 @@ public class Value : IDisposable, IComparable, IEquatable
return x.Equals(y);
}
+ /// Returns whether x is different from y.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// true if x is different from y.
public static bool operator!=(Value x, Value y)
{
if (object.ReferenceEquals(x, null))
@@ -2605,6 +3083,13 @@ public class Value : IDisposable, IComparable, IEquatable
return !x.Equals(y);
}
+ /// Returns whether x is greater than y.
+ ///
+ /// If either parameter is null, false is returned.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// true if x is greater than y.
public static bool operator>(Value x, Value y)
{
if (object.ReferenceEquals(x, null) || object.ReferenceEquals(y, null))
@@ -2615,6 +3100,13 @@ public class Value : IDisposable, IComparable, IEquatable
return x.CompareTo(y) > 0;
}
+ /// Returns whether x is smaller than y.
+ ///
+ /// If either parameter is null, false is returned.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// true if x is smaller than y.
public static bool operator<(Value x, Value y)
{
if (object.ReferenceEquals(x, null) || object.ReferenceEquals(y, null))
@@ -2626,7 +3118,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
- /// Converts value to string.
+ /// Converts value to string.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// A string representation of this value.
public override String ToString()
{
SanityChecks();
@@ -2634,14 +3130,24 @@ public class Value : IDisposable, IComparable, IEquatable
}
- /// Empties an optional Eina.Value, freeing what was previously contained.
+ /// Empties an optional Eina.Value, freeing what was previously contained.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// true if the operation was successful.
public bool Reset()
{
OptionalSanityChecks();
return eina_value_optional_reset(this.Handle);
}
- // Container methods methods
+ // Container value methods
+
+ /// Gets the number of elements in this container value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The number of elements.
public int Count()
{
ContainerSanityChecks();
@@ -2656,6 +3162,12 @@ public class Value : IDisposable, IComparable, IEquatable
return -1;
}
+ /// Appends new values to this container.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The new value to be appended.
+ /// true if the value was successfully appended.
public bool Append(object o)
{
ContainerSanityChecks();
@@ -2739,6 +3251,11 @@ public class Value : IDisposable, IComparable, IEquatable
return false;
}
+ /// Indexer for this container.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The index of the element to be accessed/set.
public object this[int i]
{
get
@@ -2932,6 +3449,11 @@ public class Value : IDisposable, IComparable, IEquatable
}
}
+ /// Gets the type of the values in this container value.
+ ///
+ /// Since EFL 1.23.
+ ///
+ /// The of the values contained in this container.
public ValueType GetValueSubType()
{
ContainerSanityChecks();
@@ -3006,6 +3528,7 @@ public class ValueMarshaler : ICustomMarshaler
/// Custom marshaler to convert value pointers to managed values and back,
/// also transferring the ownership to the other side.
+[EditorBrowsable(EditorBrowsableState.Never)]
public class ValueMarshalerOwn : ICustomMarshaler
{
/// Creates a managed value from a C pointer, taking the ownership.
@@ -3059,6 +3582,7 @@ public class ValueMarshalerOwn : ICustomMarshaler
/// Custom marshaler to convert value type pointers to managed boxed enum values
/// and back.
+[EditorBrowsable(EditorBrowsableState.Never)]
public class ValueTypeMarshaler : ICustomMarshaler
{
/// Creates a boxed ValueType enum value from a C pointer.