android: Update app-specific/MIME type icons
[LibreOffice.git] / filter / source / config / cache / querytokenizer.hxx
blob0c7e79b3ddc7faf893cb3ddb412738e95b92fc35
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include <rtl/ustring.hxx>
23 #include <unordered_map>
26 namespace filter::config {
29 /** @short It can be used to split any query string (which can be used at the
30 related interface <type scope="css::container">XContainerQuery</type>)
31 into its different tokens using a fix schema.
33 @descr All queries implemented of the services
34 <ul>
35 <li><type scope="css::document">TypeDetection</type></li>
36 <li><type scope="css::document">FilterFactory</type></li>
37 <li><type scope="css::document">ExtendedTypeDetectionFactory</type></li>
38 <li><type scope="css::frame">FrameLoaderFactory</type></li>
39 <li><type scope="css::frame">ContentHandlerFactory</type></li>
40 </ul>
41 uses this schema.
43 @attention This class is not threadsafe implemented. Because it's not necessary.
44 But you have to make sure that it's not used as such :-)
46 class QueryTokenizer : public std::unordered_map< OUString, OUString >
49 // member
51 private:
53 /** @short Because the given query can contain errors,
54 it should be checked outside.
56 TODO May it's a good idea to describe the real problem
57 more detailed ...
59 bool m_bValid;
62 // interface
64 public:
66 /** @short create a new tokenizer instance with a
67 a new query.
69 @descr The given query is immediately analyzed
70 and separated into its token, which can
71 be access by some specialized method later.
73 @param sQuery
74 the query string.
76 explicit QueryTokenizer(std::u16string_view sQuery);
79 /** @short destruct an instance of this class.
81 virtual ~QueryTokenizer();
84 /** @short can be used to check if analyzing of given query
85 was successful or not.
87 bool valid() const;
90 } // namespace filter::config
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */