Index: /CMT/HEAD/ChangeLog
===================================================================
--- /CMT/HEAD/ChangeLog	(revision 80)
+++ /CMT/HEAD/ChangeLog	(revision 81)
@@ -1,5 +1,9 @@
 2005-09-01  Christian Arnault  <arnault@lal.in2p3.fr> 276
 
-	* source/cmt_symbol.cxx (all_set): Generate all XXXROOT and XXXCONFIG evs accroding
+	* source/cmt_use.cxx (get_strategy): Implement the get_strategy function
+
+	* source/cmt_use.h (class Use): Install the get_strategy function as a member function.
+
+	* source/cmt_symbol.cxx (all_set): Generate all XXXROOT and XXXCONFIG evs according
 	to the strategies.
 
Index: /CMT/HEAD/source/cmt.h
===================================================================
--- /CMT/HEAD/source/cmt.h	(revision 80)
+++ /CMT/HEAD/source/cmt.h	(revision 81)
@@ -211,5 +211,4 @@
   static CmtScopeFilteringMode get_scope_filtering_mode ();
   static bool get_all_sets_done ();
-  static bool get_strategy (const cmt_string& name, Use& use);
 
   /// If a project file exists above the current directory we don't need CMTPATH
Index: /CMT/HEAD/source/cmt_parser.cxx
===================================================================
--- /CMT/HEAD/source/cmt_parser.cxx	(revision 80)
+++ /CMT/HEAD/source/cmt_parser.cxx	(revision 81)
@@ -150,36 +150,4 @@
   int m_count;
 };
-
-
-//----------------------------------------------------------
-bool Cmt::get_strategy (const cmt_string& name, Use& use)
-{
-  static cmt_string cmtpath;
-  static cmt_string offset;
-
-  use.get_cmtpath_and_offset (cmtpath, offset);
-
-  Project* p = Project::find_by_cmtpath (cmtpath);
-
-  bool strategy;
-
-  if (p == 0)
-    {
-      static const Project::ProjectVector& projects = Project::projects ();
-
-      if (projects.size () == 0) strategy = StrategyMgr::get_default_strategy (name);
-      else
-	{
-	  p = &(projects[0]);
-	  strategy = p->get_strategy (name);
-	}
-    }
-  else
-    {
-      strategy = p->get_strategy (name);
-    }
-
-  return (strategy);
-}
 
 //----------------------------------------------------------
@@ -1741,5 +1709,5 @@
   }
 
-  if (get_strategy ("InstallArea", current_use))
+  if (current_use.get_strategy ("InstallArea"))
     {
       const CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance ();
@@ -2165,5 +2133,5 @@
     //  Try a cleanup of the installation area
     //
-  if (get_strategy ("InstallArea", current_use))
+  if (current_use.get_strategy ("InstallArea"))
     {
       CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance ();
@@ -2171,5 +2139,5 @@
       //cout << "#IA3>" << endl;
 
-      if (get_strategy ("SetupCleanup", Use::current ()))
+      if (current_use.get_strategy ("SetupCleanup"))
 	{
 	  ia_mgr.config ();
@@ -2903,5 +2871,5 @@
               Symbol::expand (libname);
 
-              if (get_strategy ("InstallArea", current_use))
+              if (current_use.get_strategy ("InstallArea"))
                 {
                   const CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance ();
@@ -3103,5 +3071,5 @@
     //  Try a cleanup of the installation area
     //
-  if (get_strategy ("InstallArea", current_use))
+  if (current_use.get_strategy ("InstallArea"))
     {
       CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance ();
@@ -3112,5 +3080,5 @@
 
       /*
-      if (get_strategy ("SetupCleanup", current_use))
+      if (current_use.get_strategy ("SetupCleanup"))
         {
 	  const cmt_string& installarea = ia_mgr.get_installarea ();
@@ -3679,5 +3647,5 @@
   cout << "Build strategy    : ";
 
-  if (get_strategy ("BuildPrototypes", current_use))
+  if (current_use.get_strategy ("BuildPrototypes"))
     {
       cout << "prototypes";
@@ -3688,5 +3656,5 @@
     }
   
-  if (get_strategy ("InstallArea", current_use))
+  if (current_use.get_strategy ("InstallArea"))
     {
       cout << " with_installarea";
@@ -3701,5 +3669,5 @@
   cout << "Setup strategy    : ";
   
-  if (get_strategy ("SetupConfig", current_use))
+  if (current_use.get_strategy ("SetupConfig"))
     {
       cout << "config";
@@ -3710,5 +3678,5 @@
     }
   
-  if (get_strategy ("SetupRoot", current_use))
+  if (current_use.get_strategy ("SetupRoot"))
     {
       cout << " root";
@@ -3719,5 +3687,5 @@
     }
   
-  if (get_strategy ("SetupCleanup", current_use))
+  if (current_use.get_strategy ("SetupCleanup"))
     {
       cout << " cleanup";
@@ -4180,5 +4148,5 @@
   cmt_string no_cleanup_opt;
 
-  if (get_strategy ("SetupCleanup", current_use))
+  if (current_use.get_strategy ("SetupCleanup"))
     {
       no_cleanup_opt = " -no_cleanup";
@@ -4374,5 +4342,5 @@
   cmt_string no_cleanup_opt;
 
-  if (get_strategy ("SetupCleanup", current_use))
+  if (current_use.get_strategy ("SetupCleanup"))
     {
       no_cleanup_opt = " -no_cleanup";
@@ -4713,5 +4681,6 @@
 {
   Use& current_use = Use::current ();
-  if (get_strategy ("BuildPrototypes", current_use)) return (true);
+
+  if (current_use.get_strategy ("BuildPrototypes")) return (true);
   else return (false);
 }
@@ -5756,6 +5725,6 @@
   cmt_string system = CmtSystem::get_cmt_config ();
 
-  bool do_config = get_strategy ("SetupConfig", use);
-  bool do_root = get_strategy ("SetupRoot", use);
+  bool do_config = use.get_strategy ("SetupConfig");
+  bool do_root = use.get_strategy ("SetupRoot");
 
   switch (mode)
@@ -7304,5 +7273,7 @@
     CmtPathPattern::apply_all ();
 
-    if (Cmt::get_strategy ("InstallArea", Use::current ()))
+    const Use& current_use = Use::current ();
+
+    if (current_use.get_strategy ("InstallArea"))
       {
 	CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance ();
@@ -7438,5 +7409,5 @@
     //
   /*
-  if (get_strategy ("InstallArea", Use::current ()))
+  if (current_use.get_strategy ("InstallArea"))
     {
       CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance ();
Index: /CMT/HEAD/source/cmt_symbol.cxx
===================================================================
--- /CMT/HEAD/source/cmt_symbol.cxx	(revision 80)
+++ /CMT/HEAD/source/cmt_symbol.cxx	(revision 81)
@@ -1294,5 +1294,5 @@
 	  if (use.get_package_name () == "cmt_standalone") continue;
 
-	  if (Cmt::get_strategy ("SetupConfig", use))
+	  if (use.get_strategy ("SetupConfig"))
 	    {
 	      cmt_string& temp = envs.add ();
@@ -1303,5 +1303,5 @@
 	    }
 
-	  if (Cmt::get_strategy ("SetupRoot", use))
+	  if (use.get_strategy ("SetupRoot"))
 	    {
 	      cmt_string& temp = envs.add ();
@@ -1319,5 +1319,5 @@
     if (use.get_package_name () != "cmt_standalone")
       {
-	if (Cmt::get_strategy ("SetupConfig", use))
+	if (use.get_strategy ("SetupConfig"))
 	  {
 	    cmt_string& temp = envs.add ();
@@ -1328,5 +1328,5 @@
 	  }
 	
-	if (Cmt::get_strategy ("SetupRoot", use))
+	if (use.get_strategy ("SetupRoot"))
 	  {
 	    cmt_string& temp = envs.add ();
Index: /CMT/HEAD/source/cmt_use.cxx
===================================================================
--- /CMT/HEAD/source/cmt_use.cxx	(revision 80)
+++ /CMT/HEAD/source/cmt_use.cxx	(revision 81)
@@ -2876,4 +2876,30 @@
 }
 
+//------------------------------------------------------------
+bool Use::get_strategy (const cmt_string& name) const
+{
+  Project* p = Project::find_by_cmtpath (real_path);
+
+  bool strategy;
+
+  if (p == 0)
+    {
+      static const Project::ProjectVector& projects = Project::projects ();
+
+      if (projects.size () == 0) strategy = StrategyMgr::get_default_strategy (name);
+      else
+        {
+          p = &(projects[0]);
+          strategy = p->get_strategy (name);
+        }
+    }
+  else
+    {
+      strategy = p->get_strategy (name);
+    }
+
+  return (strategy);
+}
+
 //----------------------------------------------------------
 void Use::fill_includes_macro (cmt_string& buffer) const
Index: /CMT/HEAD/source/cmt_use.h
===================================================================
--- /CMT/HEAD/source/cmt_use.h	(revision 80)
+++ /CMT/HEAD/source/cmt_use.h	(revision 81)
@@ -89,4 +89,5 @@
   void reduce_path (cmt_string& s) const;
   void get_cmtpath_and_offset (cmt_string& cmtpath, cmt_string& offset) const;
+  bool get_strategy (const cmt_string& name) const;
 
   void fill_includes_macro (cmt_string& buffer) const;
