Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AutoCDer Class Reference

Automatically save and restore the current working directory. More...

Public Member Functions

 AutoCDer ()
 
 ~AutoCDer ()
 

Private Attributes

char * m_cwd
 

Detailed Description

Automatically save and restore the current working directory.

This class remembers the cwd and cds to it when it goes out of scope.

Definition at line 139 of file Rocout_cgns.C.

Constructor & Destructor Documentation

AutoCDer ( )
inline

Definition at line 142 of file Rocout_cgns.C.

143  : m_cwd(getcwd(NULL, 0)) {}
char * m_cwd
Definition: Rocout_cgns.C:147
~AutoCDer ( )
inline

Definition at line 144 of file Rocout_cgns.C.

References m_cwd.

144 { chdir(m_cwd); free(m_cwd); }
char * m_cwd
Definition: Rocout_cgns.C:147

Member Data Documentation

char* m_cwd
private

Definition at line 147 of file Rocout_cgns.C.

Referenced by ~AutoCDer().


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