Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

portaudio::AutoSystem Class Reference

#include <AutoSystem.hxx>

List of all members.


Detailed Description

A RAII idiom class to ensure automatic clean-up when an exception is raised.

A simple helper class which uses the 'Resource Acquisition is Initialization' idiom (RAII). Use this class to initialize/terminate the System rather than using System directly. AutoSystem must be created on stack and must be valid throughout the time you wish to use PortAudioCpp. Your 'main' function might be a good place for it.

To avoid having to type portaudio::System::instance().xyz() all the time, it's usually a good idea to make a reference to the System which can be accessed directly.

portaudio::AutoSys autoSys; portaudio::System &sys = portaudio::System::instance();


Public Member Functions

 AutoSystem (bool initialize=true)
 ~AutoSystem ()
void initialize ()
void terminate ()


Constructor & Destructor Documentation

portaudio::AutoSystem::AutoSystem bool  initialize = true  )  [inline]
 

portaudio::AutoSystem::~AutoSystem  )  [inline]
 


Member Function Documentation

void portaudio::AutoSystem::initialize  )  [inline]
 

void portaudio::AutoSystem::terminate  )  [inline]
 


The documentation for this class was generated from the following file:
Generated on Fri Apr 2 20:22:45 2004 for PortAudioCpp by doxygen 1.3.6