Class Eina.Value
Wrapper around Eina.Value generic storage.
Eina.Value is EFL's main workhorse to deal with storing generic data in
a uniform way.
It comes with predefined types for numbers, strings, arrays, lists, hashes,
blobs and structs. It is able to convert between data types, including
to and from strings.
Constructors
Value(Value)
Deep copies the given eina Value
Declaration
Parameters
Value(ValueNative)
Constructor to build value from Values_Natives passed by value from C.
Declaration
public Value(ValueNative value)
Parameters
Value(ValueType)
Creates a new value storage for values of type 'type'.
Declaration
public Value(ValueType type)
Parameters
Value(ValueType, ValueType, UInt32)
Constructor for container values, like Array, Hash.
Declaration
public Value(ValueType containerType, ValueType subtype, uint step = 0U)
Parameters
Value(Byte)
Type-specific constructor, for convenience.
Declaration
Parameters
Value(Double)
Type-specific constructor, for convenience.
Declaration
Parameters
Value(Int16)
Type-specific constructor, for convenience.
Declaration
Parameters
Value(Int32)
Type-specific constructor, for convenience.
Declaration
Parameters
Value(Int64)
Type-specific constructor, for convenience.
Declaration
Parameters
Value(IntPtr, Ownership)
Declaration
public Value(IntPtr handle, Ownership ownership = Ownership.Managed)
Parameters
Value(Object)
Creates a new Value from the given C# value.
Declaration
Parameters
Type |
Name |
Description |
System.Object |
obj |
The object to be wrapped.
|
Value(SByte)
Type-specific constructor, for convenience.
Declaration
Parameters
Value(Single)
Type-specific constructor, for convenience.
Declaration
Parameters
Value(String)
Type-specific constructor, for convenience.
Declaration
Parameters
Value(UInt16)
Type-specific constructor, for convenience.
Declaration
Parameters
Value(UInt32)
Type-specific constructor, for convenience.
Declaration
Parameters
Value(UInt64)
Type-specific constructor, for convenience.
Declaration
Parameters
Properties
Empty
Whether this wrapper is actually empty/uninitialized (zeroed). This is different from an empty optional value.
Declaration
public bool Empty { get; }
Property Value
Item[Int32]
Declaration
public object this[int i] { get; set; }
Parameters
Property Value
NativeHandle
Returns the native handle wrapped by this object.
Declaration
public IntPtr NativeHandle { get; }
Property Value
Optional
Whether this is an Optional value (meaning it can have a value or not).
Declaration
public bool Optional { get; }
Property Value
OptionalEmpty
Whether this optional value is empty.
Declaration
public bool OptionalEmpty { get; }
Property Value
Ownership
Whether this wrapper owns (can free) the native value.
Declaration
public Ownership Ownership { get; protected set; }
Property Value
Methods
Append(Object)
Declaration
public bool Append(object o)
Parameters
Returns
Compare(Value)
Declaration
public int Compare(Value other)
Parameters
Returns
CompareTo(Value)
Declaration
public int CompareTo(Value other)
Parameters
Returns
ConvertTo(Value)
Converts the value on this storage to the type of 'target' and stores
the result in 'target'.
Declaration
public bool ConvertTo(Value target)
Parameters
Returns
Count()
Declaration
Returns
Dispose()
Public method to explicitly free the wrapped eina value.
Declaration
Dispose(Boolean)
Actually free the wrapped eina value. Can be called from Dispose() or through the GC.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Equals(Value)
Declaration
public bool Equals(Value other)
Parameters
Returns
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Returns
Overrides
Finalize()
Finalizer to be called from the Garbage Collector.
Declaration
protected void Finalize()
Get(out Object)
Declaration
public bool Get(out Object obj)
Parameters
Returns
Get(out Error)
Gets the currently stored value as an Eina.Error.
Declaration
public bool Get(out Error value)
Parameters
Returns
Get(out Value)
Gets the currently stored value as an complex (e.g. container) Eina.Value.
Declaration
public bool Get(out Value value)
Parameters
Returns
Get(out Byte)
Gets the currently stored value as a byte.
Declaration
public bool Get(out byte value)
Parameters
Returns
Get(out Double)
Gets the currently stored value as a double.
Declaration
public bool Get(out double value)
Parameters
Returns
Get(out Int16)
Gets the currently stored value as a short.
Declaration
public bool Get(out short value)
Parameters
Returns
Get(out Int32)
Gets the currently stored value as an int.
Declaration
public bool Get(out int value)
Parameters
Returns
Get(out Int64)
Gets the currently stored value as a long.
Declaration
public bool Get(out long value)
Parameters
Returns
Get(out SByte)
Gets the currently stored value as a sbyte.
Declaration
public bool Get(out sbyte value)
Parameters
Returns
Get(out Single)
Gets the currently stored value as a float.
Declaration
public bool Get(out float value)
Parameters
Returns
Get(out String)
Gets the currently stored value as a string.
Declaration
public bool Get(out string value)
Parameters
Returns
Get(out UInt16)
Gets the currently stored value as an ushort.
Declaration
public bool Get(out ushort value)
Parameters
Returns
Get(out UInt32)
Gets the currently stored value as an uint.
Declaration
public bool Get(out uint value)
Parameters
Returns
Get(out UInt64)
Gets the currently stored value as an ulong.
Declaration
public bool Get(out ulong value)
Parameters
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
GetNative()
Get a ValueNative struct with the value pointed by this Eina.Value.
Declaration
public ValueNative GetNative()
Returns
GetValueSubType()
Declaration
public ValueType GetValueSubType()
Returns
GetValueType()
Gets the 'Type' this value is currently configured to store.
Declaration
public ValueType GetValueType()
Returns
ReleaseOwnership()
Releases the ownership of the underlying value to C.
Declaration
public void ReleaseOwnership()
Reset()
Empties an optional Eina.Value, freeing what was previously contained.
Declaration
Returns
Set(Object)
Declaration
public bool Set(Object value)
Parameters
Returns
Set(Error)
Stores the given error value.
Declaration
public bool Set(Error value)
Parameters
Returns
Set(Value)
Stores the given value into this value. The target value must be an optional.
Declaration
public bool Set(Value value)
Parameters
Returns
Set(Byte)
Declaration
public bool Set(byte value)
Parameters
Returns
Set(Double)
Stores the given int value.
Declaration
public bool Set(double value)
Parameters
Returns
Set(Int16)
Declaration
public bool Set(short value)
Parameters
Returns
Set(Int32)
Stores the given int value.
Declaration
public bool Set(int value)
Parameters
Returns
Set(Int64)
Stores the given int value.
Declaration
public bool Set(long value)
Parameters
Returns
Set(SByte)
Declaration
public bool Set(sbyte value)
Parameters
Returns
Set(Single)
Stores the given int value.
Declaration
public bool Set(float value)
Parameters
Returns
Set(String)
Stores the given string value.
Declaration
public bool Set(string value)
Parameters
Returns
Set(UInt16)
Declaration
public bool Set(ushort value)
Parameters
Returns
Set(UInt32)
Stores the given uint value.
Declaration
public bool Set(uint value)
Parameters
Returns
Set(UInt64)
Stores the given ulong value.
Declaration
public bool Set(ulong value)
Parameters
Returns
Setup(ValueType)
Converts this storage to type 'type'
Declaration
public bool Setup(ValueType type)
Parameters
Returns
Setup(ValueType, ValueType, UInt32)
Declaration
public bool Setup(ValueType containerType, ValueType subtype, uint step = 0U)
Parameters
Returns
TakeOwnership()
Takes the ownership of the underlying value to the Managed runtime.
Declaration
public void TakeOwnership()
ToString()
Converts value to string.
Declaration
public override string ToString()
Returns
Overrides
Unwrap()
Unwrap the value into its underlying C# value.
Useful for methods like
as it will unpack the value to it correct C# type.
Declaration
Returns
Type |
Description |
System.Object |
The C# value wrapped by this value.
|
Operators
Equality(Value, Value)
Declaration
public static bool operator ==(Value x, Value y)
Parameters
Returns
Explicit(Object to Value)
Explicit conversion from EFL objects.
Declaration
public static explicit operator Value(Object obj)
Parameters
Returns
Explicit(Value to Object)
Explicit conversion from Value to Efl.Objects.
Declaration
public static explicit operator Object(Value v)
Parameters
Returns
GreaterThan(Value, Value)
Declaration
public static bool operator>(Value x, Value y)
Parameters
Returns
Implicit(Value to ValueNative)
Implicit conversion from managed value to native struct representation.
Declaration
public static implicit operator ValueNative(Value v)
Parameters
Returns
Implicit(Value to Byte)
Declaration
public static implicit operator byte (Value v)
Parameters
Returns
Implicit(Value to Double)
Declaration
public static implicit operator double (Value v)
Parameters
Returns
Implicit(Value to Int16)
Declaration
public static implicit operator short (Value v)
Parameters
Returns
Implicit(Value to Int32)
Declaration
public static implicit operator int (Value v)
Parameters
Returns
Implicit(Value to Int64)
Declaration
public static implicit operator long (Value v)
Parameters
Returns
Implicit(Value to SByte)
Declaration
public static implicit operator sbyte (Value v)
Parameters
Returns
Implicit(Value to Single)
Declaration
public static implicit operator float (Value v)
Parameters
Returns
Implicit(Value to String)
Declaration
public static implicit operator string (Value v)
Parameters
Returns
Implicit(Value to UInt16)
Declaration
public static implicit operator ushort (Value v)
Parameters
Returns
Implicit(Value to UInt32)
Declaration
public static implicit operator uint (Value v)
Parameters
Returns
Implicit(Value to UInt64)
Declaration
public static implicit operator ulong (Value v)
Parameters
Returns
Implicit(ValueNative to Value)
Implicit conversion from native struct representation to managed wrapper.
Declaration
public static implicit operator Value(ValueNative v)
Parameters
Returns
Implicit(Byte to Value)
Declaration
public static implicit operator Value(byte x)
Parameters
Returns
Implicit(Double to Value)
Declaration
public static implicit operator Value(double x)
Parameters
Returns
Implicit(Int16 to Value)
Declaration
public static implicit operator Value(short x)
Parameters
Returns
Implicit(Int32 to Value)
Declaration
public static implicit operator Value(int x)
Parameters
Returns
Implicit(Int64 to Value)
Declaration
public static implicit operator Value(long x)
Parameters
Returns
Implicit(SByte to Value)
Declaration
public static implicit operator Value(sbyte x)
Parameters
Returns
Implicit(Single to Value)
Declaration
public static implicit operator Value(float x)
Parameters
Returns
Implicit(String to Value)
Declaration
public static implicit operator Value(string x)
Parameters
Returns
Implicit(UInt16 to Value)
Declaration
public static implicit operator Value(ushort x)
Parameters
Returns
Implicit(UInt32 to Value)
Declaration
public static implicit operator Value(uint x)
Parameters
Returns
Implicit(UInt64 to Value)
Declaration
public static implicit operator Value(ulong x)
Parameters
Returns
Inequality(Value, Value)
Declaration
public static bool operator !=(Value x, Value y)
Parameters
Returns
LessThan(Value, Value)
Declaration
public static bool operator <(Value x, Value y)
Parameters
Returns