Index: CMT/HEAD/ChangeLog
===================================================================
--- CMT/HEAD/ChangeLog	(revision 653)
+++ CMT/HEAD/ChangeLog	(revision 654)
@@ -1,2 +1,11 @@
+2013-11-08    <rybkin@lal.in2p3.fr> 513
+
+	* source/cmt.h: In class CmtContext, make assignment operator and copy
+	constructor private to forbid copying, in class Cmt, inline simple member
+	functions for speed-up, add static member to hold reference to CmtContext
+	instance
+	* source/cmt_parser.cxx: Initialize static class Cmt member, comment out
+	inlined class Cmt methods implementation
+	
 2013-11-07    <rybkin@lal.in2p3.fr> 512
 
Index: CMT/HEAD/source/cmt.h
===================================================================
--- CMT/HEAD/source/cmt.h	(revision 653)
+++ CMT/HEAD/source/cmt.h	(revision 654)
@@ -74,4 +74,9 @@
 
   bool m_autoconfigure_cmtpath;
+
+private:
+
+  CmtContext& operator = (const CmtContext& other);
+  CmtContext (const CmtContext& other);
 };
 
@@ -85,5 +90,5 @@
   static void build_vsnet_file (const cmt_string& target);
 
-  static bool build_nmake ();
+  static inline bool build_nmake ();
   static void build_OS9_makefile (const cmt_string& target);
   static void build_prefix (const cmt_string& package, cmt_string& prefix);
@@ -218,28 +223,28 @@
   static const cmt_string& filter_dir (const cmt_string& dir);
 
-  static ActionType get_action ();
-
-  static const cmt_string& get_cmt_home ();
-  static const cmt_string& get_cmt_user_context ();
-  static const cmt_string& get_cmt_version ();
-  static const cmt_string& get_current_dir ();
+  static inline ActionType get_action ();
+
+  static inline const cmt_string& get_cmt_home ();
+  static inline const cmt_string& get_cmt_user_context ();
+  static inline const cmt_string& get_cmt_version ();
+  static inline const cmt_string& get_current_dir ();
   static const cmt_string get_current_dir_real ();
-  static const cmt_string& get_current_package ();
+  static inline const cmt_string& get_current_package ();
   static const cmt_string& get_current_path ();
   static const cmt_string& get_current_cmtpath ();
   static const cmt_string& get_current_offset ();
-  static AccessMode get_current_access ();
-  static CmtStructuringStyle get_current_structuring_style ();
-  static CmtDirStyle get_current_style ();
+  static inline AccessMode get_current_access ();
+  static inline CmtStructuringStyle get_current_structuring_style ();
+  static inline CmtDirStyle get_current_style ();
   static const cmt_string& get_current_version ();
-  static const cmt_string& get_current_target ();
-  static const CmtSystem::cmt_string_vector& get_tags_remove ();
-  static bool get_debug ();
-  static bool get_disable_warnings ();  
-  static bool get_quiet ();
-  static bool get_warnings ();
-  static bool get_recursive ();
+  static inline const cmt_string& get_current_target ();
+  static inline const CmtSystem::cmt_string_vector& get_tags_remove ();
+  static inline bool get_debug ();
+  static inline bool get_disable_warnings ();  
+  static inline bool get_quiet ();
+  static inline bool get_warnings ();
+  static inline bool get_recursive ();
   static CmtScopeFilteringMode get_scope_filtering_mode ();
-  static bool get_all_sets_done ();
+  static inline bool get_all_sets_done ();
 
   static void get_cmt_flags (CmtSystem::cmt_string_vector& flags);
@@ -280,10 +285,10 @@
   static int apply_globals ();
   static void restore_all_tags (Use* use);
-  static void set_current_access (AccessMode mode);
-  static void set_recursive (bool mode);
-  static void set_scope_filtering_mode (CmtScopeFilteringMode mode);
+  static inline void set_current_access (AccessMode mode);
+  static inline void set_recursive (bool mode);
+  static inline void set_scope_filtering_mode (CmtScopeFilteringMode mode);
   static void set_standard_macros ();
-  static void set_all_sets_done ();
-  static void reset_all_sets_done ();
+  static inline void set_all_sets_done ();
+  static inline void reset_all_sets_done ();
   static void use_cmt ();
   static void use_home_requirements ();
@@ -296,5 +301,129 @@
                                 const cmt_string& separator,
                                 cmt_string& result);
+
+private:
+  static CmtContext& m_cmt_context;
+  //  static CmtContext * m_cmt_context;
 };
 
+//----------------------------------------------------------
+inline bool Cmt::build_nmake ()
+{
+  return (m_cmt_context.m_build_nmake);
+}
+
+inline ActionType Cmt::get_action ()
+{
+  return (m_cmt_context.m_action);
+}
+
+inline const cmt_string& Cmt::get_cmt_home ()
+{
+  return (m_cmt_context.m_cmt_home);
+}
+
+inline const cmt_string& Cmt::get_cmt_user_context ()
+{
+  return (m_cmt_context.m_cmt_user_context);
+}
+
+inline const cmt_string& Cmt::get_cmt_version ()
+{
+  return (m_cmt_context.m_cmt_version);
+}
+
+inline const cmt_string& Cmt::get_current_dir ()
+{
+  return (m_cmt_context.m_current_dir);
+}
+
+inline const cmt_string& Cmt::get_current_package ()
+{
+  return (m_cmt_context.m_current_package);
+}
+
+inline AccessMode Cmt::get_current_access ()
+{
+  return (m_cmt_context.m_current_access);
+}
+
+inline CmtStructuringStyle Cmt::get_current_structuring_style ()
+{
+  return (m_cmt_context.m_current_structuring_style);
+}
+
+inline CmtDirStyle Cmt::get_current_style ()
+{
+  return (m_cmt_context.m_current_style);
+}
+
+inline const cmt_string& Cmt::get_current_target ()
+{
+  return (m_cmt_context.m_current_target);
+}
+
+inline const CmtSystem::cmt_string_vector& Cmt::get_tags_remove ()
+{
+  return m_cmt_context.m_tags_remove;
+}
+
+inline bool Cmt::get_debug ()
+{
+  return (m_cmt_context.m_debug);
+}
+
+inline bool Cmt::get_quiet ()
+{
+  return (m_cmt_context.m_quiet);
+}
+
+inline bool Cmt::get_disable_warnings ()
+{
+  return (m_cmt_context.m_disable_warnings);
+}
+
+inline bool Cmt::get_warnings ()
+{
+  return (m_cmt_context.m_warnings);
+}
+
+inline bool Cmt::get_recursive ()
+{
+  return (m_cmt_context.m_recursive);
+}
+
+inline bool Cmt::get_all_sets_done ()
+{
+  return (m_cmt_context.m_all_sets_done);
+}
+
+inline void Cmt::set_current_access (AccessMode mode)
+{
+  m_cmt_context.m_current_access = mode;
+}
+
+//----------------------------------------------------------
+inline void Cmt::set_recursive (bool mode)
+{
+  m_cmt_context.m_recursive = mode;
+}
+
+//----------------------------------------------------------
+inline void Cmt::set_scope_filtering_mode (CmtScopeFilteringMode mode)
+{
+  m_cmt_context.m_scope_filtering_mode = mode;
+}
+
+inline void Cmt::set_all_sets_done ()
+{
+  m_cmt_context.m_all_sets_done = true;
+}
+
+inline void Cmt::reset_all_sets_done ()
+{
+  m_cmt_context.m_all_sets_done = false;
+}
+
+//----------------------------------------------------------
+
 #endif
Index: CMT/HEAD/source/cmt_parser.cxx
===================================================================
--- CMT/HEAD/source/cmt_parser.cxx	(revision 653)
+++ CMT/HEAD/source/cmt_parser.cxx	(revision 654)
@@ -393,4 +393,12 @@
 
 
+//----------------------------------------------------------
+//
+//   The static Cmt member
+//
+//----------------------------------------------------------
+
+CmtContext& Cmt::m_cmt_context = Me;
+//CmtContext * Cmt::m_cmt_context = &Me;
 
 //----------------------------------------------------------
@@ -498,9 +506,10 @@
 
 //----------------------------------------------------------
+/*
 bool Cmt::build_nmake ()
 {
   return (Me.m_build_nmake);
 }
-
+*/
 //----------------------------------------------------------
 void Cmt::build_OS9_makefile (const cmt_string& target)
@@ -5405,9 +5414,10 @@
 
 //----------------------------------------------------------
+/*
 ActionType Cmt::get_action ()
 {
   return (Me.m_action);
 }
-
+*/
 /*
   const CmtSystem::cmt_string_vector& Cmt::get_cmt_path ()
@@ -5426,5 +5436,5 @@
   }
 */
-
+ /*
 const cmt_string& Cmt::get_cmt_home ()
 {
@@ -5446,5 +5456,5 @@
   return (Me.m_current_dir);
 }
-
+*/
 const cmt_string Cmt::get_current_dir_real ()
 {
@@ -5454,10 +5464,10 @@
   return (Me.m_current_dir);
 }
-
+/*
 const cmt_string& Cmt::get_current_package ()
 {
   return (Me.m_current_package);
 }
-
+*/
 const cmt_string& Cmt::get_current_path ()
 {
@@ -5474,5 +5484,5 @@
   return (Me.m_current_offset);
 }
-
+/*
 AccessMode Cmt::get_current_access ()
 {
@@ -5489,20 +5499,22 @@
   return (Me.m_current_style);
 }
-
+*/
 const cmt_string& Cmt::get_current_version ()
 {
   return (Me.m_current_version);
 }
-
+/*
 const cmt_string& Cmt::get_current_target ()
 {
   return (Me.m_current_target);
 }
-
+*/
+/*
 const CmtSystem::cmt_string_vector& Cmt::get_tags_remove ()
 {
   return (Me.m_tags_remove);
 }
-
+*/
+ /*
 bool Cmt::get_debug ()
 {
@@ -5529,5 +5541,5 @@
   return (Me.m_recursive);
 }
-
+ */
 CmtScopeFilteringMode Cmt::get_scope_filtering_mode ()
 {
@@ -5543,9 +5555,10 @@
 
 //----------------------------------------------------------
+/*
 bool Cmt::get_all_sets_done ()
 {
   return (Me.m_all_sets_done);
 }
-
+*/
 //----------------------------------------------------------
 void Cmt::get_cmt_flags (CmtSystem::cmt_string_vector& flags)
@@ -10084,4 +10097,5 @@
 
 //----------------------------------------------------------
+/*
 void Cmt::set_current_access (AccessMode mode)
 {
@@ -10100,5 +10114,5 @@
   Me.m_scope_filtering_mode = mode;
 }
-
+*/
 //----------------------------------------------------------
 void Cmt::set_standard_macros ()
@@ -10244,5 +10258,5 @@
   builder.fill_for_constituent_macros ();
 }
-
+/*
 void Cmt::set_all_sets_done ()
 {
@@ -10254,5 +10268,5 @@
   Me.m_all_sets_done = false;
 }
-
+*/
 //----------------------------------------------------------
 void Cmt::use_cmt ()
