basic_file_lines Class Template Reference

#include <platformstl/filesystem/file_lines.hpp>

List of all members.


Detailed Description

template<typename C, typename V = stlsoft::basic_string_view<C>, typename B = stlsoft::basic_simple_string<C>>
class platformstl::basic_file_lines< C, V, B >

Maps a text file's contents and presents them as a vector of lines.

Member Types

typedef basic_file_lines< C, V, B > class_type
typedef C char_type
typedef strings_type_::value_type value_type
typedef strings_type_::size_type size_type
typedef
strings_type_::const_iterator 
const_iterator
typedef
strings_type_::const_reference 
const_reference
typedef bool bool_type

Public Member Functions

Construction
template<typename S>
 basic_file_lines (S const &path)
 ~basic_file_lines () throw ()
Accessors
size_type size () const
 Returns the number of lines in the file.
bool_type empty () const
 Indicates whethere there are any lines in the file.
const_reference operator[] (size_type index) const
 Returns a non-mutable (const) reference to the line at index.
const_iterator begin () const
 Begins the iteration.
const_iterator end () const
 Ends the iteration.
Comparison
template<typename V2, typename B2>
bool_type equal (basic_file_lines< char_type, V2, B2 > const &rhs) const

Member Function Documentation

size_type size (  )  const [inline]

Returns the number of lines in the file.

bool_type empty (  )  const [inline]

Indicates whethere there are any lines in the file.

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

Returns a non-mutable (const) reference to the line at index.

Note:
The behaviour is undefined if index >= size()

References STLSOFT_MESSAGE_ASSERT.

const_iterator begin (  )  const [inline]

Begins the iteration.

Returns:
An iterator representing the start of the sequence

const_iterator end (  )  const [inline]

Ends the iteration.

Returns:
An iterator representing the end of the sequence


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

Generated on Thu Jun 10 08:58:33 2010 for STLSoft by  doxygen 1.5.6