pub struct CalcUtility {}
Expand description

The AmFn utility methods.

Implementations

The AmFn utility methods implementation.

Convert a value from the cashflow code to the event code. Cross rates are used if the exchange rate is unavailable and the cross rate international currency code is not empty.

Arguments
  • calc_mgr - Calculation manager reference.
  • cashflow_currency_code - Cashflow currency code.
  • event_currency_code - Event currency code.
  • value - The value to convert.
Return
  • See description.

Create the event type parameter list.

Arguments
  • calc_manager - Calculation manager.
  • elem_type - Type of the event.
  • elem_extension - A ElemPrincipalChange, ElemCurrentValue, ElemInterestChange, or ElemStatisticValue element.
Return
  • See description.

Evaluate all of the descriptors in the list. For each descriptor that specifies an expression, execute the expression using the list of parameters.

Arguments
  • calc_manager - Calculation manager.
  • expression - CalcExpression element.
  • list_parameter - List of parameters used with evaluation.
  • list_descriptor - List of descriptors to evaluate.

Evaluate the expression.

Arguments
  • calc_manager - Calculation manager.
  • list_parameter - List of parameters used with evaluation.
  • expression_str - The expression to evaluate.
  • cashflow - Search the cashflow preferences.
Return
  • Resulting symbol if successful, otherwise an error message in the symbol.

Get the appropriate event list value as a string.

Arguments
  • calc_manager - Calculation manager.
  • elem_column - Column element.
Return
  • See description.

Get the appropriate amortization list value as a string.

Arguments
  • calc_manager - Calculation manager.
  • elem_column - Column element.
  • list_am_opt - Amortization list.
Return
  • See description.

Normalize the expression.

Arguments
  • calc_manager - Calculation manager.
  • expression - The expression to normalize.
  • new_line - If true, format with a newline character between expressions.
Return
  • Normalized expression.

Create and return a column list object.

Arguments
  • calc_manager - Calculation manager.
  • elem_type - The type of table.
  • cashflow - Search the cashflow preferences.
Return
  • See description.

Create and return a summary list object.

Arguments
  • calc_manager - Calculation manager.
Return
  • See description.

Set the appropriate event list value and return it as a string.

Arguments
  • calc_manager - Calculation manager.
  • col_name_index - Column name index.
  • col_type - Column type.
  • col_code - Column code.
  • index - Event row index.
  • value_param - Value to set as a string.
Return
  • See description.

Set the appropriate event list extension values.

Arguments
  • calc_manager - Calculation manager.
  • index - Event row index.
  • ext_param - Extension values to set.
Return
  • True if successful, otherwise false.

Set the appropriate event list parameter values.

Arguments
  • calc_manager - Calculation manager.
  • index_param - Event row index.
  • parameters - Parameters to set.
Return
  • True if successful, otherwise false.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.