[b12f64]: pp / common_option.h  Maximize  Restore  History

Download this file

78 lines (66 with data), 2.0 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/**
* @file common_option.h
* Declaration of entry point of pp tools, implementation file add common
* options of pp tools and some miscelleaneous functions
*
* @remark Copyright 2003 OProfile authors
* @remark Read the file COPYING
*
* @author John Levon
* @author Philippe Elie
*/
#ifndef COMMON_OPTION_H
#define COMMON_OPTION_H
#include <vector>
#include <list>
#include "arrange_profiles.h"
#include "demangle_symbol.h"
namespace options {
extern bool verbose;
extern double threshold;
extern std::string threshold_opt;
extern std::string command_options;
extern std::vector<std::string> image_path;
extern std::string root_path;
struct spec {
std::list<std::string> common;
std::list<std::string> first;
std::list<std::string> second;
};
}
/**
* prototype of a pp tool entry point. This entry point is called
* by run_pp_tool
*/
typedef int (*pp_fct_run_t)(options::spec const & spec);
/**
* @param argc command line number of argument
* @param argv command line argument pointer array
* @param fct function to run to start this pp tool
*
* Provide a common entry to all pp tools, parsing all options, handling
* common options and providing the necessary try catch clause
*/
int run_pp_tool(int argc, char const * argv[], pp_fct_run_t fct);
/**
* @param option one of [smart,none,normal]
*
* return the demangle_type of option or throw an exception if option
* is not valid.
*/
demangle_type handle_demangle_option(std::string const & option);
/**
* @param mergespec merge option
* @param allow_lib is merge)lib allowed in mergespec
* @param exclude_dependent user specified --exclude-dependent
*
* parse merge option and return a merge_option filled from it.
*
*/
merge_option handle_merge_option(std::vector<std::string> const & mergespec,
bool allow_lib, bool exclude_dependent);
/**
* Answer the question 'did the user pass in a session-dir argument?'.
*/
bool was_session_dir_supplied(void);
#endif /* !COMMON_OPTION_H */

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks