tsc_BacksightList

A backsight list contains a number of tsc_Backsight objects.  Backsights are observations which are made to known points in order to compute the position and/or the horizontal orientation of a total station.   The backsight objects should all "belong" to a single station in a survey core job database.  That is, the observations to the points should all have been made from the same station location.

Each backsight consists of the following:

Generally it is not necessary to add or remove items from the list; instead use the UseDimensions field of each backsight to control how it is being used.

Constructor

tsc_BacksightList (const tsc_Station& station);

Constructs an empty list to be used with the given station.  To obtain a fully populated list for a station, use tsc_Station::BacksightDetails().  A list may also be obtained from any subclass of tsc_StationCalculationBase.

Public methods

int Count() const;

Returns the total number of items (backsight measurements) in the list.

tsc_Backsight& operator[] (int index);

Returns a reference to any item in the list, given a zero-based index.  The item in the list may be modified by changing values in the returned reference.

const tsc_Backsight& operator[] (int index) const;

Returns a const reference to any item in the list, given a zero-based index.

tsc_PointList ObservationPoints() const;

Returns a tsc_PointList of all the backsight observations.  This is simply the same list presented as a tsc_PointList.

tsc_PointList KnownPoints() const;

Returns a list of all the known points corresponding to the observations.  The same known point may be present in this list multiple times, once for every observation to it.

int CountUsedBacksights() const;

Returns the number of backsight observations that have been (or will be) used for calculations.  That is, all the backsights with UseDimensions > 0.

int CountUniqueUsedBacksights() const;

Returns the number of unique backsight names for observations that have been (or will be) used for calculations.  This requires a copy of the list to be sorted by name and is possibly a slow operation for very large sets.

tsc_Station Station() const;

The station whose observations this list represents.

void Append (const tsc_Backsight& backsight);

Adds a copy of the backsight to the end of the list.  Do not add observations which do not belong to the list's station.

void Append (const tsc_Backsight* backsight);

Adds backsight to the list and takes ownership of it.  The list will delete the object when the item is removed or the list destroyed.  Do not add observations which do not belong to the list's station.

void Remove (const tsc_Backsight& backsight);

Removes the backsight from the list and deletes any associated memory. The match is by reference - that is, the same object (perhaps retrieved by the [] operator).

void  Remove (int index);

Removes the item at index from the list, and deletes any associated memory.