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

libcwd/class_object_file.h

Go to the documentation of this file.
00001 // $Header$
00002 //
00003 // Copyright (C) 2002 - 2004, by
00004 // 
00005 // Carlo Wood, Run on IRC <carlo@alinoe.com>
00006 // RSA-1024 0x624ACAD5 1997-01-26                    Sign & Encrypt
00007 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6  F6 F6 55 DD 1C DC FF 61
00008 //
00009 // This file may be distributed under the terms of the Q Public License
00010 // version 1.0 as appearing in the file LICENSE.QPL included in the
00011 // packaging of this file.
00012 //
00013 
00018 #ifndef LIBCWD_CLASS_OBJECT_FILE_H
00019 #define LIBCWD_CLASS_OBJECT_FILE_H
00020 
00021 #ifndef LIBCW_STRING
00022 #define LIBCW_STRING
00023 #include <string>
00024 #endif
00025 
00026 namespace libcwd {
00027 
00028 // Forward declarations.
00029 #if CWDEBUG_ALLOC
00030 class alloc_filter_ct;
00031 #endif
00032 namespace cwbfd {
00033   class bfile_ct;
00034 } // namespace cwbfd
00035 
00052 class object_file_ct {
00053 private:
00054   char const* M_filepath;       // The full path to the object file (internally allocated and leaking memory).
00055   char const* M_filename;       // Points inside M_filepath just after the last '/' or to the beginning.
00056 #if CWDEBUG_ALLOC
00057   friend class alloc_filter_ct;
00058   mutable bool M_hide;
00059 #endif
00060   mutable bool M_no_debug_line_sections;
00061 
00062 protected:
00063   friend class cwbfd::bfile_ct;
00064   object_file_ct(char const* filepath);
00065 
00066 public:
00068   char const* filepath(void) const { return M_filepath; }
00070   char const* filename(void) const { return M_filename; }
00071 
00072   // For internal use.
00073 #if CWDEBUG_ALLOC
00074   bool hide_from_alloc_list() const { return M_hide; }
00075 #endif
00076   void set_has_no_debug_line_sections(void) const { M_no_debug_line_sections = true; }
00077   bool has_no_debug_line_sections(void) const { return M_no_debug_line_sections; }
00078 };
00079  // End of group 'group_locations'
00081 
00082 } // namespace libcwd
00083 
00084 #endif // LIBCWD_CLASS_OBJECT_FILE_H
Copyright © 2001 - 2004 Carlo Wood.  All rights reserved.