Main Page   Reference Manual   Namespace List   Compound List   Namespace Members   Compound Members   File Members  

class_object_file.h
Go to the documentation of this file.
1 // $Header$
2 //
3 // Copyright (C) 2002 - 2004, by
4 //
5 // Carlo Wood, Run on IRC <carlo@alinoe.com>
6 // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt
7 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61
8 //
9 // This file may be distributed under the terms of the Q Public License
10 // version 1.0 as appearing in the file LICENSE.QPL included in the
11 // packaging of this file.
12 //
13 
18 #ifndef LIBCWD_CLASS_OBJECT_FILE_H
19 #define LIBCWD_CLASS_OBJECT_FILE_H
20 
21 #ifndef LIBCW_STRING
22 #define LIBCW_STRING
23 #include <string>
24 #endif
25 
26 namespace libcwd {
27 
28 // Forward declarations.
29 #if CWDEBUG_ALLOC
30 class alloc_filter_ct;
31 #endif
32 namespace cwbfd {
33  class bfile_ct;
34 } // namespace cwbfd
35 
53 private:
54  char const* M_filepath; // The full path to the object file (internally allocated and leaking memory).
55  char const* M_filename; // Points inside M_filepath just after the last '/' or to the beginning.
56 #if CWDEBUG_ALLOC
57  friend class alloc_filter_ct;
58  mutable bool M_hide;
59 #endif
60  mutable bool M_no_debug_line_sections;
61 
62 protected:
63  friend class cwbfd::bfile_ct;
64  object_file_ct(char const* filepath);
65 
66 public:
68  char const* filepath() const { return M_filepath; }
70  char const* filename() const { return M_filename; }
71 
72  // For internal use.
73 #if CWDEBUG_ALLOC
74  bool hide_from_alloc_list() const { return M_hide; }
75 #endif
76  void set_has_no_debug_line_sections() const { M_no_debug_line_sections = true; }
77  bool has_no_debug_line_sections() const { return M_no_debug_line_sections; }
78 };
79  // End of group 'group_locations'
81 
82 } // namespace libcwd
83 
84 #endif // LIBCWD_CLASS_OBJECT_FILE_H
An object representing the main executable or a shared library.
Definition: class_object_file.h:52
char const * filename() const
The file name of the loaded executable or shared library (with path stripped off).
Definition: class_object_file.h:70
char const * filepath() const
The full path name of the loaded executable or shared library.
Definition: class_object_file.h:68
namespace for libcwd.
Definition: debug.cc:87
Copyright © 2001 - 2004 Carlo Wood.  All rights reserved.