w11 - cpp 0.794
Backend server for Rlink and w11
|
FIXME_docs. More...
#include <Rw11VirtStream.hpp>
Public Types | |
enum | stats { kStatNVSRead = Rw11Virt::kDimStat , kStatNVSReadByt , kStatNVSWrite , kStatNVSWriteByt , kStatNVSFlush , kStatNVSTell , kStatNVSSeek , kDimStat } |
Public Types inherited from Retro::Rw11Virt | |
enum | stats { kDimStat = 0 } |
Public Member Functions | |
Rw11VirtStream (Rw11Unit *punit) | |
Default constructor. | |
~Rw11VirtStream () | |
Destructor. | |
virtual bool | Open (const std::string &url, RerrMsg &emsg) |
FIXME_docs. | |
int | Read (uint8_t *data, size_t count, RerrMsg &emsg) |
FIXME_docs. | |
bool | Write (const uint8_t *data, size_t count, RerrMsg &emsg) |
FIXME_docs. | |
bool | Flush (RerrMsg &emsg) |
FIXME_docs. | |
int | Tell (RerrMsg &emsg) |
FIXME_docs. | |
bool | Seek (int pos, RerrMsg &emsg) |
FIXME_docs. | |
bool | Error () const |
FIXME_docs. | |
bool | Eof () const |
FIXME_docs. | |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Public Member Functions inherited from Retro::Rw11Virt | |
Rw11Virt (Rw11Unit *punit) | |
Default constructor. | |
virtual | ~Rw11Virt () |
Destructor. | |
Rw11Virt (const Rw11Virt &)=delete | |
Rw11Virt & | operator= (const Rw11Virt &)=delete |
Rw11Unit & | Unit () const |
FIXME_docs. | |
Rw11Cntl & | Cntl () const |
FIXME_docs. | |
Rw11Cpu & | Cpu () const |
FIXME_docs. | |
Rw11 & | W11 () const |
FIXME_docs. | |
RlinkServer & | Server () const |
FIXME_docs. | |
RlogFile & | LogFile () const |
FIXME_docs. | |
virtual bool | WProt () const |
FIXME_docs. | |
const RparseUrl & | Url () const |
FIXME_docs. | |
virtual bool | Open (const std::string &url, RerrMsg &emsg)=0 |
Rstats & | Stats () |
FIXME_docs. | |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Static Public Member Functions | |
static std::unique_ptr< Rw11VirtStream > | New (const std::string &url, Rw11Unit *punit, RerrMsg &emsg) |
FIXME_docs. | |
Protected Attributes | |
bool | fIStream |
is input (read only) stream | |
bool | fOStream |
is output (write only) stream | |
FILE * | fFile |
file ptr | |
Protected Attributes inherited from Retro::Rw11Virt | |
Rw11Unit * | fpUnit |
back ref to unit | |
RparseUrl | fUrl |
bool | fWProt |
write protected | |
Rstats | fStats |
statistics | |
FIXME_docs.
Definition at line 29 of file Rw11VirtStream.hpp.
Enumerator | |
---|---|
kStatNVSRead | |
kStatNVSReadByt | |
kStatNVSWrite | |
kStatNVSWriteByt | |
kStatNVSFlush | |
kStatNVSTell | |
kStatNVSSeek | |
kDimStat |
Definition at line 52 of file Rw11VirtStream.hpp.
|
explicit |
Default constructor.
Definition at line 43 of file Rw11VirtStream.cpp.
References Retro::Rstats::Define(), Retro::Rw11Virt::fStats, kStatNVSFlush, kStatNVSRead, kStatNVSReadByt, kStatNVSSeek, kStatNVSTell, kStatNVSWrite, and kStatNVSWriteByt.
Retro::Rw11VirtStream::~Rw11VirtStream | ( | ) |
|
virtual |
FIXME_docs.
Implements Retro::Rw11Virt.
Definition at line 69 of file Rw11VirtStream.cpp.
References Retro::Rw11Unit::AttachOpts(), Retro::Rtools::CreateBackupFile(), fFile, Retro::RparseUrl::FindOpt(), fIStream, fOStream, Retro::Rw11Virt::fpUnit, Retro::Rw11Virt::fUrl, Retro::Rw11Virt::fWProt, Retro::RerrMsg::InitErrno(), Retro::RparseUrl::Path(), and Retro::RparseUrl::Set().
int Retro::Rw11VirtStream::Read | ( | uint8_t * | data, |
size_t | count, | ||
RerrMsg & | emsg | ||
) |
FIXME_docs.
Definition at line 104 of file Rw11VirtStream.cpp.
References fFile, fIStream, Retro::Rw11Virt::fStats, Retro::Rstats::Inc(), Retro::RerrMsg::InitErrno(), kStatNVSRead, and kStatNVSReadByt.
Referenced by Retro::Rw11UnitStream::VirtRead().
bool Retro::Rw11VirtStream::Write | ( | const uint8_t * | data, |
size_t | count, | ||
RerrMsg & | emsg | ||
) |
FIXME_docs.
Definition at line 126 of file Rw11VirtStream.cpp.
References fFile, fOStream, Retro::Rw11Virt::fStats, Retro::Rstats::Inc(), Retro::RerrMsg::InitErrno(), kStatNVSWrite, and kStatNVSWriteByt.
Referenced by Retro::Rw11UnitStream::VirtWrite().
bool Retro::Rw11VirtStream::Flush | ( | RerrMsg & | emsg | ) |
FIXME_docs.
Definition at line 148 of file Rw11VirtStream.cpp.
References fFile, fOStream, Retro::Rw11Virt::fStats, Retro::Rstats::Inc(), Retro::RerrMsg::InitErrno(), and kStatNVSFlush.
Referenced by Retro::Rw11UnitStream::VirtFlush().
int Retro::Rw11VirtStream::Tell | ( | RerrMsg & | emsg | ) |
FIXME_docs.
Definition at line 167 of file Rw11VirtStream.cpp.
References fFile, Retro::Rw11Virt::fStats, Retro::Rstats::Inc(), Retro::RerrMsg::InitErrno(), and kStatNVSTell.
Referenced by Retro::Rw11UnitStream::Pos().
bool Retro::Rw11VirtStream::Seek | ( | int | pos, |
RerrMsg & | emsg | ||
) |
FIXME_docs.
Definition at line 185 of file Rw11VirtStream.cpp.
References fFile, Retro::Rw11Virt::fStats, Retro::Rstats::Inc(), Retro::RerrMsg::InitErrno(), and kStatNVSSeek.
bool Retro::Rw11VirtStream::Error | ( | ) | const |
FIXME_docs.
Definition at line 209 of file Rw11VirtStream.cpp.
References fFile.
Referenced by Retro::Rw11CntlLP11::UnitSetup(), and Retro::Rw11CntlPC11::UnitSetup().
bool Retro::Rw11VirtStream::Eof | ( | ) | const |
FIXME_docs.
Definition at line 217 of file Rw11VirtStream.cpp.
References fFile.
Referenced by Retro::Rw11CntlPC11::UnitSetup().
|
virtual |
FIXME_docs.
Reimplemented from Retro::Rw11Virt.
Definition at line 225 of file Rw11VirtStream.cpp.
References Retro::Rw11Virt::Dump(), fFile, fIStream, fOStream, and Retro::RosPrintf().
|
static |
FIXME_docs.
Definition at line 247 of file Rw11VirtStream.cpp.
|
protected |
is input (read only) stream
Definition at line 64 of file Rw11VirtStream.hpp.
|
protected |
|
protected |