Changeset 41 for CMT


Ignore:
Timestamp:
Apr 23, 2005, 3:08:38 PM (19 years ago)
Author:
arnault
Message:

Implement the container statement in project file - See CL269 and #4

Location:
CMT/HEAD
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r40 r41  
     12005-04-23  Christian Arnault  <arnault@lal.in2p3.fr> 269
     2
     3        * source/cmt_project.h (class Project): container and
     4        container_version access methods
     5
     6        * source/cmt_project.cxx (container_action): Implementation of the
     7        container statement
     8
     9        * source/cmt_project.h (class Project): Add handling of the container statement
     10
     11        * source/cmt_syntax.cxx (class KwdContainer): Add support of the
     12        project container package
     13        (SyntaxParser): idem
     14
    1152005-04-21  Christian Arnault  <arnault@lal.in2p3.fr> 268
    216
  • CMT/HEAD/source/cmt_project.cxx

    r39 r41  
    11171117
    11181118//----------------------------------------------------------
     1119const cmt_string& Project::get_container () const
     1120{
     1121  return (m_container);
     1122}
     1123
     1124//----------------------------------------------------------
     1125const cmt_string& Project::get_container_version () const
     1126{
     1127  return (m_container_version);
     1128}
     1129
     1130//----------------------------------------------------------
    11191131const cmt_string& Project::get_cmtpath () const
    11201132{
     
    11641176{
    11651177  m_release = release;
     1178}
     1179
     1180//----------------------------------------------------------
     1181void Project::set_container (const cmt_string& container)
     1182{
     1183  m_container = container;
     1184}
     1185
     1186//----------------------------------------------------------
     1187void Project::set_container_version (const cmt_string& container_version)
     1188{
     1189  m_container_version = container_version;
    11661190}
    11671191
     
    13001324  set_default_strategy ("BuildPrototypes");
    13011325  set_default_strategy ("InstallArea");
     1326}
     1327
     1328/**---------------------------------------------------------
     1329 A container statement is met in the project file
     1330*/
     1331void Project::container_action (const cmt_string& name, const cmt_string& version)
     1332{
     1333  //cerr << "Container action " << name << " " << version << endl;
     1334
     1335  set_container (name);
     1336  set_container_version (version);
    13021337}
    13031338
  • CMT/HEAD/source/cmt_project.h

    r36 r41  
    131131  const cmt_string& get_name () const;
    132132  const cmt_string& get_release () const;
     133  const cmt_string& get_container () const;
     134  const cmt_string& get_container_version () const;
    133135  const cmt_string& get_cmtpath () const;
    134136  const cmt_string& get_cmtpath_pwd () const;
     
    140142  void set_name (const cmt_string& name);
    141143  void set_release (const cmt_string& release);
     144  void set_container (const cmt_string& container);
     145  void set_container_version (const cmt_string& version);
    142146  void set_cmtpath (const cmt_string& path);
    143147  void set_cmtpath_pwd (const cmt_string& path);
     
    150154  void add_child (Project* p);
    151155
     156  void container_action (const cmt_string& name, const cmt_string& version);
    152157  void use_action (const cmt_string& name, const cmt_string& release);
    153158
     
    178183  cmt_string m_name;
    179184  cmt_string m_release;
     185  cmt_string m_container;
     186  cmt_string m_container_version;
    180187
    181188  ProjectPtrVector m_parents;
  • CMT/HEAD/source/cmt_syntax.cxx

    r19 r41  
    234234  {
    235235    CmtPathPattern::action (words, use);
     236  }
     237};
     238
     239class KwdContainer : public Kwd
     240{
     241public:
     242  void action (const CmtSystem::cmt_string_vector& words,
     243               Use* use,
     244               const cmt_string& file_name,
     245               int line_number)
     246  {
     247  }
     248
     249  void action (const CmtSystem::cmt_string_vector& words,
     250               Project* project,
     251               const cmt_string& file_name,
     252               int line_number)
     253  {
     254    project->container_action (words[1], words[2]);
    236255  }
    237256};
     
    10651084
    10661085  m_project_keywords.add ("build_strategy", new KwdBuildStrategy ());
     1086  m_project_keywords.add ("container", new KwdContainer ());
    10671087  m_project_keywords.add ("project", new KwdProject ());
    10681088  m_project_keywords.add ("setup_strategy", new KwdSetupStrategy ());
Note: See TracChangeset for help on using the changeset viewer.