basic_file_path_buffer Class Template Reference
[File System Library]

#include <unixstl/filesystem/file_path_buffer.hpp>

List of all members.


Detailed Description

template<typename C, typename A = typename allocator_selector<C>::allocator_type>
class unixstl::basic_file_path_buffer< C, A >

Acts as a buffer with sufficient size for any drive on the host machine.

This class is a non-template class primarily so that separate instantiations are not created for each instantiation of the basic_file_path_buffer.

This class provides a simple function, which is to provide the maximum path length for the host. This information is then cached due to the static nature of the get_drivesvar_() method, although it can be reset by calling the refresh() method on the buffer class.

Parameters:
C The character type
A The allocator type

Accessors

value_type const * c_str () const
 Returns a pointer to a nul-terminated string.
reference operator[] (size_t index)
 Returns a mutable (non-const) pointer to the internal buffer.
const_reference operator[] (size_t index) const
 Returns a non-mutable (const) pointer to the internal buffer.
size_type size () const
 Returns the size of the internal buffer.
size_type copy (char_type *buffer, size_type cchBuffer) const
 Copies the contents into a caller supplied buffer.
static size_type max_size ()
 Returns the maximum size of the internal buffer.

Public Types

Member Types
typedef C char_type
 The character type.
typedef A allocator_type
 The allocator type.
typedef basic_file_path_buffer
< C, A > 
class_type
 The current parameterisation of the type.
typedef buffer_type_::value_type value_type
 The value type.
typedef value_typereference
 The reference type.
typedef value_type const & const_reference
 The non-mutating (const) reference type.
typedef buffer_type_::size_type size_type
 The size type.

Public Member Functions

Construction
 basic_file_path_buffer ()
 Default constructor.
 basic_file_path_buffer (class_type const &rhs)
 Copy constructor.
class_typeoperator= (class_type const &rhs)
 Copy assignment operator.
Operations
void swap (class_type &rhs) throw ()
 Swaps the contents with those of another instance.
bool grow (size_type newSize)
 Resizes the buffer to the given size.
bool grow ()
 Doubles the size of the buffer.

Static Public Member Functions

Operations
static void refresh () throw ()
 Causes the drives to be examined again for the next instance.

Member Typedef Documentation

typedef C char_type

The character type.

typedef A allocator_type

The allocator type.

The current parameterisation of the type.

The value type.

The reference type.

typedef value_type const& const_reference

The non-mutating (const) reference type.

The size type.


Constructor & Destructor Documentation

basic_file_path_buffer (  )  [inline]

Default constructor.

basic_file_path_buffer ( class_type const &  rhs  )  [inline]

Copy constructor.


Member Function Documentation

class_type& operator= ( class_type const &  rhs  )  [inline]

Copy assignment operator.

void swap ( class_type rhs  )  throw () [inline]

Swaps the contents with those of another instance.

Parameters:
rhs The instance whose contents will be swapped with the callee
Note:
The complexity of this operation is not guaranteed to be constant-time. See the documentation for auto_buffer for further details.

bool grow ( size_type  newSize  )  [inline]

Resizes the buffer to the given size.

bool grow (  )  [inline]

Doubles the size of the buffer.

value_type const* c_str (  )  const [inline]

Returns a pointer to a nul-terminated string.

reference operator[] ( size_t  index  )  [inline]

Returns a mutable (non-const) pointer to the internal buffer.

const_reference operator[] ( size_t  index  )  const [inline]

Returns a non-mutable (const) pointer to the internal buffer.

size_type size (  )  const [inline]

Returns the size of the internal buffer.

Referenced by basic_file_path_buffer< C >::basic_file_path_buffer(), and basic_file_path_buffer< C >::operator=().

static size_type max_size (  )  [inline, static]

Returns the maximum size of the internal buffer.

size_type copy ( char_type buffer,
size_type  cchBuffer 
) const [inline]

Copies the contents into a caller supplied buffer.

Parameters:
buffer Pointer to character buffer to receive the contents. May be NULL, in which case the method returns size().
cchBuffer Number of characters of available space in buffer.

static void refresh (  )  throw () [inline, static]

Causes the drives to be examined again for the next instance.

Deprecated:


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

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