using Jace.Execution;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
namespace Jace
{
public class JaceOptions
{
internal const int DefaultCacheMaximumSize = 500;
internal const int DefaultCacheReductionSize = 50;
public JaceOptions()
{
CultureInfo = CultureInfo.CurrentCulture;
ExecutionMode = ExecutionMode.Compiled;
CacheEnabled = true;
OptimizerEnabled = true;
CaseSensitive = false;
DefaultFunctions = true;
DefaultConstants = true;
CacheMaximumSize = DefaultCacheMaximumSize;
CacheReductionSize = DefaultCacheReductionSize;
}
///
/// The required for correctly reading floating poin numbers.
///
public CultureInfo CultureInfo { get; set; }
///
/// The execution mode that must be used for formula execution.
///
public ExecutionMode ExecutionMode { get; set; }
///
/// Enable or disable caching of mathematical formulas.
///
public bool CacheEnabled { get; set; }
///
/// Configure the maximum cache size for mathematical formulas.
///
public int CacheMaximumSize { get; set; }
///
/// Configure the cache reduction size for mathematical formulas.
///
public int CacheReductionSize { get; set; }
///
/// Enable or disable optimizing of formulas.
///
public bool OptimizerEnabled { get; set; }
///
/// Enable or disable converting to lower case. This parameter is the inverse of .
///
[Obsolete]
public bool AdjustVariableCase {
get
{
return !CaseSensitive;
}
set
{
CaseSensitive = !value;
}
}
///
/// Enable case sensitive or case insensitive processing mode.
///
public bool CaseSensitive { get; set; }
///
/// Enable or disable the default functions.
///
public bool DefaultFunctions { get; set; }
///
/// Enable or disable the default constants.
///
public bool DefaultConstants { get; set; }
}
}