LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::FDHandle Class Reference

#include <FileUtilities.h>

Collaboration diagram for llvm::FDHandle:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FDHandle ()
 FDHandle (int fd)
 FDHandle (FDHandle &RHS)
 ~FDHandle () throw ()
int get () const
 get - Get the current file descriptor, without releasing ownership of it.
 operator int () const
FDHandleoperator= (int fd) throw ()
FDHandleoperator= (FDHandle &RHS)
int release ()

Detailed Description

FDHandle - Simple handle class to make sure a file descriptor gets closed when the object is destroyed. This handle acts similarly to an std::auto_ptr, in that the copy constructor and assignment operators transfer ownership of the handle. This means that FDHandle's do not have value semantics.

Definition at line 117 of file FileUtilities.h.


Constructor & Destructor Documentation

llvm::FDHandle::FDHandle  )  [inline]
 

Definition at line 120 of file FileUtilities.h.

llvm::FDHandle::FDHandle int  fd  )  [inline]
 

Definition at line 121 of file FileUtilities.h.

llvm::FDHandle::FDHandle FDHandle RHS  )  [inline]
 

Definition at line 122 of file FileUtilities.h.

References FD.

FDHandle::~FDHandle  )  throw ()
 

Definition at line 321 of file FileUtilities.cpp.


Member Function Documentation

int llvm::FDHandle::get  )  const [inline]
 

get - Get the current file descriptor, without releasing ownership of it.

Definition at line 129 of file FileUtilities.h.

llvm::FDHandle::operator int  )  const [inline]
 

Definition at line 130 of file FileUtilities.h.

FDHandle& llvm::FDHandle::operator= FDHandle RHS  )  [inline]
 

Definition at line 134 of file FileUtilities.h.

References FD, and operator=().

FDHandle & FDHandle::operator= int  fd  )  throw ()
 

Definition at line 325 of file FileUtilities.cpp.

Referenced by operator=().

int llvm::FDHandle::release  )  [inline]
 

release - Take ownership of the file descriptor away from the FDHandle object, so that the file is not closed when the FDHandle is destroyed.

Definition at line 142 of file FileUtilities.h.

References llvm::ISD::Ret.


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