Changeset 581 for CMT/HEAD


Ignore:
Timestamp:
Jun 8, 2011, 3:12:36 PM (13 years ago)
Author:
rybkin
Message:

See C.L. 459

Location:
CMT/HEAD
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r576 r581  
     12011-06-08    <rybkin@lal.in2p3.fr> 459
     2
     3        * source/cmt_regexp.h: In class cmt_regexp, introduce clear function
     4        * source/cmt_regexp.cxx: In class cmt_regexp, implement clear function
     5        * source/cmt_use.h: In class Use, make class Project friend (to give access
     6        to function clear)
     7        * source/cmt_use.cxx: In class Use, function clear, clear new members
     8        alternate_is_head_versions and m_head_version, in class UseProjectAction,
     9        function run, clear Use new member alternate_is_head_versions
     10        * source/cmt_project.h: In class Project, make copy constructor and
     11        assignment operator private
     12        * source/cmt_project.cxx: In class Project, function container_action,
     13        invoke clear function on container (rather than destructor)
     14       
    1152011-05-10    <rybkin@lal.in2p3.fr> 458
    216
  • CMT/HEAD/source/cmt_project.cxx

    r568 r581  
    23052305  //    omission does not permit <path>)
    23062306  //
    2307   Use* use = &m_container;
    2308   use->~Use ();
    23092307  if (words.size () < 2) return;
    23102308
     
    23372335  if (ewords.size () > 2) path = ewords[2];
    23382336
    2339   if (name != "")
    2340     {
    2341       use->set (name, version, path);
    2342       use->get_package ()->remove_use (use);
    2343       CmtSystem::cd (m_cmtpath_pwd);
    2344       if (use->move_to ("", true) &&
    2345           !CmtSystem::absolute_path (use->real_path))
    2346         {
    2347           use->change_path (m_cmtpath_pwd);
    2348         }
    2349       CmtSystem::cd (m_cmtpath_pwd + CmtSystem::file_separator () + "cmt");
    2350     }
     2337  Use* use = &m_container;
     2338  if (name == "")
     2339    {
     2340      use->clear ();
     2341      return;
     2342    }
     2343  if (version == "") version = "*";
     2344
     2345  use->set (name, version, path);
     2346  use->get_package ()->remove_use (use);
     2347  CmtSystem::cd (m_cmtpath_pwd);
     2348  if (use->move_to ("", true) &&
     2349      !CmtSystem::absolute_path (use->real_path))
     2350    {
     2351      use->change_path (m_cmtpath_pwd);
     2352    }
     2353  CmtSystem::cd (m_cmtpath_pwd + CmtSystem::file_separator () + "cmt");
    23512354
    23522355  set_container_name (name);
  • CMT/HEAD/source/cmt_project.h

    r550 r581  
    180180  void use_action (const cmt_string& name, const cmt_string& release);
    181181
    182   Project& operator = (const Project& other);
     182  //  Project& operator = (const Project& other);
    183183  bool operator == (const cmt_string& name) const;
    184184  bool operator != (const cmt_string& name) const;
     
    215215private:
    216216
     217  Project& operator = (const Project& other);
     218  Project (const Project& other);
     219
    217220  void fill_cmtpath (cmt_string& buffer);
    218221
  • CMT/HEAD/source/cmt_regexp.cxx

    r400 r581  
    15811581}
    15821582
     1583//----------------------------------------------------------
     1584void cmt_regexp::clear ()
     1585{
     1586  if (_root != 0)
     1587    {
     1588      delete _root;
     1589      _root = 0;
     1590    }
     1591}
     1592
     1593//----------------------------------------------------------
    15831594bool cmt_regexp::is_valid () const
    15841595{
  • CMT/HEAD/source/cmt_regexp.h

    r11 r581  
    1818  cmt_regexp (const cmt_string& expression);
    1919  ~cmt_regexp ();
     20  void clear ();
    2021
    2122  void set (const cmt_string& expression);
  • CMT/HEAD/source/cmt_use.cxx

    r576 r581  
    18691869  alternate_versions.clear ();
    18701870  alternate_paths.clear ();
     1871  alternate_is_head_versions.clear ();
     1872
     1873  m_head_version.clear ();
    18711874
    18721875  version_alias = "";
     
    22932296    m_use->alternate_versions.clear ();
    22942297    m_use->alternate_paths.clear ();
     2298    m_use->alternate_is_head_versions.clear ();
    22952299
    22962300    if (m_use->reach_package (path, this->native_version))
  • CMT/HEAD/source/cmt_use.h

    r575 r581  
    1717class Package;
    1818class UseProjectAction;
     19class Project;
    1920
    2021class Use
     
    240241
    241242  friend class UseProjectAction;
     243  friend class Project;
    242244};
    243245
Note: See TracChangeset for help on using the changeset viewer.