Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

CPPFile Class Reference

This defines a source file (typically a C++ header file) that is parsed by the CPPParser. More...

#include <cppFile.h>

List of all members.

Public Types

enum  Source { S_local, S_alternate, S_system, S_none }

Public Member Functions

 CPPFile (const Filename &filename="", const Filename &filename_as_referenced="", Source source=S_none)
 CPPFile (const CPPFile &copy)
void operator= (const CPPFile &copy)
 ~CPPFile ()
bool is_c_or_i_file () const
 Returns true if the file appears to be a C or C++ source code file based on its extension.

bool is_c_file () const
 Returns true if the file appears to be a C or C++ source code file based on its extension.

void replace_nearer (const CPPFile &other)
 If the other file is "nearer" than this file (in the sense that a file in the local directory is nearer than a file in the system directory, etc.), replaces this file's information with that of the other.

bool operator< (const CPPFile &other) const
bool operator== (const CPPFile &other) const
bool operator!= (const CPPFile &other) const
const char * c_str () const
bool empty () const

Static Public Member Functions

bool is_c_or_i_file (const Filename &filename)
 Returns true if the file appears to be a C or C++ source code file based on its extension.

bool is_c_file (const Filename &filename)
 Returns true if the file appears to be a C or C++ source code file based on its extension.


Public Attributes

Filename _filename
Filename _filename_as_referenced
Source _source


Detailed Description

This defines a source file (typically a C++ header file) that is parsed by the CPPParser.

Each declaration indicates the source file where it appeared.

Definition at line 41 of file cppFile.h.


Member Enumeration Documentation

enum CPPFile::Source
 

Enumeration values:
S_local 
S_alternate 
S_system 
S_none 

Definition at line 43 of file cppFile.h.


Constructor & Destructor Documentation

CPPFile::CPPFile const Filename filename = "",
const Filename filename_as_referenced = "",
Source  source = S_none
 

Definition at line 35 of file cppFile.cxx.

CPPFile::CPPFile const CPPFile &  copy  ) 
 

Definition at line 53 of file cppFile.cxx.

References _filename, _filename_as_referenced, and _source.

CPPFile::~CPPFile  ) 
 

Definition at line 82 of file cppFile.cxx.

References _filename, and is_c_or_i_file().


Member Function Documentation

const char * CPPFile::c_str  )  const
 

Definition at line 247 of file cppFile.cxx.

bool CPPFile::empty  )  const
 

Definition at line 259 of file cppFile.cxx.

bool CPPFile::is_c_file const Filename filename  )  [static]
 

Returns true if the file appears to be a C or C++ source code file based on its extension.

That is, returns true if the filename ends in .c, .C, .cc, .cpp, or any of a series of likely extensions.

Definition at line 167 of file cppFile.cxx.

References _filename.

bool CPPFile::is_c_file  )  const
 

Returns true if the file appears to be a C or C++ source code file based on its extension.

That is, returns true if the filename ends in .c, .C, .cc, .cpp, or any of a series of likely extensions.

Definition at line 148 of file cppFile.cxx.

References _source.

Referenced by is_c_or_i_file(), InterrogateBuilder::remap_indices(), and InterrogateBuilder::scan_function().

bool CPPFile::is_c_or_i_file const Filename filename  )  [static]
 

Returns true if the file appears to be a C or C++ source code file based on its extension.

That is, returns true if the filename ends in .c, .C, .cc, .cpp, or any of a series of likely extensions.

Definition at line 119 of file cppFile.cxx.

References _filename, and is_c_file().

bool CPPFile::is_c_or_i_file  )  const
 

Returns true if the file appears to be a C or C++ source code file based on its extension.

That is, returns true if the filename ends in .c, .C, .cc, .cpp, or any of a series of likely extensions.

Definition at line 100 of file cppFile.cxx.

Referenced by ~CPPFile().

bool CPPFile::operator!= const CPPFile &  other  )  const
 

Definition at line 235 of file cppFile.cxx.

bool CPPFile::operator< const CPPFile &  other  )  const
 

Definition at line 211 of file cppFile.cxx.

void CPPFile::operator= const CPPFile &  copy  ) 
 

Definition at line 68 of file cppFile.cxx.

bool CPPFile::operator== const CPPFile &  other  )  const
 

Definition at line 223 of file cppFile.cxx.

void CPPFile::replace_nearer const CPPFile &  other  ) 
 

If the other file is "nearer" than this file (in the sense that a file in the local directory is nearer than a file in the system directory, etc.), replaces this file's information with that of the other.

Otherwise, does nothing.

Definition at line 197 of file cppFile.cxx.

References _filename, and Filename::c_str().


Member Data Documentation

Filename CPPFile::_filename
 

Definition at line 72 of file cppFile.h.

Referenced by CPPFile(), is_c_file(), is_c_or_i_file(), replace_nearer(), ~CPPFile(), and CPPPreprocessor::InputFile::~InputFile().

Filename CPPFile::_filename_as_referenced
 

Definition at line 73 of file cppFile.h.

Referenced by CPPFile(), InterrogateBuilder::remap_indices(), and InterrogateBuilder::scan_function().

Source CPPFile::_source
 

Definition at line 74 of file cppFile.h.

Referenced by CPPFile(), is_c_file(), InterrogateBuilder::remap_indices(), and InterrogateBuilder::scan_function().


The documentation for this class was generated from the following files:
Generated on Thu May 1 22:13:20 2003 for DTool by doxygen1.3