Search Results for

    Show / Hide Table of Contents

    Struct ManagedDictionary

    Utility interop between C++ and C# for Dictionary collection.

    Assembly: FlaxEngine.dll
    File: Engine/Scripting/Internal/ManagedDictionary.h
    Syntax
    public struct ManagedDictionary

    Constructors

    ManagedDictionary(MObject* instance=nullptr)

    Declaration
    public ManagedDictionary(MObject* instance=nullptr)
    Parameters
    MObject instance

    Fields

    Instance

    Declaration
    public MObject* Instance
    Field Value
    MObject

    Methods

    Add(MObject* key, MObject* value)

    Declaration
    public void Add(MObject* key, MObject* value)
    Parameters
    MObject key

    MObject value

    GetClass(MType* keyType, MType* valueType)

    Declaration
    public static MTypeObject* GetClass(MType* keyType, MType* valueType)
    Parameters
    MType keyType

    MType valueType

    Returns
    MTypeObject

    GetKeys()

    Declaration
    public MArray* GetKeys() const
    Returns
    MArray

    GetValue(MObject* key)

    Declaration
    public MObject* GetValue(MObject* key) const
    Parameters
    MObject key

    Returns
    MObject

    New(MType* keyType, MType* valueType)

    Declaration
    public static ManagedDictionary New(MType* keyType, MType* valueType)
    Parameters
    MType keyType

    MType valueType

    Returns
    ManagedDictionary

    ToManaged(const Dictionary<KeyType, ValueType>& data, MType* keyType, MType* valueType)

    Declaration
    public static MObject* ToManaged(const Dictionary<KeyType, ValueType>& data, MType* keyType, MType* valueType)
    Parameters
    Dictionary<KeyType, ValueType> data

    MType keyType

    MType valueType

    Returns
    MObject

    Type Parameters
    typename KeyType

    typename ValueType

    ToNative(MObject* managed)

    Converts the managed dictionary objects into the native dictionary collection.

    Declaration
    public static Dictionary<KeyType, ValueType> ToNative(MObject* managed)
    Parameters
    MObject managed

    The managed dictionary object.

    Returns
    Dictionary<KeyType, ValueType>

    The output array.

    Type Parameters
    typename KeyType

    typename ValueType

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat