Commit ddb06987 authored by claes's avatar claes

Bugfix in constructor, dbs-file wasn't loaded, and new function nextVolume

parent a7bec694
/*
* Proview $Id: wb_merep.cpp,v 1.35 2006-05-29 10:04:56 claes Exp $
* Proview $Id: wb_merep.cpp,v 1.36 2006-06-08 13:08:33 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -92,6 +92,7 @@ wb_merep::wb_merep(const char *dirName, wb_erep *erep, wb_vrep *vrep) :
if (strcmp(dp->d_name, vname) == 0) {
try {
wb_vrepdbs *vrep = new wb_vrepdbs(erep, this, fileName, vp->name, vp->vid, vp->cid);
vrep->load();
addDbs(&sts, (wb_mvrep *)vrep);
char buff[256];
sprintf(buff, "Local class volume \"%s\" loaded from \"%s\", in data base %s", vp->name, fileName, dirName);
......@@ -802,3 +803,19 @@ void wb_merep::subClass( pwr_tCid supercid, pwr_tCid subcid, pwr_tCid *nextsubci
}
*sts = LDH__NONEXTCLASS;
}
wb_mvrep *wb_merep::nextVolume(pwr_tStatus *sts, pwr_tVid vid)
{
// Search in dbs
mvrep_iterator it = m_mvrepdbs.find(vid);
if ( it != m_mvrepdbs.end()) {
it++;
if ( it != m_mvrepdbs.end()) {
*sts = LDH__SUCCESS;
return it->second;
}
}
*sts = LDH__NOSUCHVOL;
return 0;
}
/*
* Proview $Id: wb_merep.h,v 1.22 2006-05-21 22:30:50 lw Exp $
* Proview $Id: wb_merep.h,v 1.23 2006-06-08 13:08:40 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -97,6 +97,7 @@ public:
wb_adrep *adp, int offset);
tree_sTable *catt_tt() { return m_catt_tt;}
void subClass( pwr_tCid supercid, pwr_tCid subcid, pwr_tCid *nextsubcid, pwr_tStatus *sts);
wb_mvrep *nextVolume(pwr_tStatus *sts, pwr_tVid vid);
};
#endif
......
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