CategoricalMap
An Origin C CategoricalMap is a dynamically allocated and sized array of text values that is not tied to an internal Origin data set. A CategoricalMap contains a set of unique and alpha-numerically sorted text values which are typically referenced by the elements of an associated object of type CategoricalData. The CategoricalMap class contains additional class methods and is not derived from the vector<string> class, so an object of type CategoricalMap is not technically equivalent to an object of type vector<string>, but the data elements of each are functionally equivalent and the types can be explicitly cast.
EX1
void CategoricalMap_ex1() { // a Worksheet with at least 1 column must exist prior to execution Worksheet wks=Project.ActiveLayer(); if (wks) { string strWksColname = wks.Columns(0).GetName(); strWksColname = wks.GetPage().GetName() + "_" + strWksColname; StringArray vMyCatMap; CategoricalData cdMyCatData(strWksColname); CategoricalMap cmMyCatMap; cmMyCatMap = cdMyCatData.Map; vMyCatMap = (StringArray) cmMyCatMap; // Requires explicit cast } }
origin.h