/// <summary> /// Creates a host /// </summary> public Host() { // Check the directory Host.CheckDir(); // Timer this._Timer = Stopwatch.StartNew(); // Communicator this._IO = new CommandLineCommunicator(); // Random number generator this._RNG = new CellRandom(); // Tables this._Cache = new TableStore(this); // Spools this._Store = new SpoolSpace(); this._Store.Add(GLOBAL, new Spool.HeapSpindle(GLOBAL)); // Libraries this._Libraries = new Heap <Library>(); this._Libraries.Allocate("BASE", new BaseLibrary(this)); // Engine this._Engine = new ScriptProcessor(this); // Possibly create a log writer // if (DEBUG_STATE == 1) { this._DebugWriter = new StreamWriter(DebugLogPath); } }
public RandBool(Host Host, CellRandom Source) : base(Host, null, "RANDBOOL", 0, 1) { this._Source = Source; }
public RandCString(Host Host, CellRandom Source) : base(Host, null, "RANDCSTRING", 1, 2) { this._Source = Source; }
public RandBinary(Host Host, CellRandom Source) : base(Host, null, "RANDBINARY", 1, 2) { this._Source = Source; }
public RandDouble(Host Host, CellRandom Source) : base(Host, null, "RANDDOUBLE", 0, 2) { this._Source = Source; }
public RandSingle(Host Host, CellRandom Source) : base(Host, null, "RANDSINGLE", 0, 2) { this._Source = Source; }
public RandLong(Host Host, CellRandom Source) : base(Host, null, "RANDLONG", 0, 2) { this._Source = Source; }
public RandInt(Host Host, CellRandom Source) : base(Host, null, "RANDINT", 0, 2) { this._Source = Source; }
public RandShort(Host Host, CellRandom Source) : base(Host, null, "RANDSHORT", 0, 2) { this._Source = Source; }
public LibraryRandom(Host Host) : base(Host, "RANDOM") { this._Source = Host.BaseRNG; }
public RandByte(Host Host, CellRandom Source) : base(Host, null, "RANDBYTE", 0, 2) { this._Source = Source; }
/// <summary> /// Sets the RNG seed /// </summary> /// <param name="Seed"></param> public void SetSeed(int Seed) { this._RNG = new CellRandom(Seed); }