tsc_RoundsControl

tsc_RoundsControl allows developers to place the rounds structural records into the database.  These records are used by office software products to identify the observations used for round calculations.  The records themselves do not affect Survey Core.

A count of the number of rounds in each set is kept and incremented as required.

Member functions

bool RoundsInProgress();
Returns true if rounds are in progress, either by this caller or some other.

bool RoundInProgress();
Returns true if a round is in progress, either by this caller or some other.

bool StartRounds();
Starts a rounds set.  If we have already started or some other task is performing rounds then this will return false.

bool EndRounds();
Ends the current rounds set, if one was started by the plugin.

bool StartRound();
Starts an individual round, or does nothing and returns false if rounds have not been started by the plugin.

bool EndRound();
Ends an the current individual round.

int  CurrentRound();
Returns the number of the round currently being done, or -1 if no round is in progress.

Database contents

Records are placed in the database in the following structure:

<Start Rounds>

    <Start Round 1>

        ...observations..

    <End Round>

    ...

    <Start Round n>

        ...observations

    <End Round>

<End Rounds>

...