Show / Hide Table of Contents

Class TreeModel<T>

Inheritance
System.Object
TreeModel<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace:Mapbox.Editor
Assembly:cs.temp.dll.dll
Syntax
public class TreeModel<T>
    where T : TreeElement
Type Parameters
Name Description
T

Constructors

TreeModel(IList<T>)

Declaration
public TreeModel(IList<T> data)
Parameters
Type Name Description
System.Collections.Generic.IList<T> data

Properties

numberOfDataElements

Declaration
public int numberOfDataElements { get; }
Property Value
Type Description
System.Int32

root

Declaration
public T root { get; set; }
Property Value
Type Description
T

Methods

AddElement(T, TreeElement, Int32)

Declaration
public void AddElement(T element, TreeElement parent, int insertPosition)
Parameters
Type Name Description
T element
TreeElement parent
System.Int32 insertPosition

AddElements(IList<T>, TreeElement, Int32)

Declaration
public void AddElements(IList<T> elements, TreeElement parent, int insertPosition)
Parameters
Type Name Description
System.Collections.Generic.IList<T> elements
TreeElement parent
System.Int32 insertPosition

AddRoot(T)

Declaration
public void AddRoot(T root)
Parameters
Type Name Description
T root

Find(Int32)

Declaration
public T Find(int id)
Parameters
Type Name Description
System.Int32 id
Returns
Type Description
T

GenerateUniqueID()

Declaration
public int GenerateUniqueID()
Returns
Type Description
System.Int32

GetAncestors(Int32)

Declaration
public IList<int> GetAncestors(int id)
Parameters
Type Name Description
System.Int32 id
Returns
Type Description
System.Collections.Generic.IList<System.Int32>

GetDescendantsThatHaveChildren(Int32)

Declaration
public IList<int> GetDescendantsThatHaveChildren(int id)
Parameters
Type Name Description
System.Int32 id
Returns
Type Description
System.Collections.Generic.IList<System.Int32>

MoveElements(TreeElement, Int32, List<TreeElement>)

Declaration
public void MoveElements(TreeElement parentElement, int insertionIndex, List<TreeElement> elements)
Parameters
Type Name Description
TreeElement parentElement
System.Int32 insertionIndex
System.Collections.Generic.List<TreeElement> elements

RemoveElements(IList<T>)

Declaration
public void RemoveElements(IList<T> elements)
Parameters
Type Name Description
System.Collections.Generic.IList<T> elements

RemoveElements(IList<Int32>)

Declaration
public void RemoveElements(IList<int> elementIDs)
Parameters
Type Name Description
System.Collections.Generic.IList<System.Int32> elementIDs

SetData(IList<T>)

Declaration
public void SetData(IList<T> data)
Parameters
Type Name Description
System.Collections.Generic.IList<T> data

Events

modelChanged

Declaration
public event Action modelChanged
Event Type
Type Description
System.Action
Back to top © 2017 Mapbox