diff options
author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2006-12-13 13:52:35 (GMT) |
---|---|---|
committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2006-12-13 13:52:35 (GMT) |
commit | cc73abf7e74edf0d6bc12bf6b2ba4e61837c2a73 (patch) | |
tree | 8249c4289c596edf155a3cb6d97d26c4cc948edc /Source/kwsys/kwsys_ios_sstream.h.in | |
parent | 7d1801beeea65394795bf4254e678bfc5d5631c2 (diff) | |
download | CMake-cc73abf7e74edf0d6bc12bf6b2ba4e61837c2a73.zip CMake-cc73abf7e74edf0d6bc12bf6b2ba4e61837c2a73.tar.gz CMake-cc73abf7e74edf0d6bc12bf6b2ba4e61837c2a73.tar.bz2 |
ENH: provide stringstream too. FIX: warning shadow var
Diffstat (limited to 'Source/kwsys/kwsys_ios_sstream.h.in')
-rw-r--r-- | Source/kwsys/kwsys_ios_sstream.h.in | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/kwsys/kwsys_ios_sstream.h.in b/Source/kwsys/kwsys_ios_sstream.h.in index ccf9113..f63a60d 100644 --- a/Source/kwsys/kwsys_ios_sstream.h.in +++ b/Source/kwsys/kwsys_ios_sstream.h.in @@ -64,6 +64,7 @@ using @KWSYS_NAMESPACE@_ios_namespace::ostream; using @KWSYS_NAMESPACE@_ios_namespace::istream; using @KWSYS_NAMESPACE@_ios_namespace::istrstream; using @KWSYS_NAMESPACE@_ios_namespace::ostrstream; +using @KWSYS_NAMESPACE@_ios_namespace::strstream; using @KWSYS_NAMESPACE@_ios_namespace::ios; using @KWSYS_NAMESPACE@_ios_namespace::endl; using @KWSYS_NAMESPACE@_ios_namespace::ends; @@ -91,9 +92,9 @@ public: { ostringstream_cleanup cleanup(*this); ostringstream_cleanup::IgnoreUnusedVariable(cleanup); - int pcount = this->pcount(); + int count = this->pcount(); const char* ptr = this->Superclass::str(); - return kwsys_stl::string(ptr?ptr:"", pcount); + return kwsys_stl::string(ptr?ptr:"", count); } void str(const kwsys_stl::string& s) { @@ -134,6 +135,17 @@ private: # pragma warning (pop) #endif +class stringstream: public istringstream, public ostringstream +{ +public: + stringstream():istringstream(),ostringstream() {} + kwsys_stl::string str() const { return istringstream::str(); } + kwsys_stl::string str() { return ostringstream::str(); } +private: + stringstream(const stringstream&); + void operator=(const stringstream&); +}; + } // namespace @KWSYS_NAMESPACE@_ios #endif |