Package SCons :: Module PathList :: Class _PathList
[show private | hide private]
[frames | no frames]

Class _PathList


An actual PathList object.


Method Summary
  __init__(self, pathlist)
Initializes a PathList object, canonicalizing the input and pre-processing it for quicker substitution later.
  __getitem__(self, i)
  __len__(self)
  subst_path(self, env, target, source)
Performs construction variable substitution on a pre-digested PathList for a specific target and source.

Method Details

__init__(self, pathlist)
(Constructor)

Initializes a PathList object, canonicalizing the input and pre-processing it for quicker substitution later.

The stored representation of the PathList is a list of tuples containing (type, value), where the "type" is one of the TYPE_* variables defined above. We distinguish between:

strings that contain no '$' and therefore need no delayed-evaluation string substitution (we expect that there will be many of these and that we therefore get a pretty big win from avoiding string substitution)

strings that contain '$' and therefore need substitution (the hard case is things like '${TARGET.dir}/include', which require re-evaluation for every target + source)

other objects (which may be something like an EntryProxy that needs a method called to return a Node)

Pre-identifying the type of each element in the PathList up-front and storing the type in the list of tuples is intended to reduce the amount of calculation when we actually do the substitution over and over for each target.

subst_path(self, env, target, source)

Performs construction variable substitution on a pre-digested PathList for a specific target and source.


Generated by Epydoc 2.1 on Wed Dec 12 09:39:31 2007 http://epydoc.sf.net