tsc_Observation

This is the base class for all observations including Points, Lines & Arcs.  The following subclasses are currently implemented:

An observation is an entity, which is a complete set of writable properties, that can be appended to a job database.  Contrast this with a tsc_Entity, which is a reference to an entity object that already exists in a job database.  After writing an observation to a database using an Append() method, calling the relevant Snapshot() method will return a list containing a reference to the new entity.

tsc_Observation is simply a reference to an internal object.  It should not be new'ed but instead just specified as an instance and also passed as an instance.  Copies of the class will point to the same observation; changes in one will affect the other.

All the properties other than the coordinate/object itself are described in this class; see the subclasses for details about the various coordinate/object types.  Each property has two methods of the same name; a getter and a setter.

Appending observations to the database

To add an observation to the database, simply fill in the properties of a tsc_Observation subclass of the required type, and pass it to Append on either tsc_JobPoints, tsc_JobLines or tsc_JobArcs to store the new point.  Some subclasses, notably tsc_CircleObservation, may require other conditions to be correctly set up in the database for the observations to produce usable coordinates.  These conditions are described with the subclass.

tsc_Observation Properties

tsc_String Name () const;
void Name (const char* name);
Gets or sets the name of the point.  The name length is not limited in most places in Trimble Access, but the name may be truncated to 16 characters in some uses. A good practical size limit is 16. UTF-8 characters are permissable.

tsc_String FeatureString () const;
Gets or sets the code string.  This is the same as the Code field in the various point forms.

void FeatureString (const char* features);
Gets or sets the notes associated with this point.  The string may contain multiple lines; lines are separated with the tsc_SurveyCore::NewLine string.

tsc_String Notes () const;
void Notes (const char* notes);
Gets the entity type of the item.  The type cannot be changed; it is determined by the subclass type.

virtual tsc_EntityType  EntityType () const;
Gets the subclass type of the item.  The type cannot be changed; it is determined by the subclass type.

virtual tsc_ObservationType  ObservationType () const;
Adds a custom sub-record to the observation.  This will become part of the entity when the observation is written to the database.  Returns false in the unlikely event of the operation failing.

bool AddCustomSubRecord (tsc_DatabaseCustomType& type);
Clears all custom sub-records that have been added to this instance.  The sub-records are also cleared when the observation is written to the database.

void ClearCustomSubRecords ();
Checks if the obsvervation is a valid one (it has a good coordinates and the necessary options are set). Returns the xcode if the observation is not valid or X_NULL if it is valid.

x_Code CheckValid () const;

Static casting functions

The observation subclasses have static casting functions which will check the type for you.  An invalid cast returns a NULL pointer.