Rework ParserContext temporary list context path
This context path is used mainly for parsing list suffixes. The
implementation is kind of wonky, as list suffixes were implemented with
the old style of parsing paths, but it still worked even with the new
path parser. However, I want to implement the upcoming `move` command, I
need to parse suffixes outside the path parser. This means I need to
fill in this list context path before I parse these suffixes. The
problem was that this context path was designed so that it is easy to
fill in inside the path parser, but right now I want to use it outside
of it. Filling it in outside the path parser meant doing manual stuff to
the context path and... well, it was difficult.
The way it was done before this patch only really made sense with the
old style parsing, so one could also see this patch as eliminating
remnants of the old code. Also, this patch removes the need for
ParserContext::m_curModule, because it was only used in list suffix
parsing.
This change adds new overloads to the Schema class, obsoleting some
other ones. Right now, I want to implement the new feature, and I'm
going to be deleted unused/obsolete overloads in another patch.
Change-Id: I6264d8b4215fcbe12f79a089f199d53ebe86edbf
diff --git a/src/data_query.hpp b/src/data_query.hpp
index b2f4a33..7a54a33 100644
--- a/src/data_query.hpp
+++ b/src/data_query.hpp
@@ -24,11 +24,10 @@
public:
DataQuery(DatastoreAccess& datastore);
/*! \brief Lists all possible instances of key/value pairs for a list specified by the arguments.
- * \param location Location of the list.
- * \param node Name (and optional module name) of the list.
+ * \param listPath Path to the list (ending with a list_)
* \return A vector of maps, which represent the instances. The map is keyed by the name of the list key. The values in the map, are values of the list keys.
*/
- std::vector<ListInstance> listKeys(const dataPath_& location, const ModuleNodePair& node) const;
+ std::vector<ListInstance> listKeys(const dataPath_& listPath) const;
private:
DatastoreAccess& m_datastore;