NCBI C++ ToolKit
netcache_search.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef CONNECT_SERVICES___NETCACHE_SEARCH__HPP
2 #define CONNECT_SERVICES___NETCACHE_SEARCH__HPP
3 
4 /* $Id: netcache_search.hpp 75520 2016-11-22 23:45:16Z sadyrovr $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Author: Rafael Sadyrov
30  *
31  */
32 
33 
34 #include <connect/connect_export.h>
35 #include <memory>
36 #include <chrono>
37 
38 
39 namespace ncbi {
40 namespace grid {
41 namespace netcache {
42 namespace search {
43 
44 
45 /// @internal
46 /// @{
47 
48 struct SExpressionImpl;
49 struct SBlobInfoImpl;
50 struct SExpression { shared_ptr<SExpressionImpl> impl; ~SExpression(); };
51 struct SBlobInfo { shared_ptr<SBlobInfoImpl> impl; ~SBlobInfo(); };
52 
53 /// @}
54 
55 
58 
59 
60 /// @defgroup NetCacheSearch
61 /// @{
62 
63 
64 /// Search and output fields
65 namespace fields {
66 
67 const struct KEY {KEY(){}} key;
68 const struct SUBKEY {SUBKEY(){}} subkey;
69 const struct CREATED {CREATED(){}} created;
70 const struct EXPIRES {EXPIRES(){}} expires;
72 const struct SIZE {SIZE(){}} size;
73 
74 }
75 
76 
77 using namespace fields;
78 
79 /// Search operators
80 /// @{
81 
83 
86 
91 
96 
101 
106 
111 
116 
121 
123 
124 /// @}
125 
126 
127 /// Output fields specification
128 /// @{
129 
131 {
133 
134  CFields();
135  CFields(CREATED);
136  CFields(EXPIRES);
138  CFields(SIZE);
139 };
140 
142 
143 /// @}
144 
145 
146 /// Blob info
148 {
150 
151  string operator[](KEY) const;
152  string operator[](SUBKEY) const;
153  time_point operator[](CREATED) const;
154  time_point operator[](EXPIRES) const;
155  time_point operator[](VERSION_EXPIRES) const;
156  size_t operator[](SIZE) const;
157 };
158 
159 
160 /// @}
161 
162 
163 }
164 }
165 }
166 }
167 
168 
169 #endif
CFields operator|(CFields, CFields)
CExpression operator<(CREATED, time_point)
CExpression operator>=(CREATED, time_point)
CExpression operator&&(CExpression, CExpression)
CExpression operator==(KEY, string)
CExpression operator>(time_point, CREATED)
CExpression operator<=(time_point, CREATED)
#define NCBI_XCONNECT_EXPORT
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::EXPIRES expires
const struct ncbi::grid::netcache::search::fields::CREATED created
const struct ncbi::grid::netcache::search::fields::KEY key
const struct ncbi::grid::netcache::search::fields::SUBKEY subkey
const struct ncbi::grid::netcache::search::fields::VERSION_EXPIRES version_expires
chrono::system_clock::time_point time_point
chrono::system_clock::duration duration
Magic spell ;-) needed for some weird compilers... very empiric.
Output fields specification.
shared_ptr< SExpressionImpl > impl
Modified on Wed Sep 04 14:58:57 2024 by modify_doxy.py rev. 669887