Struct amfnengine::engine::calc_utility::CalcUtility
[−]pub struct CalcUtility {}
Expand description
The AmFn utility methods.
Implementations
impl CalcUtility
impl CalcUtility
The AmFn utility methods implementation.
pub fn convert_currency_event(
calc_mgr: &Ref<'_, CalcManager>,
cashflow_currency_code: &str,
event_currency_code: &str,
value: Decimal
) -> Decimal
pub fn convert_currency_event(
calc_mgr: &Ref<'_, CalcManager>,
cashflow_currency_code: &str,
event_currency_code: &str,
value: Decimal
) -> Decimal
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.
pub fn create_event_type_list_parameter(
calc_manager: &Rc<RefCell<CalcManager>>,
elem_type: ExtensionType,
elem_extension: &ElemExtension
) -> ListParameter
pub fn create_event_type_list_parameter(
calc_manager: &Rc<RefCell<CalcManager>>,
elem_type: ExtensionType,
elem_extension: &ElemExtension
) -> ListParameter
pub fn evaluate_descriptors(
calc_manager: &Rc<RefCell<CalcManager>>,
expression: &RefCell<CalcExpression>,
list_parameter: &ListParameter,
list_descriptor: &ListDescriptor
)
pub fn evaluate_descriptors(
calc_manager: &Rc<RefCell<CalcManager>>,
expression: &RefCell<CalcExpression>,
list_parameter: &ListParameter,
list_descriptor: &ListDescriptor
)
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.
pub fn evaluate_expression(
calc_manager: &Rc<RefCell<CalcManager>>,
list_parameter: Option<&ListParameter>,
expression_str: &str,
cashflow: bool
) -> ElemSymbol
pub fn evaluate_expression(
calc_manager: &Rc<RefCell<CalcManager>>,
list_parameter: Option<&ListParameter>,
expression_str: &str,
cashflow: bool
) -> ElemSymbol
pub fn get_event_value(
calc_manager: &Rc<RefCell<CalcManager>>,
elem_column: &ElemColumn
) -> String
pub fn get_event_value(
calc_manager: &Rc<RefCell<CalcManager>>,
elem_column: &ElemColumn
) -> String
pub fn get_am_value(
calc_manager: &Rc<RefCell<CalcManager>>,
elem_column: &ElemColumn,
list_am: &ListAmortization
) -> String
pub fn get_am_value(
calc_manager: &Rc<RefCell<CalcManager>>,
elem_column: &ElemColumn,
list_am: &ListAmortization
) -> String
pub fn normalize_expression(
calc_manager: &Rc<RefCell<CalcManager>>,
expression: &str,
new_line: bool
) -> String
pub fn normalize_expression(
calc_manager: &Rc<RefCell<CalcManager>>,
expression: &str,
new_line: bool
) -> String
pub fn parse_columns(
calc_manager: &Rc<RefCell<CalcManager>>,
elem_type: TableType,
cashflow: bool
) -> ListColumn
pub fn parse_columns(
calc_manager: &Rc<RefCell<CalcManager>>,
elem_type: TableType,
cashflow: bool
) -> ListColumn
pub fn parse_summary(calc_manager: &Rc<RefCell<CalcManager>>) -> ListSummary
pub fn parse_summary(calc_manager: &Rc<RefCell<CalcManager>>) -> ListSummary
pub fn set_event_value(
calc_manager: &Rc<RefCell<CalcManager>>,
col_name_index: usize,
col_type: &str,
col_code: &str,
index: usize,
value_param: &str
) -> String
pub fn set_event_value(
calc_manager: &Rc<RefCell<CalcManager>>,
col_name_index: usize,
col_type: &str,
col_code: &str,
index: usize,
value_param: &str
) -> String
pub fn set_extension_values(
calc_manager: &Rc<RefCell<CalcManager>>,
index: usize,
ext_param: &ElemExtension
) -> bool
pub fn set_extension_values(
calc_manager: &Rc<RefCell<CalcManager>>,
index: usize,
ext_param: &ElemExtension
) -> bool
pub fn set_parameter_values(
calc_manager: &Rc<RefCell<CalcManager>>,
index_param: usize,
parameters: Vec<String>
) -> bool
pub fn set_parameter_values(
calc_manager: &Rc<RefCell<CalcManager>>,
index_param: usize,
parameters: Vec<String>
) -> bool
Auto Trait Implementations
impl RefUnwindSafe for CalcUtility
impl Send for CalcUtility
impl Sync for CalcUtility
impl Unpin for CalcUtility
impl UnwindSafe for CalcUtility
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more