#include <IoSvc.h>
Definition at line 30 of file IoSvc.h.
◆ Fd
◆ FdMap_t
◆ IoType
I/O Connection types.
Enumerator |
---|
INVALID | |
READ | |
UPDATE | |
CREATE | |
RECREATE | |
Definition at line 39 of file IIoSvc.h.
◆ IoSvc() [1/2]
IoSvc::IoSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Constructor with parameters:
Definition at line 31 of file IoSvc.cxx.
◆ ~IoSvc()
◆ IoSvc() [2/2]
◆ close()
StatusCode IoSvc::close |
( |
Fd |
fd | ) |
|
|
virtual |
close file fd
Implements IIoSvc.
Definition at line 165 of file IoSvc.cxx.
167 FdMap_t::const_iterator itr =
m_fds.find(
fd);
168 if (itr !=
m_fds.end()) {
170 return StatusCode::SUCCESS;
172 return StatusCode::FAILURE;
◆ fd()
Fd IoSvc::fd |
( |
const std::string & |
fname | ) |
const |
|
virtual |
retrieve the file descriptor associated with file fname
- Returns
- -1 if no such
fname
is known
Implements IIoSvc.
Definition at line 97 of file IoSvc.cxx.
99 for (FdMap_t::const_iterator
104 if (itr->second.fname ==
fname) {
◆ finalize()
StatusCode IoSvc::finalize |
( |
| ) |
|
|
virtual |
Definition at line 58 of file IoSvc.cxx.
62 return StatusCode::SUCCESS;
◆ fname()
const std::string & IoSvc::fname |
( |
Fd |
fd | ) |
const |
|
virtual |
retrieve the file fname
associated with file descriptor fd
- Returns
- empty string if no such
fd
is known
Implements IIoSvc.
Definition at line 114 of file IoSvc.cxx.
116 FdMap_t::const_iterator itr =
m_fds.find(
fd);
117 if (itr !=
m_fds.end()) {
118 return itr->second.fname;
120 static const std::string s_empty =
"";
◆ has_fd()
bool IoSvc::has_fd |
( |
Fd |
fd | ) |
const |
|
virtual |
test if a given file descriptor fd
is known to us
Implements IIoSvc.
Definition at line 89 of file IoSvc.cxx.
◆ initialize()
StatusCode IoSvc::initialize |
( |
| ) |
|
|
virtual |
◆ interfaceID()
const InterfaceID & IoSvc::interfaceID |
( |
| ) |
|
|
inlinestatic |
◆ IoTypeFromName()
static IoType IIoSvc::IoTypeFromName |
( |
const std::string & |
name | ) |
|
|
inlinestaticinherited |
Definition at line 61 of file IIoSvc.h.
62 static std::map<std::string, IoType> s_names;
63 if (s_names.empty()) {
65 s_names[
"READ"] =
READ;
66 s_names[
"UPDATE"] =
UPDATE;
67 s_names[
"CREATE"] =
CREATE;
◆ IoTypeName()
static const std::string& IIoSvc::IoTypeName |
( |
IoType |
mode | ) |
|
|
inlinestaticinherited |
Definition at line 48 of file IIoSvc.h.
49 static std::map<IoType, std::string> s_names;
50 if (s_names.empty()) {
52 s_names[
READ] =
"READ";
53 s_names[
UPDATE] =
"UPDATE";
54 s_names[
CREATE] =
"CREATE";
◆ mode()
retrieve the open mode associated with file descriptor fd
Implements IIoSvc.
Definition at line 126 of file IoSvc.cxx.
128 FdMap_t::const_iterator itr =
m_fds.find(
fd);
129 if (itr !=
m_fds.end()) {
130 return itr->second.mode;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ open()
open file fname
with open mode mode
- Returns
- -1 if not successful
Implements IIoSvc.
Definition at line 138 of file IoSvc.cxx.
150 m_fds.insert(std::make_pair(
fd, infos));
◆ queryInterface()
StatusCode IoSvc::queryInterface |
( |
const InterfaceID & |
riid, |
|
|
void ** |
ppvInterface |
|
) |
| |
|
virtual |
Definition at line 71 of file IoSvc.cxx.
74 *ppvInterface =
dynamic_cast<IIoSvc*
>(
this);
77 return ::AthService::queryInterface(riid, ppvInterface);
80 return StatusCode::SUCCESS;
◆ SvcFactory< IoSvc >
◆ m_fds
map of fd->fdinfos
Definition at line 108 of file IoSvc.h.
◆ m_last_fd
last created Fd
Definition at line 111 of file IoSvc.h.
The documentation for this class was generated from the following files: