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

CVSSourceDirectory Class Reference

This represents one particular directory in the hierarchy of source directory files. More...

#include <cvsSourceDirectory.h>

List of all members.

Public Member Functions

 CVSSourceDirectory (CVSSourceTree *tree, CVSSourceDirectory *parent, const string &dirname)
 ~CVSSourceDirectory ()
string get_dirname () const
 Returns the local name of this particular directory.

string get_fullpath () const
 Returns the full pathname to this particular directory.

string get_path () const
 Returns the relative pathname to this particular directory, as seen from the root of the tree.

string get_rel_to (const CVSSourceDirectory *other) const
 Returns the relative path to the other directory from this one.

int get_num_children () const
 Returns the number of subdirectories below this directory.

CVSSourceDirectory * get_child (int n) const
 Returns the nth subdirectory below this directory.

CVSSourceDirectory * find_relpath (const string &relpath)
 Returns the source directory that corresponds to the given relative path from this directory, or NULL if there is no match.

CVSSourceDirectory * find_dirname (const string &dirname)
 Returns the source directory that corresponds to the given local directory name, or NULL if there is no match.

bool scan (const Filename &directory, const string &key_filename)
 Recursively scans the contents of the source directory.


Private Types

typedef pvector< CVSSourceDirectory * > Children

Private Attributes

CVSSourceTree_tree
CVSSourceDirectory * _parent
string _dirname
int _depth
Children _children


Detailed Description

This represents one particular directory in the hierarchy of source directory files.

We must scan the source directory to identify where the related files have previously been copied.

Definition at line 45 of file cvsSourceDirectory.h.


Member Typedef Documentation

typedef pvector<CVSSourceDirectory *> CVSSourceDirectory::Children [private]
 

Definition at line 71 of file cvsSourceDirectory.h.


Constructor & Destructor Documentation

CVSSourceDirectory::CVSSourceDirectory CVSSourceTree tree,
CVSSourceDirectory *  parent,
const string &  dirname
 

Definition at line 35 of file cvsSourceDirectory.cxx.

References _depth, _parent, and NULL.

CVSSourceDirectory::~CVSSourceDirectory  ) 
 

Definition at line 56 of file cvsSourceDirectory.cxx.

References _dirname.


Member Function Documentation

CVSSourceDirectory * CVSSourceDirectory::find_dirname const string &  dirname  ) 
 

Returns the source directory that corresponds to the given local directory name, or NULL if there is no match.

Definition at line 248 of file cvsSourceDirectory.cxx.

References _children.

CVSSourceDirectory * CVSSourceDirectory::find_relpath const string &  relpath  ) 
 

Returns the source directory that corresponds to the given relative path from this directory, or NULL if there is no match.

Definition at line 200 of file cvsSourceDirectory.cxx.

References _children, _dirname, and NULL.

Referenced by CVSSourceTree::find_directory(), and get_child().

CVSSourceDirectory * CVSSourceDirectory::get_child int  n  )  const
 

Returns the nth subdirectory below this directory.

Definition at line 182 of file cvsSourceDirectory.cxx.

References _parent, find_relpath(), and NULL.

string CVSSourceDirectory::get_dirname  )  const
 

Returns the local name of this particular directory.

Definition at line 72 of file cvsSourceDirectory.cxx.

References _dirname, _parent, _tree, get_fullpath(), CVSSourceTree::get_root_fullpath(), and NULL.

Referenced by CVSSourceTree::find_directory().

string CVSSourceDirectory::get_fullpath  )  const
 

Returns the full pathname to this particular directory.

Definition at line 87 of file cvsSourceDirectory.cxx.

References _dirname, _parent, get_path(), and NULL.

Referenced by get_dirname().

int CVSSourceDirectory::get_num_children  )  const
 

Returns the number of subdirectories below this directory.

Definition at line 169 of file cvsSourceDirectory.cxx.

string CVSSourceDirectory::get_path  )  const
 

Returns the relative pathname to this particular directory, as seen from the root of the tree.

Definition at line 105 of file cvsSourceDirectory.cxx.

Referenced by CVSSourceTree::ask_existing(), get_fullpath(), CVSSourceTree::prompt_user(), and CVSSourceTree::restore_cwd().

string CVSSourceDirectory::get_rel_to const CVSSourceDirectory *  other  )  const
 

Returns the relative path to the other directory from this one.

This does not include a trailing slash.

Definition at line 123 of file cvsSourceDirectory.cxx.

bool CVSSourceDirectory::scan const Filename directory,
const string &  key_filename
 

Recursively scans the contents of the source directory.

Fullpath is the full path name to the directory; key_filename is the name of a file that must exist in each subdirectory for it to be considered part of the hierarchy. Returns true on success, false on failure.

Definition at line 283 of file cvsSourceDirectory.cxx.

Referenced by CVSSourceTree::set_root().


Member Data Documentation

Children CVSSourceDirectory::_children [private]
 

Definition at line 72 of file cvsSourceDirectory.h.

Referenced by find_dirname(), and find_relpath().

int CVSSourceDirectory::_depth [private]
 

Definition at line 69 of file cvsSourceDirectory.h.

Referenced by CVSSourceDirectory().

string CVSSourceDirectory::_dirname [private]
 

Definition at line 68 of file cvsSourceDirectory.h.

Referenced by find_relpath(), get_dirname(), get_fullpath(), and ~CVSSourceDirectory().

CVSSourceDirectory* CVSSourceDirectory::_parent [private]
 

Definition at line 67 of file cvsSourceDirectory.h.

Referenced by CVSSourceDirectory(), get_child(), get_dirname(), and get_fullpath().

CVSSourceTree* CVSSourceDirectory::_tree [private]
 

Definition at line 66 of file cvsSourceDirectory.h.

Referenced by get_dirname().


The documentation for this class was generated from the following files:
Generated on Fri May 2 03:26:03 2003 for Panda-Tool by doxygen1.3