SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VariadicSQLParser.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2014, Oculus VR, Inc.
3 * All rights reserved.
4 *
5 * This source code is licensed under the BSD-style license found in the
6 * RakNet License.txt file in the licenses directory of this source tree. An additional grant
7 * of patent rights can be found in the RakNet Patents.txt file in the same directory.
8 *
9 */
10
11 #ifndef __VARIADIC_SQL_PARSER_H
12 #define __VARIADIC_SQL_PARSER_H
13
14 #include "DS_List.h"
15
16 #include <stdarg.h>
17
18 namespace VariadicSQLParser
19 {
20 struct IndexAndType
21 {
22 unsigned int strIndex;
23 unsigned int typeMappingIndex;
24 };
25 const char* GetTypeMappingAtIndex(int i);
26 void GetTypeMappingIndices( const char *format, DataStructures::List<IndexAndType> &indices );
27 // Given an SQL string with variadic arguments, allocate argumentBinary and argumentLengths, and hold the parameters in binary format
28 // Last 2 parameters are out parameters
29 void ExtractArguments( va_list argptr, const DataStructures::List<IndexAndType> &indices, char ***argumentBinary, int **argumentLengths );
30 void FreeArguments(const DataStructures::List<IndexAndType> &indices, char **argumentBinary, int *argumentLengths);
31 }
32
33
34 #endif