Example #1
0
	void Trie::GetAllItem(const Location& node, const Location& location, std::vector<std::string>& result){
		protocol::Node info;
		if (!storage_load(node, info)){
			return;
		}
		Location common = CommonPrefix(node, location);
		if (common == location){
			StorageAssociated(node, result);
			return;
		}

		if (common == node){
			int nextbranch = NextBranch(common, location);
			Location location2 = info.children(nextbranch).sublocation();
			GetAllItem(location2, location, result);
		}

	}
	VMenu &ListBox() { return *GetAllItem()[0].ListPtr; }
Example #3
0
	void Trie::GetAll(const std::string& key, std::vector<std::string>& values){
		Location location = Key2Location(key);
		Location node = Key2Location("");
		GetAllItem(node, location, values);
	}