Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

strstr2str.h File Reference

Utility functions for safe conversion of an {o}strstream to a string (unfreezes the {o}strstream, so that memory is released upon its destruction). More...

#include <string>
#include <strstream>

Include dependency graph for strstr2str.h:

Include dependency graph

Go to the source code of this file.

Namespaces

namespace  Dv
namespace  Dv::Util

Functions

std::string strstream2str (std::strstream &ss)
 Safely convert ss to string.
std::string strstream2str (std::ostrstream &ss)
 Safely convert ss to string.
std::string & strstream2str (std::strstream &ss, std::string &s)
 Safely convert ss to string s, return s.
std::string & strstream2str (std::ostrstream &ss, std::string &s)
 Safely convert ss to string s, return s.


Detailed Description

Utility functions for safe conversion of an {o}strstream to a string (unfreezes the {o}strstream, so that memory is released upon its destruction).

Not very useful, once {o}stringstream is available:

Definition in file strstr2str.h.


Function Documentation

std::string strstream2str std::strstream &  ss  ) 
 

Safely convert ss to string.

std::string strstream2str std::ostrstream &  ss  ) 
 

Safely convert ss to string.

std::string& strstream2str std::strstream &  ss,
std::string &  s
 

Safely convert ss to string s, return s.

std::string& strstream2str std::ostrstream &  ss,
std::string &  s
 

Safely convert ss to string s, return s.


dvutil-0.13.15 [30 December, 2004]