mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-10 19:36:56 +01:00
Hadrons: module parameters can now be accessed from outside
This commit is contained in:
@ -67,9 +67,8 @@ namespace Grid {
|
||||
return os;
|
||||
}
|
||||
|
||||
class Serializable {};
|
||||
|
||||
// static polymorphism implemented using CRTP idiom
|
||||
class Serializable;
|
||||
|
||||
// Static abstract writer
|
||||
template <typename T>
|
||||
@ -122,6 +121,27 @@ namespace Grid {
|
||||
T *upcast;
|
||||
};
|
||||
|
||||
// serializable base class
|
||||
class Serializable
|
||||
{
|
||||
public:
|
||||
template <typename T>
|
||||
static inline void write(Writer<T> &WR,const std::string &s,
|
||||
const Serializable &obj)
|
||||
{}
|
||||
|
||||
template <typename T>
|
||||
static inline void read(Reader<T> &RD,const std::string &s,
|
||||
Serializable &obj)
|
||||
{}
|
||||
|
||||
friend inline std::ostream & operator<<(std::ostream &os,
|
||||
const Serializable &obj)
|
||||
{
|
||||
return os;
|
||||
}
|
||||
};
|
||||
|
||||
// Generic writer interface
|
||||
template <typename T>
|
||||
inline void push(Writer<T> &w, const std::string &s)
|
||||
|
Reference in New Issue
Block a user