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

RecursivePass2 Class Reference

Inheritance diagram for RecursivePass2

Inheritance graph
[legend]
Collaboration diagram for RecursivePass2:

Collaboration graph
[legend]
List of all members.

Public Methods

 RecursivePass2 (CvsImplementation& cvs)
void begin ()
void filter (const cmt_string& line)

Private Attributes

CvsImplementationm_cvs

Constructor & Destructor Documentation

RecursivePass2::RecursivePass2 ( CvsImplementation & cvs )
 

Definition at line 1724 of file cmt_cvs.cxx.

01724                                                       : m_cvs (cvs)
01725 {
01726 }


Member Function Documentation

void RecursivePass2::begin ( ) [virtual]
 

Reimplemented from Awk.

Definition at line 1728 of file cmt_cvs.cxx.

01729 {
01730 }

void RecursivePass2::filter ( const cmt_string & line ) [virtual]
 

Reimplemented from Awk.

Definition at line 1732 of file cmt_cvs.cxx.

01733 {
01734     //if (CmtSystem::testenv ("CMTTESTAWK")) cout << "RecursivePass2::filter" << endl;
01735 
01742   History& h = History::instance ();
01743   
01744   if (h.is_installed (line)) return;
01745   
01746   h.install (line);
01747   
01748   CmtSystem::cmt_string_vector words;
01749   
01750   CmtSystem::split (line, " \t", words);
01751 
01752   enum
01753   {
01754     need_package,
01755     need_version,
01756     need_path,
01757     no_need
01758   } state = need_package;
01759 
01760   cmt_string package;
01761   cmt_string version;
01762   cmt_string path;
01763 
01764   for (int i = 1; i < words.size (); i++)
01765     {
01766       const cmt_string& s = words[i];
01767 
01768       if (s[0] == '-') continue;
01769 
01770       switch (state)
01771         {
01772           case need_package:
01773             package = s;
01774             state = need_version;
01775             break;
01776           case need_version:
01777             version = s;
01778             state = need_path;
01779             break;
01780           case need_path:
01781             path = s;
01782             state = no_need;
01783             break;
01784         }
01785     }
01786 
01787   if (version.find ("*") != cmt_string::npos)
01788     {
01789         /*
01790       cout << "# ================= Package " << package 
01791            << " version " << version << " " << path 
01792            << " has wild cards and will not be considered." << endl;
01793         */
01794     }
01795   else
01796     {
01797       m_cvs.checkout_package (path, package, version);
01798     }
01799 }


Member Data Documentation

CvsImplementation & RecursivePass2::m_cvs [private]
 

Definition at line 115 of file cmt_cvs.cxx.


The documentation for this class was generated from the following file:
Generated at Thu Apr 11 16:50:55 2002 for CMT by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000