CategoricalMap::CategoricalMap

Description

Default constructor to create an Origin C CategoricalMap object.


Copy constructor to create a CategoricalMap from another CategoricalMap.

Syntax

CategoricalMap( )

CategoricalMap( CategoricalMap & cmMap )

Parameters

cmMap
[input] CategoricalMap object that is copied

Return

Examples

EX1

void CategoricalMap_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
    }
}


EX2

void CategoricalMap_CategoricalMap_ex2()
{
    // 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(cdMyCatData.Map);
        vMyCatMap = (StringArray) cmMyCatMap; // Requires explicit cast
    }
}

Remark

See Also

CategoricalData::CategoricalData

Header to Include

origin.h