thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
ThePEG::CFile Class Reference

Here is the documentation of the CFile class. More...

#include <CFile.h>

Public Types

enum  FileType {
  undefined , plain , pipe , gzip ,
  bzip2
}
 Type of the file. More...
 

Standard constructors and destructors.

void * file
 Pointer to the file.
 
FileType fileType
 Type of the file.
 
 CFile ()
 The default constructor.
 
 CFile (string filename, string mode)
 Create a CFile given a file name and a mode.
 
 ~CFile ()
 The destructor.
 
void open (string filename, string mode)
 Open the file.
 
void close ()
 Close the file.
 
 operator void * () const
 Pointer to the file.
 
bool operator! () const
 Exist for file existance.
 
char * gets (char *s, int size)
 Get characters.
 
int puts (const char *s)
 Set characters.
 
int getc ()
 Get the current character.
 
int putc (int c)
 Set the current character.
 
int ungetc (int c)
 Pushes the byte specified by c (converted to an unsigned char) back onto the stream.
 
size_t read (void *ptr, size_t size, size_t nmemb=1)
 Read.
 
size_t write (const void *ptr, size_t size, size_t nmemb=1)
 Write.
 

Detailed Description

Here is the documentation of the CFile class.

Definition at line 15 of file CFile.h.

Member Enumeration Documentation

◆ FileType

Type of the file.

Definition at line 22 of file CFile.h.

Constructor & Destructor Documentation

◆ CFile() [1/2]

ThePEG::CFile::CFile ( )
inline

The default constructor.

Definition at line 33 of file CFile.h.

◆ CFile() [2/2]

ThePEG::CFile::CFile ( string  filename,
string  mode 
)
inline

Create a CFile given a file name and a mode.

Definition at line 38 of file CFile.h.

References open().

◆ ~CFile()

ThePEG::CFile::~CFile ( )
inline

The destructor.

Definition at line 46 of file CFile.h.

Member Function Documentation

◆ operator void *()

ThePEG::CFile::operator void * ( ) const
inline

Pointer to the file.

Definition at line 62 of file CFile.h.

References file, and fileType.

◆ operator!()

bool ThePEG::CFile::operator! ( ) const
inline

Exist for file existance.

Definition at line 69 of file CFile.h.

Member Data Documentation

◆ file

void* ThePEG::CFile::file
private

Pointer to the file.

Definition at line 113 of file CFile.h.

Referenced by operator void *().

◆ fileType

FileType ThePEG::CFile::fileType
private

Type of the file.

Definition at line 118 of file CFile.h.

Referenced by operator void *().


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