MNE-CPP
beta 1.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
MNE
generics
typename_old.h
Go to the documentation of this file.
1
//=============================================================================================================
36
#ifndef TYPENAMEOLD_H
37
#define TYPENAMEOLD_H
38
39
40
#define DECLARE_TYPE_NAME(x) template<> const char *typename<x>::name = #x;
41
#define GET_TYPE_NAME(x) (CTypeName<typeof(x)>::name)
43
DECLARE_TYPE_NAME(int);
44
DECLARE_TYPE_NAME
(
short
);
45
DECLARE_TYPE_NAME
(
char
);
46
DECLARE_TYPE_NAME
(
double
);
47
48
//=============================================================================================================
54
template
<
typename
T>
class
CTypeName
{
55
public
:
56
static
const
char
*
name
;
57
};
58
59
60
#endif // TYPENAMEOLD_H
CTypeName
The CTypeName template class provides a static const to get the type of the template by name...
Definition:
typename_old.h:54
DECLARE_TYPE_NAME
#define DECLARE_TYPE_NAME(x)
Definition:
typename_old.h:40
CTypeName::name
static const char * name
Definition:
typename_old.h:56
Generated on Fri Mar 27 2015 22:54:31 for MNE-CPP by
1.8.9.1