GeNN  1.1
GPU enhanced Neuronal Networks (GeNN)
 All Classes Files Functions Variables Typedefs Macros Pages
toString.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------
2  Author: Thomas Nowotny
3 
4  Institute: Center for Computational Neuroscience and Robotics
5  University of Sussex
6  Falmer, Brighton BN1 9QJ, UK
7 
8  email to: T.Nowotny@sussex.ac.uk
9 
10  initial version: 2010-02-07
11 
12 --------------------------------------------------------------------------*/
13 
14 #ifndef _TOSTRING_H_
15 #define _TOSTRING_H_
16 
17 
18 //--------------------------------------------------------------------------
23 //--------------------------------------------------------------------------
24 
25 using namespace std;
26 
27 #include <string>
28 #include <sstream>
29 
30 //--------------------------------------------------------------------------
33 //--------------------------------------------------------------------------
34 
35 template<typename T>
36 std::string toString(T t)
37 {
38  std::stringstream s;
39  s << t;
40  return s.str();
41 }
42 
43 #define tS(X) toString(X)
44 
45 #endif
std::string toString(T t)
template function for string conversion from const char* to C++ string
Definition: toString.h:36
double t
Definition: VClampGA.h:41