72 unique_ptr<Rw11VirtTape> up;
74 if (scheme ==
"tap") {
76 if (!up->Open(url, emsg)) up.reset();
79 emsg.
Init(
"Rw11VirtTape::New",
string(
"Scheme '") + scheme +
80 "' is not supported");
91 if (posfile < 0) posfile = 0;
96 bool rc =
Rewind(opcode, emsg);
99 rc =
SpaceForw(1000000000, ndone, opcode, emsg);
103 if (!rc)
throw Rexception(
"Rw11VirtTape::SetPosFile", emsg.
Text());
113 if (posrec < 0) posrec = 0;
120 bool rc =
SpaceBack(1000000000, ndone, opcode, emsg);
124 if (rc && posrec != 0) {
125 rc =
SpaceForw(posrec, ndone, opcode, emsg);
130 rc =
SpaceBack(1, ndoneeof, opcode, emsg);
135 if (!rc)
throw Rexception(
"Rw11VirtTape::SetPosFile", emsg.
Text());
147 os << bl << (text?text:
"--") <<
"Rw11VirtTape @ " <<
this << endl;
149 os << bl <<
" fCapacity: " <<
fCapacity << endl;
153 os << bl <<
" fPosFile: " <<
fPosFile << endl;
154 os << bl <<
" fPosRecord: " <<
fPosRecord << endl;
void Init(const std::string &meth, const std::string &text)
FIXME_docs.
const std::string & Text() const
FIXME_docs.
I/O appicator to generate fill characters.
static std::string FindScheme(const std::string &url, const std::string &def="")
FIXME_docs.
void Define(size_t ind, const std::string &name, const std::string &text)
FIXME_docs.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
Rw11VirtTape(Rw11Unit *punit)
Default constructor.
void SetPosFile(int posfile)
FIXME_docs.
virtual bool SpaceForw(size_t nrec, size_t &ndone, int &opcode, RerrMsg &emsg)=0
int fPosRecord
tape pos: #record (-1=unknown)
void SetPosRecord(int posrec)
FIXME_docs.
size_t fCapacity
capacity in byte (0=unlimited)
static std::unique_ptr< Rw11VirtTape > New(const std::string &url, Rw11Unit *punit, RerrMsg &emsg)
FIXME_docs.
virtual bool Rewind(int &opcode, RerrMsg &emsg)=0
virtual bool SpaceBack(size_t nrec, size_t &ndone, int &opcode, RerrMsg &emsg)=0
bool fEom
tape beyond medium
int fPosFile
tape pos: #files (-1=unknown)
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
RosPrintfS< bool > RosPrintf(bool value, const char *form=0, int width=0, int prec=0)
Creates a print object for the formatted output of a bool value.
Declaration of class ReventLoop.