std::basic_ofstream::rdbuf

std::basic_filebuf<CharT, Traits>* rdbuf() const; (since C++11) Returns pointer to the underlying raw file device object. Parameters (none). Return value Pointer to the underlying raw file device. Example

std::basic_ofstream::is_open

bool is_open(); (until C++11) bool is_open() const; (since C++11) Checks if the file stream has an associated file. Effectively calls rdbuf()->is_open(). Parameters (none). Return value true if the file stream has an associated file, false otherwise. Example See also open opens a file and associates it with the stream (public member function) close closes the associated file (public member function)

std::basic_ofstream::close

void close(); Closes the associated file. Effectively calls rdbuf()->close(). If an error occurs during operation, setstate(failbit) is called. Parameters (none). Return value (none). Notes This function is called by the destructor of basic_ofstream when the stream object goes out of scope and is not usually invoked directly. Example See also is_open checks if the stream has an associated file (public member function) open opens a file and associates it with t

std::basic_ofstream

Defined in header <fstream> template< class CharT, class Traits = std::char_traits<CharT> > class basic_ofstream : public std::basic_ostream<CharT, Traits> The class template basic_ofstream implements high-level output operations on file based streams. It interfaces a file-based streambuffer (std::basic_filebuf) with the high-level interface of (std::basic_ostream). A typical implementation of std::basic_ofstream holds only one non-derived data m

std::basic_ofstream::basic_ofstream

basic_ofstream(); (1) explicit basic_ofstream( const char* filename, ios_base::openmode mode = ios_base::out ); (2) explicit basic_ofstream( const string& filename, ios_base::openmode mode = ios_base::out ); (3) (since C++11) basic_ofstream( basic_ofstream&& other ); (4) (since C++11) basic_ofstream( const basic_ofstream& rhs) = delete; (5) (since C++11) Constructs new file stream.

std::basic_istringstream::str

std::basic_string<CharT,Traits,Allocator> str() const; (1) void str(const std::basic_string<CharT,Traits,Allocator>& new_str); (2) Manages the contents of the underlying string object. 1) Returns a copy of the underlying string as if by calling rdbuf()->str(). 2) Replaces the contents of the underlying string as if by calling rdbuf()->str(new_str). Parameters new_str - new contents of the underlying string Return value 1) a copy of the underlyin

std::basic_istringstream::swap

void swap( basic_istringstream& other ); (since C++11) Exchanges the state of the stream with those of other. This is done by callingbasic_istream<CharT, Traits>::swap(other) and rdbuf()->swap(*other.rdbuf()). Parameters other - stream to exchange the state with Return value (none). Example See also operator= (C++11) moves the string stream (public member function) swap (C++11) swaps two basic_stringbuf objects (public member function of st

std::basic_istringstream::rdbuf

std::basic_stringbuf<CharT, Traits, Allocator>* rdbuf() const; Returns pointer to the underlying raw string device object. Parameters (none). Return value Pointer to the underlying raw string device. Example

std::basic_istringstream::basic_istringstream

explicit basic_istringstream( ios_base::openmode mode = ios_base::in ); (1) explicit basic_istringstream( const std::basic_string<CharT,Traits,Allocator>& str, ios_base::openmode mode = ios_base::in ); (2) basic_istringstream( basic_istringstream&& other ); (3) (since C++11) Constructs new string stream. 1) Constructs new underlying string device. The underlying basic_stringbuf object is constructed as basic_stringbuf<Char,Traits,All

std::basic_istringstream

Defined in header <sstream> template< class CharT, class Traits = std::char_traits<CharT> > class basic_istringstream; (until C++11) template< class CharT, class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT> > class basic_istringstream; (since C++11) The class template std::basic_istringstream implements input operations on memory (std::basic_string) based streams. It essentially wraps a