source: trunk/IPs/systemC/processor/Morpheo/Common/Include/FromString.h @ 43

Last change on this file since 43 was 43, checked in by rosiere, 17 years ago

Modif mineur : ajout d'info de débug

Release non stable

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
17namespace 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.