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
#public GH_Path(GH_Path Other)
Creates an exact copy of another path.
Parameters:
| Other (GH_Path) | Path to copy, cannot be null. |
Exceptions:
| ArgumentNullException | Thrown if Other is a null reference |
Properties
DebuggerDisplay
#[EditorBrowsable(EditorBrowsableState.Never)]
[Browsable(false)]
public string DebuggerDisplay { get; }
Gets the debugger display string for this Path instance.
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
#[EditorBrowsable(EditorBrowsableState.Never)]
[Browsable(false)]
public int[] InternalPath { get; set; }
obsoleteThis property has been replaced by the Indices property
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.
Indexers
Methods
AppendElement
#Create a new path by appending a new index value to this path.
Parameters:
| index (int) | Index value to append. |
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.
Parameters:
| other (GH_Path) |
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.
Parameters:
| format_provider (string) | 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 (string) | 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.
Increment
#Increment a specific index in this path by one.
Parameters:
| index (int) | Index to increment. Valid indices are (-Length+1) to (Length-1). |
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.
IsCoincident
#Test to see if this path is coincident with another path.
Parameters:
| other (GH_Path) | Path to compare to. |
Returns: True if both paths are coincident (identical), false if not.
IsCoincident
#Test to see if this path is coincident with set of integers.
Parameters:
| index_list (params int[]) | Integers to compare to. |
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.
Parameters:
| index (int) | Index value to prepend. |
Read
#Read this path from an archive.
Parameters:
| reader (GH_IReader) | Object to read with. |
Returns: True on success, false on failure.
Implements: Read
ToString
#Concatenates the indices in the path.
Parameters:
| includeBrackets (bool) | If True, brackets will be prepended and appended to the path string. |
Write
#Write this path to an archive.
Parameters:
| writer (GH_IWriter) | Object to write with. |
Returns: True on success, false on failure.
Implements: Write