OLD | NEW |
1 /** | 1 /** |
2 * \file database.h MSI database | 2 * \file database.h MSI database |
3 */ | 3 */ |
4 | 4 |
5 #ifndef DATABASE_H | 5 #ifndef DATABASE_H |
6 #define DATABASE_H | 6 #define DATABASE_H |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 //------------------------------------------------------- | 133 //------------------------------------------------------- |
134 /* | 134 /* |
135 * The MSI database is accessible through a cut-down version of SQL. | 135 * The MSI database is accessible through a cut-down version of SQL. |
136 * There's no distinction between view and query in this dialect. | 136 * There's no distinction between view and query in this dialect. |
137 * | 137 * |
138 * \sa | 138 * \sa |
139 * - MSDN [Working with Queries](http://msdn.microsoft.com/en-us/library/aa3728
79%28v=vs.85%29.aspx) | 139 * - MSDN [Working with Queries](http://msdn.microsoft.com/en-us/library/aa3728
79%28v=vs.85%29.aspx) |
140 */ | 140 */ |
141 class View | 141 class View |
142 { | 142 { |
143 /** | 143 typedef handle< MSIHANDLE, Disallow_Null, MSI_Generic_Destruction > handle_typ
e ; |
144 * Policy class to close a view handle. | |
145 * View handles don't get closed with the generic close function for other MSI
handles. | |
146 */ | |
147 template< class T > | |
148 struct View_Destruction | |
149 { | |
150 /** | |
151 * \sa MSDN [MsiViewClose function](http://msdn.microsoft.com/en-us/library/a
a370510%28v=vs.85%29.aspx) | |
152 */ | |
153 inline static void close( T handle ) | |
154 { | |
155 ::MsiViewClose( handle ) ; | |
156 } | |
157 } ; | |
158 | |
159 typedef handle< MSIHANDLE, Disallow_Null, View_Destruction > handle_type ; | |
160 | 144 |
161 /** | 145 /** |
162 * Handle for the MSI view object | 146 * Handle for the MSI view object |
163 */ | 147 */ |
164 handle_type _handle; | 148 handle_type _handle; |
165 | 149 |
166 public: | 150 public: |
167 /** | 151 /** |
168 * Ordinary constructor | 152 * Ordinary constructor |
169 */ | 153 */ |
(...skipping 25 matching lines...) Expand all Loading... |
195 * End marker | 179 * End marker |
196 */ | 180 */ |
197 inline Record end() | 181 inline Record end() |
198 { | 182 { |
199 return Record( Record::null_t() ) ; | 183 return Record( Record::null_t() ) ; |
200 } | 184 } |
201 } ; | 185 } ; |
202 | 186 |
203 | 187 |
204 #endif | 188 #endif |
OLD | NEW |