Changeset 654 for CMT


Ignore:
Timestamp:
Nov 8, 2013, 10:58:54 AM (11 years ago)
Author:
rybkin
Message:

See C.L. 513

Location:
CMT/HEAD
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r653 r654  
     12013-11-08    <rybkin@lal.in2p3.fr> 513
     2
     3        * source/cmt.h: In class CmtContext, make assignment operator and copy
     4        constructor private to forbid copying, in class Cmt, inline simple member
     5        functions for speed-up, add static member to hold reference to CmtContext
     6        instance
     7        * source/cmt_parser.cxx: Initialize static class Cmt member, comment out
     8        inlined class Cmt methods implementation
     9       
    1102013-11-07    <rybkin@lal.in2p3.fr> 512
    211
  • CMT/HEAD/source/cmt.h

    r653 r654  
    7474
    7575  bool m_autoconfigure_cmtpath;
     76
     77private:
     78
     79  CmtContext& operator = (const CmtContext& other);
     80  CmtContext (const CmtContext& other);
    7681};
    7782
     
    8590  static void build_vsnet_file (const cmt_string& target);
    8691
    87   static bool build_nmake ();
     92  static inline bool build_nmake ();
    8893  static void build_OS9_makefile (const cmt_string& target);
    8994  static void build_prefix (const cmt_string& package, cmt_string& prefix);
     
    218223  static const cmt_string& filter_dir (const cmt_string& dir);
    219224
    220   static ActionType get_action ();
    221 
    222   static const cmt_string& get_cmt_home ();
    223   static const cmt_string& get_cmt_user_context ();
    224   static const cmt_string& get_cmt_version ();
    225   static const cmt_string& get_current_dir ();
     225  static inline ActionType get_action ();
     226
     227  static inline const cmt_string& get_cmt_home ();
     228  static inline const cmt_string& get_cmt_user_context ();
     229  static inline const cmt_string& get_cmt_version ();
     230  static inline const cmt_string& get_current_dir ();
    226231  static const cmt_string get_current_dir_real ();
    227   static const cmt_string& get_current_package ();
     232  static inline const cmt_string& get_current_package ();
    228233  static const cmt_string& get_current_path ();
    229234  static const cmt_string& get_current_cmtpath ();
    230235  static const cmt_string& get_current_offset ();
    231   static AccessMode get_current_access ();
    232   static CmtStructuringStyle get_current_structuring_style ();
    233   static CmtDirStyle get_current_style ();
     236  static inline AccessMode get_current_access ();
     237  static inline CmtStructuringStyle get_current_structuring_style ();
     238  static inline CmtDirStyle get_current_style ();
    234239  static const cmt_string& get_current_version ();
    235   static const cmt_string& get_current_target ();
    236   static const CmtSystem::cmt_string_vector& get_tags_remove ();
    237   static bool get_debug ();
    238   static bool get_disable_warnings (); 
    239   static bool get_quiet ();
    240   static bool get_warnings ();
    241   static bool get_recursive ();
     240  static inline const cmt_string& get_current_target ();
     241  static inline const CmtSystem::cmt_string_vector& get_tags_remove ();
     242  static inline bool get_debug ();
     243  static inline bool get_disable_warnings (); 
     244  static inline bool get_quiet ();
     245  static inline bool get_warnings ();
     246  static inline bool get_recursive ();
    242247  static CmtScopeFilteringMode get_scope_filtering_mode ();
    243   static bool get_all_sets_done ();
     248  static inline bool get_all_sets_done ();
    244249
    245250  static void get_cmt_flags (CmtSystem::cmt_string_vector& flags);
     
    280285  static int apply_globals ();
    281286  static void restore_all_tags (Use* use);
    282   static void set_current_access (AccessMode mode);
    283   static void set_recursive (bool mode);
    284   static void set_scope_filtering_mode (CmtScopeFilteringMode mode);
     287  static inline void set_current_access (AccessMode mode);
     288  static inline void set_recursive (bool mode);
     289  static inline void set_scope_filtering_mode (CmtScopeFilteringMode mode);
    285290  static void set_standard_macros ();
    286   static void set_all_sets_done ();
    287   static void reset_all_sets_done ();
     291  static inline void set_all_sets_done ();
     292  static inline void reset_all_sets_done ();
    288293  static void use_cmt ();
    289294  static void use_home_requirements ();
     
    296301                                const cmt_string& separator,
    297302                                cmt_string& result);
     303
     304private:
     305  static CmtContext& m_cmt_context;
     306  //  static CmtContext * m_cmt_context;
    298307};
    299308
     309//----------------------------------------------------------
     310inline bool Cmt::build_nmake ()
     311{
     312  return (m_cmt_context.m_build_nmake);
     313}
     314
     315inline ActionType Cmt::get_action ()
     316{
     317  return (m_cmt_context.m_action);
     318}
     319
     320inline const cmt_string& Cmt::get_cmt_home ()
     321{
     322  return (m_cmt_context.m_cmt_home);
     323}
     324
     325inline const cmt_string& Cmt::get_cmt_user_context ()
     326{
     327  return (m_cmt_context.m_cmt_user_context);
     328}
     329
     330inline const cmt_string& Cmt::get_cmt_version ()
     331{
     332  return (m_cmt_context.m_cmt_version);
     333}
     334
     335inline const cmt_string& Cmt::get_current_dir ()
     336{
     337  return (m_cmt_context.m_current_dir);
     338}
     339
     340inline const cmt_string& Cmt::get_current_package ()
     341{
     342  return (m_cmt_context.m_current_package);
     343}
     344
     345inline AccessMode Cmt::get_current_access ()
     346{
     347  return (m_cmt_context.m_current_access);
     348}
     349
     350inline CmtStructuringStyle Cmt::get_current_structuring_style ()
     351{
     352  return (m_cmt_context.m_current_structuring_style);
     353}
     354
     355inline CmtDirStyle Cmt::get_current_style ()
     356{
     357  return (m_cmt_context.m_current_style);
     358}
     359
     360inline const cmt_string& Cmt::get_current_target ()
     361{
     362  return (m_cmt_context.m_current_target);
     363}
     364
     365inline const CmtSystem::cmt_string_vector& Cmt::get_tags_remove ()
     366{
     367  return m_cmt_context.m_tags_remove;
     368}
     369
     370inline bool Cmt::get_debug ()
     371{
     372  return (m_cmt_context.m_debug);
     373}
     374
     375inline bool Cmt::get_quiet ()
     376{
     377  return (m_cmt_context.m_quiet);
     378}
     379
     380inline bool Cmt::get_disable_warnings ()
     381{
     382  return (m_cmt_context.m_disable_warnings);
     383}
     384
     385inline bool Cmt::get_warnings ()
     386{
     387  return (m_cmt_context.m_warnings);
     388}
     389
     390inline bool Cmt::get_recursive ()
     391{
     392  return (m_cmt_context.m_recursive);
     393}
     394
     395inline bool Cmt::get_all_sets_done ()
     396{
     397  return (m_cmt_context.m_all_sets_done);
     398}
     399
     400inline void Cmt::set_current_access (AccessMode mode)
     401{
     402  m_cmt_context.m_current_access = mode;
     403}
     404
     405//----------------------------------------------------------
     406inline void Cmt::set_recursive (bool mode)
     407{
     408  m_cmt_context.m_recursive = mode;
     409}
     410
     411//----------------------------------------------------------
     412inline void Cmt::set_scope_filtering_mode (CmtScopeFilteringMode mode)
     413{
     414  m_cmt_context.m_scope_filtering_mode = mode;
     415}
     416
     417inline void Cmt::set_all_sets_done ()
     418{
     419  m_cmt_context.m_all_sets_done = true;
     420}
     421
     422inline void Cmt::reset_all_sets_done ()
     423{
     424  m_cmt_context.m_all_sets_done = false;
     425}
     426
     427//----------------------------------------------------------
     428
    300429#endif
  • CMT/HEAD/source/cmt_parser.cxx

    r653 r654  
    393393
    394394
     395//----------------------------------------------------------
     396//
     397//   The static Cmt member
     398//
     399//----------------------------------------------------------
     400
     401CmtContext& Cmt::m_cmt_context = Me;
     402//CmtContext * Cmt::m_cmt_context = &Me;
    395403
    396404//----------------------------------------------------------
     
    498506
    499507//----------------------------------------------------------
     508/*
    500509bool Cmt::build_nmake ()
    501510{
    502511  return (Me.m_build_nmake);
    503512}
    504 
     513*/
    505514//----------------------------------------------------------
    506515void Cmt::build_OS9_makefile (const cmt_string& target)
     
    54055414
    54065415//----------------------------------------------------------
     5416/*
    54075417ActionType Cmt::get_action ()
    54085418{
    54095419  return (Me.m_action);
    54105420}
    5411 
     5421*/
    54125422/*
    54135423  const CmtSystem::cmt_string_vector& Cmt::get_cmt_path ()
     
    54265436  }
    54275437*/
    5428 
     5438 /*
    54295439const cmt_string& Cmt::get_cmt_home ()
    54305440{
     
    54465456  return (Me.m_current_dir);
    54475457}
    5448 
     5458*/
    54495459const cmt_string Cmt::get_current_dir_real ()
    54505460{
     
    54545464  return (Me.m_current_dir);
    54555465}
    5456 
     5466/*
    54575467const cmt_string& Cmt::get_current_package ()
    54585468{
    54595469  return (Me.m_current_package);
    54605470}
    5461 
     5471*/
    54625472const cmt_string& Cmt::get_current_path ()
    54635473{
     
    54745484  return (Me.m_current_offset);
    54755485}
    5476 
     5486/*
    54775487AccessMode Cmt::get_current_access ()
    54785488{
     
    54895499  return (Me.m_current_style);
    54905500}
    5491 
     5501*/
    54925502const cmt_string& Cmt::get_current_version ()
    54935503{
    54945504  return (Me.m_current_version);
    54955505}
    5496 
     5506/*
    54975507const cmt_string& Cmt::get_current_target ()
    54985508{
    54995509  return (Me.m_current_target);
    55005510}
    5501 
     5511*/
     5512/*
    55025513const CmtSystem::cmt_string_vector& Cmt::get_tags_remove ()
    55035514{
    55045515  return (Me.m_tags_remove);
    55055516}
    5506 
     5517*/
     5518 /*
    55075519bool Cmt::get_debug ()
    55085520{
     
    55295541  return (Me.m_recursive);
    55305542}
    5531 
     5543 */
    55325544CmtScopeFilteringMode Cmt::get_scope_filtering_mode ()
    55335545{
     
    55435555
    55445556//----------------------------------------------------------
     5557/*
    55455558bool Cmt::get_all_sets_done ()
    55465559{
    55475560  return (Me.m_all_sets_done);
    55485561}
    5549 
     5562*/
    55505563//----------------------------------------------------------
    55515564void Cmt::get_cmt_flags (CmtSystem::cmt_string_vector& flags)
     
    1008410097
    1008510098//----------------------------------------------------------
     10099/*
    1008610100void Cmt::set_current_access (AccessMode mode)
    1008710101{
     
    1010010114  Me.m_scope_filtering_mode = mode;
    1010110115}
    10102 
     10116*/
    1010310117//----------------------------------------------------------
    1010410118void Cmt::set_standard_macros ()
     
    1024410258  builder.fill_for_constituent_macros ();
    1024510259}
    10246 
     10260/*
    1024710261void Cmt::set_all_sets_done ()
    1024810262{
     
    1025410268  Me.m_all_sets_done = false;
    1025510269}
    10256 
     10270*/
    1025710271//----------------------------------------------------------
    1025810272void Cmt::use_cmt ()
Note: See TracChangeset for help on using the changeset viewer.