mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-13 20:57:06 +01:00
Merge branch 'develop' into feature/hmc_generalise
This commit is contained in:
@ -26,7 +26,7 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#include <Grid.h>
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace std;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Grid.h>
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
using namespace Grid;
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
@ -150,14 +150,14 @@ friend inline bool operator==(const cname &lhs, const cname &rhs) {\
|
||||
class name: public Grid::Serializable\
|
||||
{\
|
||||
public:\
|
||||
enum EnumType\
|
||||
enum\
|
||||
{\
|
||||
GRID_MACRO_EVAL(GRID_MACRO_MAP(GRID_MACRO_ENUMVAL,__VA_ARGS__))\
|
||||
undefname = -1\
|
||||
};\
|
||||
public:\
|
||||
name(void): value_(undefname) {};\
|
||||
name(EnumType value): value_(value) {};\
|
||||
name(int value): value_(value) {};\
|
||||
template <typename T>\
|
||||
static inline void write(Grid::Writer<T> &WR,const std::string &s, const name &obj)\
|
||||
{\
|
||||
@ -177,7 +177,7 @@ public:\
|
||||
GRID_MACRO_EVAL(GRID_MACRO_MAP(GRID_MACRO_ENUMTEST,__VA_ARGS__))\
|
||||
else {obj = name::undefname;}\
|
||||
}\
|
||||
inline operator EnumType(void) const\
|
||||
inline operator int(void) const\
|
||||
{\
|
||||
return value_;\
|
||||
}\
|
||||
@ -189,8 +189,17 @@ public:\
|
||||
}\
|
||||
return os;\
|
||||
}\
|
||||
inline friend std::istream & operator>>(std::istream &is, name &obj)\
|
||||
{\
|
||||
std::string buf;\
|
||||
is >> buf;\
|
||||
if (buf == #undefname) {obj = name::undefname;}\
|
||||
GRID_MACRO_EVAL(GRID_MACRO_MAP(GRID_MACRO_ENUMTEST,__VA_ARGS__))\
|
||||
else {obj = name::undefname;}\
|
||||
return is;\
|
||||
}\
|
||||
private:\
|
||||
EnumType value_;\
|
||||
int value_;\
|
||||
};
|
||||
|
||||
|
||||
|
@ -27,8 +27,7 @@
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#include <Grid.h>
|
||||
#include <ctype.h>
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace std;
|
||||
|
@ -26,7 +26,7 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#include <Grid.h>
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace std;
|
||||
|
Reference in New Issue
Block a user