!B (Sandbox) (CE-21795) Importing models with multisubmaterials via fbx switches...
[CRYENGINE.git] / Code / Tools / LuaRemoteDebugger / Aga.Controls / Tree / TreePath.cs
blob89921eaccbbeebd15195270a8030b5dbd27596ff
1 // Copyright 2001-2019 Crytek GmbH / Crytek Group. All rights reserved.
3 using System;
4 using System.Text;
5 using System.Collections.ObjectModel;
7 namespace Aga.Controls.Tree
9 public class TreePath
11 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
12 public static readonly TreePath Empty = new TreePath();
14 private object[] _path;
15 public object[] FullPath
17 get { return _path; }
20 public object LastNode
22 get
24 if (_path.Length > 0)
25 return _path[_path.Length - 1];
26 else
27 return null;
31 public object FirstNode
33 get
35 if (_path.Length > 0)
36 return _path[0];
37 else
38 return null;
42 public TreePath()
44 _path = new object[0];
47 public TreePath(object node)
49 _path = new object[] { node };
52 public TreePath(object[] path)
54 _path = path;
57 public TreePath(TreePath parent, object node)
59 _path = new object[parent.FullPath.Length + 1];
60 for (int i = 0; i < _path.Length - 1; i++)
61 _path[i] = parent.FullPath[i];
62 _path[_path.Length - 1] = node;
65 public bool IsEmpty()
67 return (_path.Length == 0);