Skip to content
Hyomoto edited this page Dec 12, 2020 · 13 revisions
Jump To Go Back Arguments Methods Variables

DsTree()

Implements: None

DsTree is a traversable tree-like data structure. It starts from a root node which can be traversed through branches to find leaves. Additionally, every branch is itself a DsTree, which means you can return a branch, and then use that as a root for further searching.

var _tree	= new DsTree();

_tree.set( "branch.value", 10 );

show_debug_message( tree.get( "branch.value" ) );

Arguments

Name Type Purpose
None

Methods

Jump To top seek lock unlock destroy size get set copy remove
is toString

seek( _path )

Returns: N/A undefined

Name Type Purpose
_path undef none provided

lock( _path )

Returns: N/A undefined

Name Type Purpose
_path undef none provided

unlock( _path )

Returns: N/A undefined

Name Type Purpose
_path undef none provided

destroy()

Returns: N/A undefined

Name Type Purpose
None

size( _links )

Returns: N/A undefined

Name Type Purpose
_links undef none provided

get( _path, _undefined )

Returns: N/A undefined

Name Type Purpose
_path undef none provided
_undefined undef none provided

set( _path, _value, _type )

Returns: N/A undefined

Name Type Purpose
_path undef none provided
_value undef none provided
_type undef none provided

copy( _target )

Returns: N/A undefined

Name Type Purpose
_target undef none provided

remove( _key )

Returns: N/A undefined

Name Type Purpose
_key undef none provided

is( type )

Returns: boolean (true or false)

Name Type Purpose
type Constructor The Constructor to compare this against.

Returns true if the provided type is DsTree.


toString()

Returns: string ("string")

Name Type Purpose
None

Returns the structure as a string.


Variables

Jump To top
  • table - A map of the branches and leaves connected to this tree.
  • branch - Set to true to indicate this branch contains paths to other branches.
Clone this wiki locally