Merge "fixed self-ref check to no longer display errors for omit values (bug 498430)"
[deliverable/titan.core.git] / compiler2 / tcov2lcov.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 * Balasko, Jeno
10 * Kovacs, Ferenc
11 * Raduly, Csaba
12 *
13 ******************************************************************************/
14 #ifndef TCOV2LCOV_HH
15 #define TCOV2LCOV_HH
16
17 #include <string>
18 #include <map>
19 #include <vector>
20
21 // File specific data.
22 class TcovData
23 {
24 public:
25 void inc_function(const std::string& function, int n);
26 void inc_line(int line, int n);
27 inline const std::map<std::string, int>& get_functions() const { return m_functions; }
28 inline const std::map<int, int>& get_lines() const { return m_lines; }
29 private:
30 std::map<std::string, int> m_functions;
31 std::map<int, int> m_lines;
32 };
33
34 class Tcov2Lcov {
35 public:
36 Tcov2Lcov(const char *code_base, const char *input_dir, const char *output_file, const char *xsd_file);
37 ~Tcov2Lcov();
38 int collect();
39 int validate() const;
40 int merge();
41 int generate();
42 void d_print_files() const;
43 private:
44 int collect_dir(std::string dir);
45
46 std::map<std::string, TcovData *> m_data;
47 std::vector<std::string> m_files; // Relative paths.
48 std::string m_code_base;
49 std::string m_input_dir;
50 std::string m_output_file;
51 std::string m_xsd_file;
52 int m_ver_major;
53 int m_ver_minor;
54 };
55
56 #endif // TCOV2LCOV_HH
57
This page took 0.031015 seconds and 5 git commands to generate.