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

RecursivePass2 Class Reference

Inheritance diagram for RecursivePass2:

[legend]
Collaboration diagram for RecursivePass2:

[legend]
List of all members.

Public Methods

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

Private Attributes

CvsImplementation &? m_cvs

Constructor & Destructor Documentation

RecursivePass2::RecursivePass2 (? CvsImplementation &? ? cvs )?
?

Definition at line 2099 of file cmt_cvs.cxx.

02099                                                       : m_cvs (cvs)
02100 {
02101 }

Member Function Documentation

void RecursivePass2::begin (? ? )? [virtual]
?

Reimplemented from Awk.

Definition at line 2103 of file cmt_cvs.cxx.

02104 {
02105 }

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

Reimplemented from Awk.

Definition at line 2107 of file cmt_cvs.cxx.

References CvsImplementation::checkout_package(), cmt_string::find(), History::install(), History::instance(), History::is_installed(), m_cvs, cmt_string::npos, cmt_vector< cmt_string >::size(), and CmtSystem::split().

02108 {
02109     //if (CmtSystem::testenv ("CMTTESTAWK")) cout << "RecursivePass2::filter> " 
02110     //                                          << "line=[" << line << "]" << endl;
02111 
02118   History& h = History::instance ();
02119   
02120   if (h.is_installed (line)) return;
02121   
02122   h.install (line);
02123   
02124   CmtSystem::cmt_string_vector words;
02125   
02126   CmtSystem::split (line, " \t", words);
02127 
02128   enum
02129   {
02130     need_package,
02131     need_version,
02132     need_path,
02133     no_need
02134   } state = need_package;
02135 
02136   cmt_string package;
02137   cmt_string version;
02138   cmt_string path;
02139 
02140   for (int i = 1; i < words.size (); i++)
02141     {
02142       const cmt_string& s = words[i];
02143 
02144       if (s[0] == '-') continue;
02145 
02146       switch (state)
02147         {
02148           case need_package:
02149             package = s;
02150             state = need_version;
02151             break;
02152           case need_version:
02153             version = s;
02154             state = need_path;
02155             break;
02156           case need_path:
02157             path = s;
02158             state = no_need;
02159             break;
02160         }
02161     }
02162 
02163   if (version.find ("*") != cmt_string::npos)
02164     {
02165         /*
02166       cout << "# ================= Package " << package 
02167            << " version " << version << " " << path 
02168            << " has wild cards and will not be considered." << endl;
02169         */
02170     }
02171   else
02172     {
02173       m_cvs.checkout_package (path, package, version);
02174     }
02175 }

Member Data Documentation

CvsImplementation& RecursivePass2::m_cvs [private]
?

Definition at line 116 of file cmt_cvs.cxx.

Referenced by filter().


The documentation for this class was generated from the following file:
Generated on Thu Jul 1 15:27:35 2004 for CMT by 1.2.18