/// <summary> /// Constructor that takes a GameData and SolarSystem objects. /// </summary> /// <param name="passedGameData"></param> /// <param name="passedSolarSystem"></param> public SearchHandler(GameData passedGameData, SolarSystem passedSolarSystem) { _gameData = passedGameData ?? throw new NullReferenceException("passedGameData was null."); _solarSystem = passedSolarSystem ?? throw new NullReferenceException("passedSolarSystem was null."); RootNode = new SearchHandler_TN("Search", passedOwner: this, newNodeType: Base_TN_NodeType.SearchHandler); }
/// <summary> /// Constructor that takes a SearchHandler reference to it's parent. /// </summary> /// <param name="passedParent"></param> public HESearchOperator(SearchHandler passedParent, HESearchOperatorFlags passedOperatorFlags) { _parentSearchHandler = passedParent ?? throw new NullReferenceException("passedParent was null."); OperatorFlags = passedOperatorFlags; RootNode = new SearchHandler_TN(this, "SEARCHOPERATORRESULTS", passedOwner: this, newNodeType: Base_TN_NodeType.SearchResultsSet); _parentSearchHandler.RootNode.Nodes.Insert(0, RootNode); _parentSearchHandler.SearchOperators.Add(this); }