1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-16 16:10:58 +00:00
OpenMW/apps/openmw/mwlua/query.hpp
2021-07-09 20:48:54 +02:00

40 lines
1.1 KiB
C++

#ifndef MWLUA_QUERY_H
#define MWLUA_QUERY_H
#include <string>
#include <components/queries/query.hpp>
#include "context.hpp"
#include "object.hpp"
namespace MWLua
{
struct ObjectQueryTypes
{
static constexpr std::string_view ACTIVATORS = "activators";
static constexpr std::string_view ACTORS = "actors";
static constexpr std::string_view CONTAINERS = "containers";
static constexpr std::string_view DOORS = "doors";
static constexpr std::string_view ITEMS = "items";
static constexpr std::string_view types[] = {ACTIVATORS, ACTORS, CONTAINERS, DOORS, ITEMS};
};
struct QueryFieldGroup
{
std::string mName;
std::vector<const Queries::Field*> mFields;
};
const std::vector<QueryFieldGroup>& getBasicQueryFieldGroups();
// TODO: Implement custom fields. QueryFieldGroup registerCustomFields(...);
ObjectIdList selectObjectsFromList(const Queries::Query& query, const ObjectIdList& list, const Context&);
ObjectIdList selectObjectsFromCellStore(const Queries::Query& query, MWWorld::CellStore* store, const Context&);
}
#endif // MWLUA_QUERY_H