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.
00001 // $Header: /cvsroot/libcwd/libcwd/include/libcwd/class_object_file.h,v 1.6 2004/07/12 11:33:55 libcw Exp $
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 
00043 class object_file_ct {
00044 private:
00045   char const* M_filepath;       // The full path to the object file (internally allocated and leaking memory).
00046   char const* M_filename;       // Points inside M_filepath just after the last '/' or to the beginning.
00047 #if CWDEBUG_ALLOC
00048   friend class alloc_filter_ct;
00049 #endif
00050   bool M_hide;
00051   mutable bool M_no_debug_line_sections;
00052 
00053 protected:
00054   friend class cwbfd::bfile_ct;
00055   object_file_ct(char const* filepath);
00056 
00057 public:
00059   char const* filepath(void) const { return M_filepath; }
00061   char const* filename(void) const { return M_filename; }
00062 
00063   // For internal use.
00064   bool hide_from_alloc_list() const { return M_hide; }
00065   void set_has_no_debug_line_sections(void) const { M_no_debug_line_sections = true; }
00066   bool has_no_debug_line_sections(void) const { return M_no_debug_line_sections; }
00067 };
00068  // End of group 'group_locations'
00070 
00071 } // namespace libcwd
00072 
00073 #endif // LIBCWD_CLASS_OBJECT_FILE_H
Copyright © 2001 - 2004 Carlo Wood.  All rights reserved.