Panda3D
Public Member Functions
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)
CVSSourceDirectoryfind_dirname (const string &dirname)
 Returns the source directory that corresponds to the given local directory name, or NULL if there is no match.
CVSSourceDirectoryfind_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.
CVSSourceDirectoryget_child (int n) const
 Returns the nth subdirectory below this directory.
string get_dirname () const
 Returns the local name of this particular directory.
Filename get_fullpath () const
 Returns the full pathname to this particular directory.
int get_num_children () const
 Returns the number of subdirectories below this directory.
Filename get_path () const
 Returns the relative pathname to this particular directory, as seen from the root of the tree.
Filename get_rel_to (const CVSSourceDirectory *other) const
 Returns the relative path to the other directory from this one.
bool scan (const Filename &directory, const string &key_filename)
 Recursively scans the contents of the source directory.

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.

The tree is maintained in a case-insensitive manner, even on a non-Windows system, since you might want to eventually check out the CVS tree onto a Windows system--and if you do, you'll be sad if there are case conflicts within the tree. So we make an effort to ensure this doesn't happen by treating two files with a different case as the same file.

Definition at line 40 of file cvsSourceDirectory.h.


Member Function Documentation

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

Definition at line 206 of file cvsSourceDirectory.cxx.

References find_dirname().

Referenced by CVSSourceTree::find_dirname(), and find_dirname().

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

Definition at line 163 of file cvsSourceDirectory.cxx.

References find_relpath().

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

Returns the nth subdirectory below this directory.

Definition at line 150 of file cvsSourceDirectory.cxx.

Returns the local name of this particular directory.

Definition at line 59 of file cvsSourceDirectory.cxx.

Referenced by CVSSourceTree::find_relpath(), and CVSSourceTree::get_root_dirname().

Returns the full pathname to this particular directory.

Definition at line 70 of file cvsSourceDirectory.cxx.

References get_fullpath(), and CVSSourceTree::get_root_fullpath().

Referenced by get_fullpath().

Returns the number of subdirectories below this directory.

Definition at line 140 of file cvsSourceDirectory.cxx.

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

Definition at line 84 of file cvsSourceDirectory.cxx.

References get_path().

Referenced by get_path().

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

This does not include a trailing slash.

Definition at line 98 of file cvsSourceDirectory.cxx.

Referenced by CVSSourceTree::FilePath::get_rel_from().

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 233 of file cvsSourceDirectory.cxx.

References CVSSourceTree::add_file(), and scan().

Referenced by CVSSourceTree::scan(), and scan().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations