Commit 1fd1cab7 authored by claes's avatar claes

Create volume without adding to env (needed by dirctory volume)

parent c8f7b143
/*
* Proview $Id: wb_env.cpp,v 1.8 2005-09-06 10:43:31 claes Exp $
* Proview $Id: wb_env.cpp,v 1.9 2005-11-22 12:22:29 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -108,9 +108,9 @@ wb_volume wb_env::volume(const char *name)
return v;
}
wb_volume wb_env::createVolume(pwr_tVid vid, pwr_tCid cid, const char *name)
wb_volume wb_env::createVolume(pwr_tVid vid, pwr_tCid cid, const char *name, bool add)
{
wb_volume v( m_erep->createVolume( &m_sts, vid, cid, name));
wb_volume v( m_erep->createVolume( &m_sts, vid, cid, name, add));
return v;
}
......
/*
* Proview $Id: wb_env.h,v 1.8 2005-09-06 10:43:31 claes Exp $
* Proview $Id: wb_env.h,v 1.9 2005-11-22 12:22:29 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -61,7 +61,7 @@ public:
wb_volume snapshot(pwr_tVid);
wb_volume createVolume(pwr_tVid vid, pwr_tCid cid, const char *name);
wb_volume createVolume(pwr_tVid vid, pwr_tCid cid, const char *name, bool add=true);
int nextVolatileVid( char *name) { return m_erep->nextVolatileVid( &m_sts, name); }
......
/*
* Proview $Id: wb_erep.cpp,v 1.40 2005-10-21 16:11:22 claes Exp $
* Proview $Id: wb_erep.cpp,v 1.41 2005-11-22 12:22:29 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -47,7 +47,7 @@ extern "C" {
pwr_dImport pwr_BindClasses(System);
pwr_dImport pwr_BindClasses(Base);
wb_erep::wb_erep() : m_dir_cnt(0), m_volatile_idx(0), m_buffer_max(10),
wb_erep::wb_erep() : m_nRef(0), m_dir_cnt(0), m_volatile_idx(0), m_buffer_max(10),
m_ref_merep_occupied(false)
{
m_merep = new wb_merep(0);
......@@ -892,7 +892,7 @@ int wb_erep::nextVolatileVid( pwr_tStatus *sts, char *name)
}
wb_vrep *wb_erep::createVolume(pwr_tStatus *sts, pwr_tVid vid, pwr_tCid cid,
const char *name)
const char *name, bool add)
{
char vname[200];
......@@ -906,7 +906,8 @@ wb_vrep *wb_erep::createVolume(pwr_tStatus *sts, pwr_tVid vid, pwr_tCid cid,
}
wb_vrepdb *vrepdb = new wb_vrepdb( this, vid, cid, name, vname);
addDb( sts, vrepdb);
if ( add)
addDb( sts, vrepdb);
MsgWindow::message( 'I', "Database created", vname);
return vrepdb;
......
/*
* Proview $Id: wb_erep.h,v 1.20 2005-09-06 10:43:31 claes Exp $
* Proview $Id: wb_erep.h,v 1.21 2005-11-22 12:22:29 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -66,7 +66,8 @@ public:
wb_vrep *volume(pwr_tStatus *sts);
wb_vrep *volume(pwr_tStatus *sts, pwr_tVid vid);
wb_vrep *volume(pwr_tStatus *sts, const char *name);
wb_vrep *createVolume(pwr_tStatus *sts, pwr_tVid vid, pwr_tCid cid, const char *name);
wb_vrep *createVolume(pwr_tStatus *sts, pwr_tVid vid, pwr_tCid cid, const char *name,
bool add = true);
wb_vrep *nextVolume(pwr_tStatus *sts, pwr_tVid vid);
wb_vrep *externVolume(pwr_tStatus *sts, pwr_tVid vid);
wb_vrep *bufferVolume(pwr_tStatus *sts);
......
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