Use LTTngUSTLogger logger plugin in logtest regression test
[deliverable/titan.core.git] / core / Struct_of.hh
1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Baji, Laszlo
10 * Balasko, Jeno
11 * Baranyi, Botond
12 * Delic, Adam
13 * Forstner, Matyas
14 * Kovacs, Ferenc
15 * Szabados, Kristof
16 * Szabo, Janos Zoltan – initial implementation
17 *
18 ******************************************************************************/
19 #ifndef STRUCT_OF_HH
20 #define STRUCT_OF_HH
21
22 #include "Types.h"
23
24 class Base_Type;
25 #ifdef TITAN_RUNTIME_2
26 class Record_Of_Type;
27 class Set_Of_Template;
28 #endif
29 class Restricted_Length_Template;
30 class Record_Of_Template;
31
32 enum answer { FAILURE, SUCCESS, NO_CHANCE };
33 enum type_of_matching { SUBSET, EXACT, SUPERSET };
34 extern void **allocate_pointers(int n_elements);
35 extern void **reallocate_pointers(void **old_pointer, int old_n_elements,
36 int n_elements);
37 extern void free_pointers(void **old_pointer);
38
39 #ifdef TITAN_RUNTIME_2
40 typedef boolean (*compare_function_t)(const Record_Of_Type *left_ptr, int left_index,
41 const Record_Of_Type *right_ptr, int right_index);
42 #else
43 typedef boolean (*compare_function_t)(const Base_Type *left_ptr, int left_index,
44 const Base_Type *right_ptr, int right_index);
45 #endif
46
47 typedef boolean (*match_function_t)(const Base_Type *value_ptr, int value_index,
48 const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
49
50 typedef void (*log_function_t)(const Base_Type *value_ptr,
51 const Restricted_Length_Template *template_ptr, int index_value,
52 int index_template, boolean legacy);
53
54 #ifdef TITAN_RUNTIME_2
55 extern boolean compare_set_of(const Record_Of_Type *left_ptr, int left_size,
56 const Record_Of_Type *right_ptr, int right_size,
57 compare_function_t compare_function);
58 #else
59 extern boolean compare_set_of(const Base_Type *left_ptr, int left_size,
60 const Base_Type *right_ptr, int right_size,
61 compare_function_t compare_function);
62 #endif
63
64 extern boolean match_array(const Base_Type *value_ptr, int value_size,
65 const Restricted_Length_Template *template_ptr, int template_size,
66 match_function_t match_function, boolean legacy);
67
68 extern boolean match_record_of(const Base_Type *value_ptr, int value_size,
69 const Record_Of_Template *template_ptr, int template_size,
70 match_function_t match_function, boolean legacy);
71
72 extern boolean match_set_of(const Base_Type *value_ptr, int value_size,
73 const Restricted_Length_Template *template_ptr, int template_size,
74 match_function_t match_function, boolean legacy);
75
76 extern void log_match_heuristics(const Base_Type *value_ptr, int value_size,
77 const Restricted_Length_Template *template_ptr, int template_size,
78 match_function_t match_function, log_function_t log_function, boolean legacy);
79
80 boolean match_set_of_internal(const Base_Type *value_ptr,
81 int value_start, int value_size,
82 const Restricted_Length_Template *template_ptr,
83 int template_start, int template_size,
84 match_function_t match_function,
85 type_of_matching match_type,
86 int* number_of_uncovered, int* pair_list,
87 unsigned int number_of_checked, boolean legacy);
88
89 #endif
This page took 0.032485 seconds and 5 git commands to generate.