#include <unixstl/filesystem/file_path_buffer.hpp>
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.
| 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_type & | reference |
| 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_type & | operator= (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. | |
| 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_type& reference |
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.
| basic_file_path_buffer | ( | ) | [inline] |
Default constructor.
| basic_file_path_buffer | ( | class_type const & | rhs | ) | [inline] |
Copy constructor.
| 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.
| rhs | The instance whose contents will be swapped with the callee |
| 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.
Copies the contents into a caller supplied buffer.
| 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] |
1.5.6