WRAPPER_API bool AddScalarItem(const BmgChar *name, bool optional = false)
The AddScalarItem method adds a new scalar parameter to the ParameterCollection. The method takes two arguments, the first of which gives the name of the parameter. The second argument is optional, and it indicates if the parameter is an optional or a required parameter. The method returns a boolean value indicating the success of the operation. The value of the added parameter is an ScalarValue that represents 0 meters. This value can be set with the set_ScalarItem method.
void ParameterCollection_AddScalarItem()
{
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;
}