GH_Path
References[DebuggerDisplay("{DebuggerDisplay}")]
public class GH_Path : IComparable<GH_Path>, IComparer<GH_Path>, GH_ISerializable
Describes the path in structure space of a data item or a list of items. A path consists of a series of integers, each one of which represents an index in a branch structure.
Constructors
GH_Path
#Creates an exact copy of another path.
public GH_Path()
GH_Path
Other
Path to copy, cannot be null.
Exceptions:
| ArgumentNullException | Thrown if Other is a null reference |
Properties
DebuggerDisplay
#Gets the debugger display string for this Path instance.
[EditorBrowsable(EditorBrowsableState.Never)]
[Browsable(false)]
public string DebuggerDisplay { get; }
Indices
#Gets or sets the entire index space; the path that identifies an element in structure space. You should not change the index space when the path is used inside a structure since it will invalidate the sort order. If you don't know what you're doing, for Pete's sake don't touch this.
InternalPath
#Gets or sets the entire index space; the path that identifies an element in structure space. You should not change the index space when the path is used inside a structure since it will invalidate the sort order. If you don't know what you're doing, for Pete's sake don't touch this.
[EditorBrowsable(EditorBrowsableState.Never)]
[Browsable(false)]
public int[] InternalPath { get; set; }
obsoleteThis property has been replaced by the Indices property
Indexers
Methods
AppendElement
#Create a new path by appending a new index value to this path.
Compare
#Compare two paths. This function determines the Sorting behaviour of paths.
CompareTo
#Compare this path to another path. This function determines the Sorting behaviour of paths.
CullElement
#Removes the last index value from the path. If the path is already empty, nothing will happen.
CullFirstElement
#Removes the first index value from the path. If the path is already empty, nothing will happen.
Format
#Format a path.
public string Format()
format_provider,
The string describing the format. You are allowed to use {0} as a format placeholder. The placeholder will be filled up with a semi-colon separated list: 0;0;2;4
separator
Character to use for element separators. The default separator is a semi-colon.
Returns: Formatted string.
Increment
#Increment a specific index in this path by one.
Returns: A new path with incremented index.
Increment
#Increment a specific index in this path by one.
Returns: A new path with incremented index.
IsAncestor
#Test another path to see if it is an ancestor of this path. For a path to be considered an ancestor, it must share the initial dimensions.
Returns: True if other overlaps completely with this path while being at least one element shorter.
IsCoincident
#Test to see if this path is coincident with another path.
Returns: True if both paths are coincident (identical), false if not.
IsCoincident
#Test to see if this path is coincident with set of integers.
Returns: True if both paths are coincident (identical), false if not.
PrependElement
#Create a new path by prepending a new index value to this path.
SplitPathLikeString
#Try to split up a path-like formatted string "{A;B;C}(i)" into component parts.
Returns: True on success, false on failure.
ToString
#Concatenates the indices in the path.