basic_current_directory_scope Class Template Reference
[File System Library]

#include <winstl/filesystem/current_directory_scope.hpp>

List of all members.


Detailed Description

template<typename C, typename T = filesystem_traits<C>>
class winstl::basic_current_directory_scope< C, T >

Current directory scoping class.

This class scopes the process's current directory, by changing to the path given in the constructor, and then, if that succeeded, changing back in the destructor

Parameters:
C The character type (e.g. char, wchar_t)
T The file-system traits. In translators that support default template parameters that defaults to filesystem_traits<C>

State

 operator operator_bool_type () const
 Indicates whether the construction was successful.

Public Types

typedef C char_type
typedef T traits_type
typedef
basic_current_directory_scope
< C, T > 
class_type
 This type.
typedef size_t size_type

Public Member Functions

 basic_current_directory_scope (char_type const *dir)
 Constructs a scope instance and changes to the given directory.
template<typename S>
 basic_current_directory_scope (S const &dir)
 Constructs a scope instance and changes to the given directory.
 ~basic_current_directory_scope () throw ()
 Returns the current directory to its original location.
char_type const * get_previous () const
 Returns a C-string pointer to the original directory.
 operator char_type const * () const
 Returns a C-string pointer to the original directory.

Member Typedef Documentation

This type.


Constructor & Destructor Documentation

basic_current_directory_scope ( char_type const *  dir  )  [explicit]

Constructs a scope instance and changes to the given directory.

Parameters:
dir The name of the directory to change the current directory to

basic_current_directory_scope ( S const &  dir  )  [inline, explicit]

Constructs a scope instance and changes to the given directory.

Parameters:
dir The name of the directory to change the current directory to

References stlsoft_ns_qual.

~basic_current_directory_scope (  )  throw ()

Returns the current directory to its original location.


Member Function Documentation

char_type const* get_previous (  )  const

Returns a C-string pointer to the original directory.

operator char_type const * (  )  const

Returns a C-string pointer to the original directory.

operator operator_bool_type (  )  const [inline]

Indicates whether the construction was successful.

Return values:
true The scope instance was successfully constructed and the current directory changed as per the constructor argument
false The scope instance was not successfully constructed, and the current directory was unchanged.


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

Generated on Thu Jun 10 08:59:22 2010 for STLSoft by  doxygen 1.5.6