get_ScalarItem Method

WRAPPER_API ScalarValue *get_ScalarItem(const BmgChar *name) const

 

Description

The get_ScalarItem method returns the value of the specified scalar parameter.  If the specified name does not correspond to parameter in this ParameterCollection, a GeoCalcException will be thrown with an ErrorCode indicating ParameterNotFound.  If the specified name corresponds to a parameter with a value that is not represented by a scalar, a GeoCalcException will be thrown with an ErrorCode indicating ParameterTypeMismatch.

 

Example

void ParameterCollection_getScalarItem()

{

GEOCALCPBW_NAMESPACE::ParameterCollection pc;

 

BmgChar * scalarParName = L"ScalarParameter";

GEOCALCPBW_NAMESPACE::ScalarValue scalarVal;

pc.AddScalarItem(scalarParName);

pc.set_ScalarItem(scalarParName, scalarVal);

GEOCALCPBW_NAMESPACE::ScalarValue * sv = pc.get_ScalarItem(scalarParName);

delete sv;

}