Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

UseProjectAction Class Reference

Inheritance diagram for UseProjectAction:

Inheritance graph
[legend]
Collaboration diagram for UseProjectAction:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 UseProjectAction (Use *use)
bool found () const
bool run (const Project &project)

Private Attributes

Usem_use
bool m_found

Constructor & Destructor Documentation

UseProjectAction::UseProjectAction Use use  )  [inline]
 

Definition at line 1708 of file cmt_use.cxx.

References m_found, and m_use.

01708                               : m_use (use), m_found (false)
01709   {
01710   }


Member Function Documentation

bool UseProjectAction::found  )  const [inline]
 

Definition at line 1712 of file cmt_use.cxx.

References m_found.

Referenced by Use::move_to().

01713   {
01714     return (m_found);
01715   }

bool UseProjectAction::run const Project project  )  [inline, virtual]
 

Implements IProjectAction.

Definition at line 1717 of file cmt_use.cxx.

References Use::alternate_paths, Use::alternate_versions, Use::change_path(), cmt_vector< T >::clear(), Project::get_cmtpath(), Cmt::get_debug(), m_found, m_use, Use::reach_package(), Use::real_path, Use::select_alternate(), and cmt_vector< T >::size().

01718   {
01719     const cmt_string& path = project.get_cmtpath ();
01720       
01721     m_use->alternate_versions.clear ();
01722     m_use->alternate_paths.clear ();
01723 
01724     if (m_use->reach_package (path))
01725       {
01726         if (Cmt::get_debug ())
01727           {
01728             cout << "move_to4> " << path << endl;
01729           }
01730         
01731         m_use->change_path (path);
01732 
01733         m_found = true;
01734 
01735         return (false);
01736       }
01737     else if (m_use->alternate_versions.size () > 0)
01738       {
01739         if (m_use->select_alternate ()) 
01740           {
01741             if (Cmt::get_debug ())
01742               {
01743                 cout << "move_to5> " << m_use->real_path << endl;
01744               }
01745 
01746             m_found = true;
01747 
01748             return (false);
01749           }
01750       }
01751     
01752     return (true);
01753   }


Member Data Documentation

bool UseProjectAction::m_found [private]
 

Definition at line 1757 of file cmt_use.cxx.

Referenced by found(), run(), and UseProjectAction().

Use* UseProjectAction::m_use [private]
 

Definition at line 1756 of file cmt_use.cxx.

Referenced by run(), and UseProjectAction().


The documentation for this class was generated from the following file:
Generated on Mon May 2 10:26:05 2005 for CMT by doxygen 1.3.5