ScopeListclass | query.t[906]

A ScopeList is a helper object used to build the list of objects in scope. This object provides methods for the common ways of adding objects to scope.

The ScopeList isn't a true Collection object, but it mimics one by providing most of the standard methods. You can use length() and the [] operator to scan the list, perform a foreach or for..in loop with a ScopeList to iterate over the items in scope, you can use find() to check if a given object is in scope, and you can use subset() to get a list of in-scope objects satisfying some condition.

`class ScopeList : object`

Superclass Tree (in declaration order)

`ScopeList`
`object`

Subclass Tree

(none)

Global Objects

(none)

Summary of Properties

`status_ vec_`

Summary of Methods

`add addAll addOnly addSelfIlluminatingWithin addWithin close createIterator createLiveIterator find length subset toList`

Properties

`status_` | `query.t[1028]`

A LookupTable with the objects already added to the list. We use this to avoid redundantly scanning containment trees for objects that we've already added. For each object, we set status_[obj] to a status indicator:

nil (unset) - the object has never been visited
1 - we've added the object only, not its contents
2 - we've added the object and its contents

`vec_` | `query.t[1016]`

a vector with the objects in scope

Methods

`add (obj)` | `query.t[910]`

Add an object and its contents to the scope.

`addAll (lst)` | `query.t[940]`

Add all of the objects in the given list

`addOnly (obj)` | `query.t[968]`

Add a single object to the scope. This doesn't add anything related to the object (such as its contents) - just the object itself.

`addSelfIlluminatingWithin (obj)` | `query.t[958]`

add each self-illuminating object in the interior contents

`addWithin (obj)` | `query.t[950]`

Add the interior contents of an object to the scope. This adds only the contents, not the object itself.

`close ( )` | `query.t[988]`

"close" the scope list - this converts the vector to a list

`createIterator ( )` | `query.t[1010]`

create an iterator, for foreach()

`createLiveIterator ( )` | `query.t[1013]`

create a live iterator

`find (obj)` | `query.t[1001]`

is the given object in scope?

`length ( )` | `query.t[995]`

get the number of items in scope

`subset (func)` | `query.t[1004]`

get the subset of the objects in scope matching the given condition

`toList ( )` | `query.t[1007]`

return the scope as a simple list of objects

Adv3Lite Library Reference Manual
Generated on 28/03/2016 from adv3Lite version 1.5