Last change
on this file since 36 was
15,
checked in by rosiere, 17 years ago
|
Interface normalisé
Début du banc de registres multi niveaux
|
File size:
523 bytes
|
Line | |
---|
1 | #ifndef morpheo_fromstring |
---|
2 | #define morpheo_fromstring |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id$ |
---|
6 | * |
---|
7 | * [ Description ] |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | // #include <iosfwd> |
---|
12 | // #include <sstream> |
---|
13 | // #include <iomanip> |
---|
14 | #include <string> |
---|
15 | // #include <limits> |
---|
16 | |
---|
17 | namespace morpheo { |
---|
18 | |
---|
19 | template<typename T> inline T fromString (const std::string& x) |
---|
20 | { |
---|
21 | return static_cast<T>(x.c_str()); |
---|
22 | } |
---|
23 | |
---|
24 | template<> inline int fromString<int> (const std::string& x) |
---|
25 | { |
---|
26 | return atoi(x.c_str()); |
---|
27 | } |
---|
28 | |
---|
29 | }; // end namespace morpheo |
---|
30 | |
---|
31 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.