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

TriggerGenerator Class Reference

#include <cmt_triggers.h>

List of all members.

Static Public Member Functions

void run (const cmt_string &constituent_name)


Member Function Documentation

void TriggerGenerator::run const cmt_string constituent_name  )  [static]
 

Definition at line 792 of file cmt_triggers.cxx.

References Application, Use::current(), Constituent::find(), Library, and Constituent::type.

Referenced by Cmt::do_build_triggers().

00793 {
00794   Constituent* constituent = Constituent::find (constituent_name);
00795 
00796   Use* use = &(Use::current ());
00797   cmt_string package = use->get_package_name ();
00798 
00799     // UseAnalyzer use_analyzer (package);
00800     // use_analyzer.run ("cmt show uses -quiet");
00801 
00802   UseAnalyzer use_analyzer;
00803   use_analyzer.run (constituent_name);
00804 
00805   cmt_string file_name;
00806 
00807   file_name = "./";
00808   file_name += constituent_name;
00809   file_name += "_dependencies.";
00810 #ifdef WIN32
00811   file_name += "nmake";
00812 #else
00813   file_name += "make";
00814 #endif
00815 
00816   DependencyAnalyzer* analyzer = 0;
00817 
00818   if (constituent->type == Library)
00819     {
00820       analyzer = new LibraryAnalyzer (package, *constituent);
00821     }
00822   else if (constituent->type == Application)
00823     {
00824       analyzer = new ApplicationAnalyzer (package, *constituent);
00825     }
00826   else
00827     {
00828       return;
00829     }
00830 
00831   if (analyzer->run (file_name) == Awk::failed)
00832     {
00833       cerr << "  File " << file_name << " not found" << endl;
00834     }
00835 
00836   delete analyzer;
00837 }


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