Commit fb6deb92 authored by claes's avatar claes

*** empty log message ***

parent c02f126a
......@@ -5,6 +5,7 @@
#include "wb_erep.h"
#include "wb_merep.h"
#include "wb_vrepwbl.h" // Should be wb_vrepdbs.h ...
#include "wb_vrepdbs.h"
#include "wb_cdrep.h"
#include "wb_orep.h"
#include "wb_tdrep.h"
......@@ -296,9 +297,15 @@ void wb_erep::loadCommonMeta( pwr_tStatus *status)
cdh_StringToVolumeId( vol_array[1], &vid);
cout << "Loading volume: " << vname << " " << vid << endl;
wb_vrepwbl *vrep = new wb_vrepwbl( this, vid);
vrep->name( vol_array[0]);
addDbs( &sts, vrep);
try {
wb_vrepdbs *vrep = new wb_vrepdbs( this, vname);
vrep->load();
// vrep->name( vol_array[0]);
addDbs( &sts, vrep);
}
catch ( wb_error& e) {
cout << "** Unable to open volume " << vname << " " << e.what() << endl;
}
}
fpm.close();
}
......@@ -315,7 +322,7 @@ void wb_erep::loadMeta( pwr_tStatus *status)
int i;
pwr_tVid vid;
pwr_tStatus sts;
wb_vrepwbl *vrep;
wb_vrepdbs *vrep;
int vol_cnt = 0;
strcpy( fname, load_cNameVolumeList);
......@@ -370,9 +377,15 @@ void wb_erep::loadMeta( pwr_tStatus *status)
if ( ODD(sts)) {
cout << "Found: " << found_file << endl;
// Load...
vrep = new wb_vrepwbl( this, vid);
vrep->name( vol_array[0]);
addDbs( &sts, vrep);
try {
vrep = new wb_vrepdbs( this, vname);
vrep->load();
// vrep->name( vol_array[0]);
addDbs( &sts, vrep);
}
catch ( wb_error& e) {
cout << "** Unable to open volume " << vname << " " << e.what() << endl;
}
break;
}
}
......@@ -385,9 +398,9 @@ void wb_erep::loadMeta( pwr_tStatus *status)
strcat( vname, ".dbs");
dcli_translate_filename( vname, vname);
vrep = new wb_vrepwbl( this, vid);
vrep->name(vol_array[0]);
addDbs( &sts, vrep);
wb_vrepwbl *vrepdb = new wb_vrepwbl( this, vid); // Should be wb_vrepdb...
vrepdb->name(vol_array[0]);
addDbs( &sts, vrepdb);
vol_cnt++;
}
}
......
#include "wb_volume.h"
#include "wb_merep.h"
wb_volume::wb_volume() : wb_status(LDH__NOSUCHVOL), m_vrep(0), m_vid(0)
wb_volume::wb_volume() : wb_status(LDH__NOSUCHVOL), m_vrep(0)
{
}
......@@ -10,7 +10,6 @@ wb_volume::wb_volume(wb_vrep *vrep) : wb_status(LDH__SUCCESS), m_vrep(vrep)
if ( !m_vrep)
m_sts = LDH__NOSUCHVOL;
else {
m_vid = m_vrep->vid();
m_vrep->ref();
}
}
......@@ -21,7 +20,7 @@ wb_volume::~wb_volume()
m_vrep->unref();
}
wb_volume::wb_volume( const wb_volume &v) : wb_status(v.sts()), m_vrep(v.m_vrep), m_vid(v.vid())
wb_volume::wb_volume( const wb_volume &v) : wb_status(v.sts()), m_vrep(v.m_vrep)
{
if ( m_vrep)
m_vrep->ref();
......@@ -37,7 +36,6 @@ wb_volume& wb_volume::operator=(const wb_volume& x)
m_vrep->unref();
m_vrep = x.m_vrep;
m_sts = x.sts();
m_vid = x.vid();
return *this;
}
......
......@@ -22,7 +22,6 @@ class wb_volume : public wb_status
{
protected:
wb_vrep *m_vrep;
pwr_tVid m_vid;
public:
......@@ -41,7 +40,7 @@ public:
wb_env env();
pwr_tVid vid() const { return m_vid;}
pwr_tVid vid() const { return m_vrep->vid();}
pwr_tCid cid() const { return m_vrep->cid();}
char *name() const { return m_vrep->name();}
......
......@@ -284,13 +284,13 @@ wb_vrepdbs::cid() const
pwr_tVid
wb_vrepdbs::vid() const
{
return 0;
return m_vid;
}
wb_erep *
wb_vrepdbs::erep() const
{
return 0;
return m_erep;
}
wb_vrep *
......
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