The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
Io::FileAttr Class Referencefinal

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/IFileMgr.h>

Collaboration diagram for Io::FileAttr:

Public Member Functions

 FileAttr ()=default
 
 FileAttr (Fd f, std::string n, std::string d, IoTech t, IoFlags fa, void *p, bool o, bool s=false)
 
Fd fd () const
 
const std::string & name () const
 
const std::string & desc () const
 
IoTech tech () const
 
IoFlags flags () const
 
IoFlags iflags () const
 
void * fptr () const
 
bool isOpen () const
 
bool isShared () const
 
void fd (Fd f)
 
void name (const std::string &n)
 
void desc (const std::string &d)
 
void tech (const IoTech &t)
 
void flags (const IoFlags &f)
 
void iflags (const IoFlags &f)
 
void fptr (void *v)
 
void isOpen (bool b)
 
void isShared (bool s)
 
bool operator== (const FileAttr &fa) const
 
bool operator< (const FileAttr &rhs) const
 

Private Attributes

Fd m_fd = -1
 
std::string m_name
 
std::string m_desc
 
IoTech m_tech = UNKNOWN
 
IoFlags m_flags = INVALID
 
IoFlags m_iflags = INVALID
 
void * m_fptr = nullptr
 
bool m_isOpen = false
 
bool m_shared = false
 

Friends

std::ostream & operator<< (std::ostream &os, const FileAttr &fa)
 

Detailed Description

Definition at line 160 of file IFileMgr.h.

Constructor & Destructor Documentation

◆ FileAttr() [1/2]

Io::FileAttr::FileAttr ( )
default

◆ FileAttr() [2/2]

Io::FileAttr::FileAttr ( Fd f,
std::string n,
std::string d,
IoTech t,
IoFlags fa,
void * p,
bool o,
bool s = false )
inline

Definition at line 163 of file IFileMgr.h.

164 : m_fd( f )
165 , m_name( std::move( n ) )
166 , m_desc( std::move( d ) )
167 , m_tech( t )
168 , m_flags( fa )
169 , m_iflags( fa )
170 , m_fptr( p )
171 , m_isOpen( o )
172 , m_shared( s ) {}
bool m_isOpen
Definition IFileMgr.h:222
IoTech m_tech
Definition IFileMgr.h:218
IoFlags m_iflags
Definition IFileMgr.h:220
void * m_fptr
Definition IFileMgr.h:221
std::string m_name
Definition IFileMgr.h:216
bool m_shared
Definition IFileMgr.h:223
IoFlags m_flags
Definition IFileMgr.h:219
std::string m_desc
Definition IFileMgr.h:217

Member Function Documentation

◆ desc() [1/2]

const std::string & Io::FileAttr::desc ( ) const
inline

Definition at line 176 of file IFileMgr.h.

176{ return m_desc; }

◆ desc() [2/2]

void Io::FileAttr::desc ( const std::string & d)
inline

Definition at line 186 of file IFileMgr.h.

186{ m_desc = d; }

◆ fd() [1/2]

Fd Io::FileAttr::fd ( ) const
inline

Definition at line 174 of file IFileMgr.h.

174{ return m_fd; }

◆ fd() [2/2]

void Io::FileAttr::fd ( Fd f)
inline

Definition at line 184 of file IFileMgr.h.

184{ m_fd = f; }

◆ flags() [1/2]

IoFlags Io::FileAttr::flags ( ) const
inline

Definition at line 178 of file IFileMgr.h.

178{ return m_flags; }

◆ flags() [2/2]

void Io::FileAttr::flags ( const IoFlags & f)
inline

Definition at line 188 of file IFileMgr.h.

188{ m_flags = f; }

◆ fptr() [1/2]

void * Io::FileAttr::fptr ( ) const
inline

Definition at line 180 of file IFileMgr.h.

180{ return m_fptr; }

◆ fptr() [2/2]

void Io::FileAttr::fptr ( void * v)
inline

Definition at line 190 of file IFileMgr.h.

190{ m_fptr = v; }

◆ iflags() [1/2]

IoFlags Io::FileAttr::iflags ( ) const
inline

Definition at line 179 of file IFileMgr.h.

179{ return m_iflags; }

◆ iflags() [2/2]

void Io::FileAttr::iflags ( const IoFlags & f)
inline

Definition at line 189 of file IFileMgr.h.

189{ m_iflags = f; }

◆ isOpen() [1/2]

bool Io::FileAttr::isOpen ( ) const
inline

Definition at line 181 of file IFileMgr.h.

181{ return m_isOpen; }

◆ isOpen() [2/2]

void Io::FileAttr::isOpen ( bool b)
inline

Definition at line 191 of file IFileMgr.h.

191{ m_isOpen = b; }

◆ isShared() [1/2]

bool Io::FileAttr::isShared ( ) const
inline

Definition at line 182 of file IFileMgr.h.

182{ return m_shared; }

◆ isShared() [2/2]

void Io::FileAttr::isShared ( bool s)
inline

Definition at line 192 of file IFileMgr.h.

192{ m_shared = s; }

◆ name() [1/2]

const std::string & Io::FileAttr::name ( ) const
inline

Definition at line 175 of file IFileMgr.h.

175{ return m_name; }

◆ name() [2/2]

void Io::FileAttr::name ( const std::string & n)
inline

Definition at line 185 of file IFileMgr.h.

185{ m_name = n; }

◆ operator<()

bool Io::FileAttr::operator< ( const FileAttr & rhs) const
inline

Definition at line 206 of file IFileMgr.h.

206 {
207 if ( m_name != rhs.name() ) {
208 return ( m_name < rhs.name() );
209 } else {
210 return ( m_flags < rhs.iflags() );
211 }
212 }
IoFlags iflags() const
Definition IFileMgr.h:179
const std::string & name() const
Definition IFileMgr.h:175

◆ operator==()

bool Io::FileAttr::operator== ( const FileAttr & fa) const
inline

Definition at line 201 of file IFileMgr.h.

201 {
202 return ( m_fd == fa.fd() && m_name == fa.name() && m_desc == fa.desc() && m_tech == fa.tech() &&
203 m_flags == fa.flags() && m_fptr == fa.fptr() && m_isOpen == fa.isOpen() && m_shared == fa.isShared() );
204 }
const std::string & desc() const
Definition IFileMgr.h:176
IoTech tech() const
Definition IFileMgr.h:177
void * fptr() const
Definition IFileMgr.h:180
bool isOpen() const
Definition IFileMgr.h:181
IoFlags flags() const
Definition IFileMgr.h:178
Fd fd() const
Definition IFileMgr.h:174
bool isShared() const
Definition IFileMgr.h:182

◆ tech() [1/2]

IoTech Io::FileAttr::tech ( ) const
inline

Definition at line 177 of file IFileMgr.h.

177{ return m_tech; }

◆ tech() [2/2]

void Io::FileAttr::tech ( const IoTech & t)
inline

Definition at line 187 of file IFileMgr.h.

187{ m_tech = t; }

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const FileAttr & fa )
friend

Definition at line 194 of file IFileMgr.h.

194 {
195 os << "name: \"" << fa.name() << "\" tech: " << fa.tech() << " desc: " << fa.desc()
196 << " flags: " << IoFlagName( fa.flags() ) << " i_flags: " << IoFlagName( fa.iflags() ) << " Fd: " << fa.fd()
197 << " ptr: " << fa.fptr() << ( fa.isOpen() ? " [o]" : " [c]" ) << ( fa.isShared() ? " [s]" : " [u]" );
198 return os;
199 }

Member Data Documentation

◆ m_desc

std::string Io::FileAttr::m_desc
private

Definition at line 217 of file IFileMgr.h.

◆ m_fd

Fd Io::FileAttr::m_fd = -1
private

Definition at line 215 of file IFileMgr.h.

◆ m_flags

IoFlags Io::FileAttr::m_flags = INVALID
private

Definition at line 219 of file IFileMgr.h.

◆ m_fptr

void* Io::FileAttr::m_fptr = nullptr
private

Definition at line 221 of file IFileMgr.h.

◆ m_iflags

IoFlags Io::FileAttr::m_iflags = INVALID
private

Definition at line 220 of file IFileMgr.h.

◆ m_isOpen

bool Io::FileAttr::m_isOpen = false
private

Definition at line 222 of file IFileMgr.h.

◆ m_name

std::string Io::FileAttr::m_name
private

Definition at line 216 of file IFileMgr.h.

◆ m_shared

bool Io::FileAttr::m_shared = false
private

Definition at line 223 of file IFileMgr.h.

◆ m_tech

IoTech Io::FileAttr::m_tech = UNKNOWN
private

Definition at line 218 of file IFileMgr.h.


The documentation for this class was generated from the following file: