tsc_DuplicatePointCheck

The tsc_DuplicatePointCheck class is used to check if a tsc_Observation matches other duplicate points in the database, and where necessary to show the form for choosing different actions. The supplied observation may be automatically saved to the database, based on the selected action.

Enumeration

enum tsc_DuplicatePointCheck_Action
{
    tsc_DuplicatePointCheck_Action_Discard,
// The observation is discarded

    tsc_DuplicatePointCheck_Action_Rename,  
// The observation is renamed and appended to the database.

    tsc_DuplicatePointCheck_Action_Check,
// The observation class is changed to Check and appended to the database.
    tsc_DuplicatePointCheck_Action_Overwrite,
// The old point is marked as deleted and the new observation is appended to the database.

    tsc_DuplicatePointCheck_Action_StoreAnother,
// The new observation is appended to the database unchanged.

  tsc_DuplicatePointCheck_Action_StoreAndReorient,
  // The backsight observation and a new BackBearing record with the same coordinates are appended to the database.

tsc_DuplicatePointCheck_Action_CombineFaces,
// The new observation is saved to database unchanged (face1/face2 pair).

tsc_DuplicatePointCheck_Action_Average,
// The new observation and the averaged coordinates are appended to the database.

tsc_DuplicatePointCheck_Action_AutoAverage,
// The new observation and the averaged coordinates are appended to the database.

tsc_DuplicatePointCheck_Action_MaxAction,
// Unused.  Marks the last entry in the enumeration.

};

Subclasses

class tsc_DuplicatePointCheck_ActionList
{
public:
    virtual int Count() const = 0;
    // Get the number of actions in the list.

    virtual tsc_DuplicatePointCheck_Action  Get(int index) const = 0;
    // Get action from given index. 0 to Count-1

};

Methods

tsc_DuplicatePointCheck_ActionList* GetActions();
Gets a list of the actions that are valid for this observation.

tsc_DuplicatePointCheck_Action  DoCheck();
Performs the check and return the chosen action code

Note: The observation will automatically be saved to database base on the action.