Gaudi Framework, version v24r2

Home   Generated: Wed Dec 4 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions
Io Namespace Reference

Classes

class  IoFlags
 
class  FileAttr
 
struct  FileHdlr
 

Typedefs

typedef int Fd
 
typedef int open_t
 
typedef int close_t
 
typedef int reopen_t
 
typedef boost::function
< Io::open_t(const std::string
&, Io::IoFlags, const
std::string &, Io::Fd &, void *&)> 
bfcn_open_t
 
typedef boost::function
< Io::close_t(Io::Fd)> 
bfcn_close_t
 
typedef boost::function
< Io::close_t(void *)> 
bfcn_closeP_t
 
typedef boost::function
< Io::reopen_t(Io::Fd,
Io::IoFlags)> 
bfcn_reopen_t
 
typedef boost::function
< Io::reopen_t(void
*, Io::IoFlags)> 
bfcn_reopenP_t
 
typedef boost::function
< StatusCode(FILEMGR_CALLBACK_ARGS) > 
bfcn_action_t
 

Enumerations

enum  IoFlag {
  READ = O_RDONLY, WRITE = O_WRONLY, RDWR = O_RDWR, CREATE = O_CREAT,
  EXCL = O_EXCL, TRUNC = O_TRUNC, APPEND = O_APPEND, INVALID = 1<<31
}
 
enum  IoTech {
  UNKNOWN, POSIX, ROOT, BS,
  HDF5, SQLITE
}
 
enum  Action {
  OPEN = 0, CLOSE, REOPEN, OPEN_ERR,
  CLOSE_ERR, REOPEN_ERR, INVALID_ACTION
}
 

Functions

static std::string IoFlagName (IoFlags f)
 
IoFlags IoFlagFromName (const std::string &f)
 
std::ostreamoperator<< (std::ostream &s, const IoFlag &f)
 
std::ostreamoperator<< (std::ostream &s, const IoFlags &f)
 
std::ostreamoperator<< (std::ostream &s, const IoTech &t)
 
std::ostreamoperator<< (std::ostream &s, const Action &t)
 

Typedef Documentation

typedef boost::function<StatusCode (FILEMGR_CALLBACK_ARGS) > Io::bfcn_action_t

Definition at line 340 of file IFileMgr.h.

typedef boost::function<Io::close_t(Io::Fd)> Io::bfcn_close_t

Definition at line 283 of file IFileMgr.h.

typedef boost::function<Io::close_t(void*)> Io::bfcn_closeP_t

Definition at line 284 of file IFileMgr.h.

typedef boost::function<Io::open_t(const std::string&, Io::IoFlags, const std::string&, Io::Fd&, void*&)> Io::bfcn_open_t

Definition at line 282 of file IFileMgr.h.

typedef boost::function<Io::reopen_t(Io::Fd,Io::IoFlags)> Io::bfcn_reopen_t

Definition at line 285 of file IFileMgr.h.

typedef boost::function<Io::reopen_t(void*,Io::IoFlags)> Io::bfcn_reopenP_t

Definition at line 286 of file IFileMgr.h.

typedef int Io::close_t

Definition at line 279 of file IFileMgr.h.

typedef int Io::Fd

Definition at line 197 of file IFileMgr.h.

typedef int Io::open_t

Definition at line 278 of file IFileMgr.h.

typedef int Io::reopen_t

Definition at line 280 of file IFileMgr.h.

Enumeration Type Documentation

enum Io::Action
Enumerator:
OPEN 
CLOSE 
REOPEN 
OPEN_ERR 
CLOSE_ERR 
REOPEN_ERR 
INVALID_ACTION 

Definition at line 316 of file IFileMgr.h.

enum Io::IoFlag
Enumerator:
READ 
WRITE 
RDWR 
CREATE 
EXCL 
TRUNC 
APPEND 
INVALID 

Definition at line 25 of file IFileMgr.h.

{
READ = O_RDONLY,
WRITE = O_WRONLY,
RDWR = O_RDWR,
CREATE = O_CREAT,
EXCL = O_EXCL,
TRUNC = O_TRUNC,
APPEND = O_APPEND,
INVALID = 1<<31
};
enum Io::IoTech
Enumerator:
UNKNOWN 
POSIX 
ROOT 
BS 
HDF5 
SQLITE 

Definition at line 170 of file IFileMgr.h.

Function Documentation

IoFlags Io::IoFlagFromName ( const std::string f)
inline

Definition at line 114 of file IFileMgr.h.

{
if (s_n.empty()) {
s_n["READ"] = Io::READ;
s_n["WRITE"] = Io::WRITE;
s_n["RDWR"] = Io::RDWR;
s_n["CREATE"] = Io::CREATE;
s_n["EXCL"] = Io::EXCL;
s_n["TRUNC"] = Io::TRUNC;
s_n["APPEND"] = Io::APPEND;
s_n["INVALID"] = Io::INVALID;
}
IoFlags fl(Io::INVALID);
size_t j(0),k(0);
while ( (k=f.find("|",j)) != std::string::npos) {
fs = f.substr(j,k-j);
if (s_n.find(fs) == s_n.end()) {
return Io::INVALID;
}
if (fl.isInvalid()) {
fl = s_n[fs];
} else {
fl = fl | s_n[fs];
}
j = k+1;
}
fs = f.substr(j,f.length()-j);
if (s_n.find(fs) == s_n.end()) {
return Io::INVALID;
}
if (fl.isInvalid()) {
fl = s_n[fs];
} else {
fl = fl | s_n[fs];
}
return fl;
}
static std::string Io::IoFlagName ( IoFlags  f)
static

Definition at line 86 of file IFileMgr.h.

{
if (s_names.empty()) {
s_names[READ] = "READ";
s_names[WRITE] = "WRITE";
s_names[RDWR] = "RDWR";
s_names[CREATE] = "CREATE";
s_names[EXCL] = "EXCL";
s_names[TRUNC] = "TRUNC";
s_names[APPEND] = "APPEND";
s_names[INVALID] = "INVALID";
}
if ( f.isRead() ) {
return s_names[READ];
}
for (int i=0; i<32; ++i) {
if ( ( (1<<i) & f) != 0) {
ff += s_names[ (IoFlag)(1<<i) ] + "|";
}
}
ff.erase(ff.length()-1);
return ff;
}
std::ostream& Io::operator<< ( std::ostream s,
const IoFlag &  f 
)
inline

Definition at line 156 of file IFileMgr.h.

{
return s << IoFlagName(f);
}
std::ostream& Io::operator<< ( std::ostream s,
const IoFlags &  f 
)
inline

Definition at line 159 of file IFileMgr.h.

{
return s << IoFlagName(f);
}
std::ostream& Io::operator<< ( std::ostream s,
const IoTech &  t 
)
inline

Definition at line 179 of file IFileMgr.h.

{
switch (t) {
case UNKNOWN : return s << "UNKNOWN";
case POSIX : return s << "POSIX";
case ROOT : return s << "ROOT";
case BS : return s << "BS";
case HDF5 : return s << "HDF5";
case SQLITE : return s << "SQLITE";
}
return s;
}
std::ostream& Io::operator<< ( std::ostream s,
const Action &  t 
)
inline

Definition at line 326 of file IFileMgr.h.

{
switch (t) {
case OPEN : return s << "OPEN";
case CLOSE : return s << "CLOSE";
case REOPEN : return s << "REOPEN";
case OPEN_ERR : return s << "OPEN_ERR";
case CLOSE_ERR : return s << "CLOSE_ERR";
case REOPEN_ERR : return s << "REOPEN_ERR";
case INVALID_ACTION : return s << "INVALID_ACTION";
}
return s;
}

Generated at Wed Dec 4 2013 14:33:23 for Gaudi Framework, version v24r2 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004