• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * @file abi.h
3  *
4  * Contains internal ABI management class
5  *
6  * @remark Copyright 2002 OProfile authors
7  * @remark Read the file COPYING
8  *
9  * @author Graydon Hoare
10  */
11 
12 #ifndef OPROF_ABI_H
13 #define OPROF_ABI_H
14 
15 #include <string>
16 #include <map>
17 #include <iosfwd>
18 
19 struct abi_exception : std::exception {
20 	std::string const desc;
21 
22 	explicit abi_exception(std::string const d);
23 
throwabi_exception24 	~abi_exception() throw() {}
25 };
26 
27 
28 class abi {
29 public:
30 	abi();
31 
32 	int need(std::string const key) const throw (abi_exception);
33 
34 	bool operator==(abi const & other) const;
35 	friend std::ostream & operator<<(std::ostream & o, abi const & abi);
36 	friend std::istream & operator>>(std::istream & i, abi & abi);
37 
38 private:
39 	std::map<std::string, int> slots;
40 };
41 
42 #endif // OPROF_ABI_H
43