From Star Ruler

Revision as of 09:12, 21 March 2012 by Cartman34 (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

File:Scr_both.png SysSearchSettings@

A class to defer system search process, to use with SysSearchCallback.


bool searchFinished
True if this search is finished.


File:Scr_both.png SysSearchSettings methods

void opAssign( File:Scr_both.png SysSearchSettings& other)
Imports settings from other. (Requires clarifications)
void setCallback( File:Scr_both.png string@ cb)
Set callback using string.(function or class name ?)
void setCallback( File:Scr_both.png SysSearchCallback@ cb)
Set callback to an instance of SysSearchCallback, use inheritance.
void addEmpire(const File:Scr_both.png Empire@ emp)
Adds the empire to the search. It may be a filter.
void addEmpire(const File:Scr_both.png Empire@ emp, uint i)
Adds the empire to the search at the offset i.
File:Scr_both.png Empire@ getEmpire(uint i) const
Gets the empire at offset i.
File:Scr_both.png 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( File:Scr_both.png vector@ v)
Sets the search position to v.
void resetSearchPos()
Resets the search position.
void setAvoidSystem( File:Scr_both.png 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).
File:Scr_both.png 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.
Personal tools