// $Id: Configuration.cs 1295 2007-05-11 16:52:51Z josd $
namespace Eulersharp
{
using System;
///
/// This class groups all euler configuration parameters
///
public class Configuration
{
#region Declarations
private static object LOCK = new object();
private static Configuration instance = null;
private bool _proofExplanation = true;
private bool _think = false;
private bool _runLocal = false;
private long _steps = -1;
#endregion
#region Constructor
///
/// This method constructs a configuration object. This constructor is private because this class
/// acts as a singleton. The only instance should be retrieved via the getInstance() method
///
private Configuration()
{
}
///
/// This method returns the only instance of this class
///
/// the only instance of this class
public static Configuration GetInstance()
{
lock(LOCK)
{
if (instance == null)
{
instance = new Configuration();
}
}
return instance;
}
#endregion
///
/// Returns the version of this eulersharp engine
///
public string Version
{
get
{
return "" + Eulersharp.Version.MAJOR + "." + Eulersharp.Version.MINOR + "." + Eulersharp.Version.BUILD;
}
}
///
/// Property to specify whether a proof explanation is wanted or not
///
public bool ProofExplanation
{
get
{
return _proofExplanation;
}
set
{
_proofExplanation = value;
}
}
///
/// Property to specify whether all results should be
/// calculated or not
///
public bool Think
{
get
{
return _think;
}
set
{
_think = value;
}
}
///
/// Property to limit the maximal number of steps to be taken by
/// the proof engine
///
public long Steps
{
get
{
return _steps;
}
set
{
_steps = value;
}
}
///
/// Property to specify whether the manifests and theories should be
/// reqeusted from the web or loaded locally
///
public bool RunLocal
{
get
{
return _runLocal;
}
set
{
_runLocal = value;
}
}
}
}