Use LTTngUSTLogger logger plugin in logtest regression test
[deliverable/titan.core.git] / core / Struct_of.hh
CommitLineData
d44e3c4f 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 ******************************************************************************/
970ed795
EL
19#ifndef STRUCT_OF_HH
20#define STRUCT_OF_HH
21
22#include "Types.h"
23
24class Base_Type;
25#ifdef TITAN_RUNTIME_2
26class Record_Of_Type;
27class Set_Of_Template;
28#endif
29class Restricted_Length_Template;
30class Record_Of_Template;
31
32enum answer { FAILURE, SUCCESS, NO_CHANCE };
33enum type_of_matching { SUBSET, EXACT, SUPERSET };
34extern void **allocate_pointers(int n_elements);
35extern void **reallocate_pointers(void **old_pointer, int old_n_elements,
36 int n_elements);
37extern void free_pointers(void **old_pointer);
38
39#ifdef TITAN_RUNTIME_2
40typedef 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
43typedef boolean (*compare_function_t)(const Base_Type *left_ptr, int left_index,
44 const Base_Type *right_ptr, int right_index);
45#endif
46
47typedef boolean (*match_function_t)(const Base_Type *value_ptr, int value_index,
3abe9331 48 const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
970ed795
EL
49
50typedef void (*log_function_t)(const Base_Type *value_ptr,
3abe9331 51 const Restricted_Length_Template *template_ptr, int index_value,
52 int index_template, boolean legacy);
970ed795
EL
53
54#ifdef TITAN_RUNTIME_2
55extern 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
59extern 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
64extern boolean match_array(const Base_Type *value_ptr, int value_size,
65 const Restricted_Length_Template *template_ptr, int template_size,
3abe9331 66 match_function_t match_function, boolean legacy);
970ed795
EL
67
68extern boolean match_record_of(const Base_Type *value_ptr, int value_size,
69 const Record_Of_Template *template_ptr, int template_size,
3abe9331 70 match_function_t match_function, boolean legacy);
970ed795
EL
71
72extern boolean match_set_of(const Base_Type *value_ptr, int value_size,
73 const Restricted_Length_Template *template_ptr, int template_size,
3abe9331 74 match_function_t match_function, boolean legacy);
970ed795
EL
75
76extern void log_match_heuristics(const Base_Type *value_ptr, int value_size,
77 const Restricted_Length_Template *template_ptr, int template_size,
3abe9331 78 match_function_t match_function, log_function_t log_function, boolean legacy);
970ed795
EL
79
80boolean 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,
3abe9331 87 unsigned int number_of_checked, boolean legacy);
970ed795
EL
88
89#endif
This page took 0.030862 seconds and 5 git commands to generate.