1.3.3 Composite Data Types Class

The following classes are composite data types classes. For more details, please refer to the Origin C: Origin C Reference: Classes: Composite Data Types chapter in the help document of OriginC.

Class Brief Description
CategoricalData

A data set of CategoricalData type is an array of integers. This array is tied to an internal Origin data set of Text type, and will be allocated and sized dynamically. A data set of this type maps the text values to categories by referring to indices (1 based offset). The text values of mapping indices are stored in the data member of CategoricalMap.

CategoricalMap

A data set of CategoricalMap type is an array of text values. This array will be allocated and sized dynamically, but not tied to any internal Origin data set. This data set contains a set of unique text values, which are sorted alpha-numerically and typically referenced by the elements of the associated object of CategoricalData type.

complex

This class is used to handle number data of complex type. It contains both the Real part and Imaginary part of the complex number.

Curve

This class is derived from the curvebase and vectorbase classes, whose methods and properties it inherits. An object of Curve type can be plotted using methods defined in the GraphLayer class easily, and it is comprised of a Y data set and, typically (but not necessarily), an associated X data set. For example, a data set plotted against row numbers will not contain an associated X data set.

curvebase

This class, which is derived from the vectorbase class, from which it inherits methods and properties, is an abstract base class and is used to handle the classes of Curve type, polymorphically. So objects of curvebase type cannot be constructed, and a derived class, such as Curve, should be used instead.

Dataset

This class is derived from the vector and vectorbase classes, and it inherits their methods and properties. A Dataset is an array, which is allocated and sized dynamically. It can be tied or not tied to an internal Origin data set. By default, the Dataset is of type double, but it can also be of any basic data type, including char, byte, short, word, int, uint and complex (but not string). The syntax Dataset<type> can be used to construct these types of Dataset.

Matrix

This class is derived from the matrix and matrixbase classes, from which it inherits methods and properties. A Matrix (upper case M) is a two-dimensional array, which is allocated and sized dynamically, and tied to an internal Origin matrix window. The default type of a Matrix is double, but any basic data type is allowed as well, including char, byte, short, word, int, uint and complex (but not string). The syntax Matrix<type> is used to construct these types of Matrix.

This class is used to access the data in the internal Origin matrix, while the MatrixObject class is used to control the style of the matrix. That is to say, the relationship between the MatrixObject and Matrix classes is the same as the one between the Column and Dataset classes.

The data values displayed in the cells of the Origin matrix (referenced by a Matrix object) are typically referred to, in the worksheet, as Z values, whose associated X and Y values are linearly mapped to the columns and rows of the matrix, respectively.

matrix

This class is derived from the matrixbase class, from which it inherits methods and properties. A matrix (lower case m) is a two-dimensional array, which is allocated and sized dynamically, and is not tied to any internal Origin matrix window, which provides more flexibility. The default type of a matrix is double, but any basic data type can be used as well, including char, byte, short, word, int, uint and complex (but not string). The syntax matrix<type> is used to construct these types of matrix.

matrixbase

This class is an abstract base class for handling the matrix and Matrix class types polymorphically. Thus, objects of matrixbase type cannot be constructed, and objects of its derived classes, such as matrix and Matrix, should be used instead.

PropertyNode

This class is only used for including the properties of different data types, such as Bool, int, float, double, string, vector, matrix, and picture, etc.

string

This class is used to construct a null terminated array of characters, which is similar to an MFC CString object. A lot of methods for manipulating strings (text data) are defined in this class. It can also be used together with the vector class by syntax vector<string> to define string arrays.

Tree

This class is used to save Origin C trees as XML files, as well as to load XML files to Origin C trees.

TreeNode

This class provides several methods for constructing multilevel trees, traversing trees and accessing the attributes of tree nodes.

TreeNodeCollection

This class is used to get a collection of child tree nodes with an enumerative name prefix.

vectorbase

This class is an abstract base class used for handling objects of vector and Dataset types polymorphically. Thus, objects of this type cannot be constructed, and objects of its derived classes, such as vector and Dataset, should be used instead.

vector

This class is derived from the vectorbase class, from which it inherits methods and properties. A vector is an array, which is allocated and sized dynamically, and not tied to any internal Origin data set, which allows for more flexibility. The default type of vector is double, but other basic data types are also allowed, including char, byte, short, word, int, uint, complex, and string. The syntax vector<type> can be used to construct these types of vector.