source:
liblaziness/show.h
@
29
Last change on this file since 29 was 4, checked in by artyom, 13 years ago | |
---|---|
File size: 355 bytes |
Line | |
---|---|
1 | #ifndef __SHOW_H__ |
2 | #define __SHOW_H__ |
3 | #include <string> |
4 | #include <sstream> |
5 | |
6 | class IShow |
7 | { |
8 | public: |
9 | virtual std::string show() const; |
10 | }; |
11 | |
12 | std::string show(Int i) |
13 | { |
14 | std::stringstream ss; |
15 | ss << i; |
16 | return ss.str(); |
17 | } |
18 | |
19 | std::string show(IShow& showable) |
20 | { |
21 | return showable.show(); |
22 | } |
23 | |
24 | std::string show(IShow&& showable) |
25 | { |
26 | return showable.show(); |
27 | } |
28 | |
29 | #endif |
Note: See TracBrowser
for help on using the repository browser.