Commit 971ec6e5 authored by claes's avatar claes

Summary message for update and check meta

parent e85e61a8
/*
* Proview $Id: wb_convert_volume.h,v 1.2 2006-05-26 11:57:28 lw Exp $
* Proview $Id: wb_convert_volume.h,v 1.3 2006-05-29 10:04:56 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -30,9 +30,10 @@ public:
int m_instanceCount;
int m_totalInstanceCount;
bool m_update;
int m_needUpdateCount;
wb_convert_volume() : m_cidChecked(pwr_cNCid), m_classCount(0), m_instanceCount(0), m_update(false) {};
wb_convert_volume(bool update) : m_cidChecked(pwr_cNCid), m_classCount(0), m_instanceCount(0), m_update(update) {};
wb_convert_volume(bool update) : m_cidChecked(pwr_cNCid), m_classCount(0), m_instanceCount(0), m_update(update), m_needUpdateCount(0) {};
virtual ~wb_convert_volume() {}
void setUpdate(bool update) { m_update = update;}
......
/*
* Proview $Id: wb_merep.cpp,v 1.34 2006-05-24 06:59:10 claes Exp $
* Proview $Id: wb_merep.cpp,v 1.35 2006-05-29 10:04:56 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -211,6 +211,7 @@ void wb_merep::copyFiles(const char *dirName, wb_merep *merep)
bool wb_merep::compareMeta(const char *dbName, wb_merep *merep)
{
mvrep_iterator it;
int need_update = 0;
for (it = m_mvrepdbs.begin(); it != m_mvrepdbs.end(); it++) {
wb_vrepdbs *i_dp = (wb_vrepdbs *)it->second;
......@@ -238,8 +239,8 @@ bool wb_merep::compareMeta(const char *dbName, wb_merep *merep)
sprintf(buff, "Local class volume \"%s\" [%s] (%s), in data base \"%s\", can be updated [%s]",
i_dp->dbsenv()->vp->name, i_timbuf, i_dp->fileName(), dbName, e_timbuf);
MsgWindow::message('W', buff);
MsgWindow::message('W', buff, msgw_ePop_No);
need_update++;
}
for (it = merep->m_mvrepdbs.begin(); it != merep->m_mvrepdbs.end(); it++) {
......@@ -254,6 +255,8 @@ bool wb_merep::compareMeta(const char *dbName, wb_merep *merep)
MsgWindow::message('W', buff);
}
}
if ( need_update)
MsgWindow::message( 'W', "Classvolumes need update, execute 'Function->UpdateClasses'");
return true;
}
......
/*
* Proview $Id: wb_vrepdb.cpp,v 1.45 2006-05-26 11:57:28 lw Exp $
* Proview $Id: wb_vrepdb.cpp,v 1.46 2006-05-29 10:04:56 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -1582,23 +1582,27 @@ bool wb_vrepdb::importPaste()
pwr_tStatus wb_vrepdb::checkMeta()
{
wb_db_class c(m_db);
char buff[256];
m_merepCheck = m_erep->merep();
m_classCount = 0;
m_cidChecked = pwr_cNCid;
m_totalInstanceCount = 0;
m_needUpdateCount = 0;
setUpdate(false);
c.iter(this);
if (m_classCount == 0)
if (m_classCount == 0) {
MsgWindow::message( 'W', "Classvolumes need update, execute 'Function->UpdateClasses'");
return LDH__SUCCESS;
}
char buff[256];
sprintf(buff, "A total of %d object instances of %d classes can to be updated", m_totalInstanceCount, m_classCount);
MsgWindow::message('W', buff);
MsgWindow::message('W', buff, msgw_ePop_No);
MsgWindow::message( 'W', "Classvolumes need update, execute 'Function->UpdateClasses'");
return LDH__SUCCESS;
}
......@@ -1680,8 +1684,9 @@ pwr_tStatus wb_vrepdb::checkObject(pwr_tOid oid, pwr_tCid cid)
time_AtoAscii(&n_time, time_eFormat_DateAndTime, n_timbuf, sizeof(n_timbuf));
sprintf(buff, "Class \"%s\" [%s], %d instance%s, can be updated to [%s]",
o_crep->name(), o_timbuf, m_instanceCount, (m_instanceCount == 1 ? "" : "s"), n_timbuf);
MsgWindow::message('W', buff);
MsgWindow::message('W', buff, msgw_ePop_No);
m_totalInstanceCount += m_instanceCount;
m_needUpdateCount++;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment