diff options
author | Jose <jose@zeroc.com> | 2015-03-11 20:38:55 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-03-11 20:38:55 +0100 |
commit | 6c03e2886ee02a3c4d2d82b9fd173885e147863e (patch) | |
tree | 930c2c8f413c9133765286c087a7a33daf5aeaad /cpp/include | |
parent | Several changes for clean. (diff) | |
download | ice-6c03e2886ee02a3c4d2d82b9fd173885e147863e.tar.bz2 ice-6c03e2886ee02a3c4d2d82b9fd173885e147863e.tar.xz ice-6c03e2886ee02a3c4d2d82b9fd173885e147863e.zip |
Fixed OutputUtil to not use char* in the API
* Remove setBeginBlock/setEndBlock unused methods
Diffstat (limited to 'cpp/include')
-rw-r--r-- | cpp/include/IceUtil/OutputUtil.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/cpp/include/IceUtil/OutputUtil.h b/cpp/include/IceUtil/OutputUtil.h index f0fba017732..4cfda1d1214 100644 --- a/cpp/include/IceUtil/OutputUtil.h +++ b/cpp/include/IceUtil/OutputUtil.h @@ -37,17 +37,17 @@ public: OutputBase(); OutputBase(std::ostream&); - OutputBase(const char*); + OutputBase(const std::string&); virtual ~OutputBase(); void setIndent(int); // What is the indent level? void setUseTab(bool); // Should we output tabs? - void open(const char*); // Open output stream. + void open(const std::string&); // Open output stream. void close(); // Close output stream. bool isOpen(); // Is a file stream open? - virtual void print(const char*); // Print a string. + virtual void print(const std::string&); // Print a string. void inc(); // Increment indentation level. void dec(); // Decrement indentation level. @@ -96,10 +96,7 @@ public: Output(std::ostream&); Output(const char*); - virtual void print(const char*); // Print a string. - - void setBeginBlock(const char *); // what do we use at block starts? - void setEndBlock(const char *); // what do we use the block end? + virtual void print(const std::string&); // Print a string. void sb(); // Start a block. void eb(); // End a block. @@ -120,7 +117,7 @@ operator<<(Output& out, const T& val) { std::ostringstream s; s << val; - out.print(s.str().c_str()); + out.print(s.str()); return out; } @@ -217,7 +214,7 @@ public: XMLOutput(std::ostream&); XMLOutput(const char*); - virtual void print(const char*); // Print a string. + virtual void print(const std::string&); // Print a string. virtual void newline(); // Print newline. @@ -248,7 +245,7 @@ operator<<(XMLOutput& out, const T& val) { std::ostringstream s; s << val; - out.print(s.str().c_str()); + out.print(s.str()); return out; } |