source: liblaziness/show.h @ 9

Last change on this file since 9 was 4, checked in by artyom, 13 years ago

liblaziness

File size: 355 bytes
Line 
1#ifndef __SHOW_H__
2#define __SHOW_H__
3#include <string>
4#include <sstream>
5
6class IShow
7{
8        public:
9                virtual std::string show() const;
10};
11
12std::string show(Int i)
13{
14        std::stringstream ss;
15        ss << i;
16        return ss.str();
17}
18
19std::string show(IShow& showable)
20{
21        return showable.show();
22}
23
24std::string show(IShow&& showable)
25{
26        return showable.show();
27}
28
29#endif
Note: See TracBrowser for help on using the repository browser.