tsc_Object

tsc_Object is the base class for nearly all classes in the API.  It can also be used as a base class for any other object to allow it to be used for a variety of purposes, such as locking using tsc_Lock or handling events using one of the monitor interfaces.

Public methods

virtual class tsc_String ToString() const;
This overridable method is used by some functions (such as tsc_String::Format()) to obtain a string representation of a class.  If ToString() is not overidden by the subclass, the base class will return the string "{tsc_Object}".

Developers may find it useful to overload this method and output some identifying string, since the API often includes the ToString value when displaying error messages about objects.

virtual int _tsc_Version () const { return -1; };
This method is for internal use by the API ONLY.  Some API classes override it to provide Survey Core with an API class version number. It is used to identify the version of the object and thereby determine if a virtual callback function (event handler) is present before it is called.

Plugins must never override this method when subclassing from any API object, although calling it is permissible and possibly useful.