Class:SysSearchSettings
From Star Ruler
A class to defer system search process, to use with SysSearchCallback.
Members
- bool searchFinished
- True if this search is finished.
Methods
- void opAssign(
SysSearchSettings& other) - Imports settings from other. (Requires clarifications)
- void setCallback(
string@ cb) - Set callback using string.(function or class name ?)
- void setCallback(
SysSearchCallback@ cb) - Set callback to an instance of SysSearchCallback, use inheritance.
- void addEmpire(const
Empire@ emp) - Adds the empire to the search. It may be a filter.
- void addEmpire(const
Empire@ emp, uint i) - Adds the empire to the search at the offset i.
-
Empire@ getEmpire(uint i) const - Gets the empire at offset i.
-
Empire@ getEmpire(uint i, uint& j) const - Gets the empire at offset i, using j (unknown).
- uint get_empireCount()
- Gets the count of empire registered in this search.
- void setSearchPos(
vector@ v) - Sets the search position to v.
- void resetSearchPos()
- Resets the search position.
- void setAvoidSystem(
System@ sys) - Adds a filter to avoid this system.
- void findBestSystem()
- Launches the search to find the best system, with the maximum score returned by the callback (call() in SysSearchCallback).
-
System@ getBestSystem() - When search is finished, it returns the best system found.
- bool get_searchFinished()
- Returns true if the search is finished.
- void clearValues()
- Clears all values.
- void clearEmpires()
- Clears all registered empires.
