get_Format Method

WRAPPER_API const wchar_t *get_Format() const

 

Description

The get_Format method returns a string that indicates the current string format used by the FromString and ToString methods.  For a description of the various supported string formats, click here.

 

Example

void LinearValue_getFormat(GeoCalcPBW::ProjectedPoint & pt)

{

CString description;

description += "ProjectedPoint value:\n";

if(CString(_tochar(pt.get_North().get_Format()).c_str()) == CString("MGRS"))

{

description += "MGRS = ";

description += _tochar(pt.get_North().ToString());

}

else

{

description += _tochar(pt.get_North().get_Label()).c_str();

description += " = ";

char * val = new char[10];

sprintf(val, "%lf", pt.get_North().get_InUnits());

description += val;

description += " ";

description += _tochar(pt.get_North().get_Units().get_Abbreviation()).c_str();

description += "\n";

description += _tochar(pt.get_East().get_Label()).c_str();

description += " = ";

sprintf(val, "%lf", pt.get_East().get_InUnits());

description += val;

description += " ";

description += _tochar(pt.get_East().get_Units().get_Abbreviation()).c_str();

delete [] val;

}

AfxMessageBox(description);

}