Go to the documentation of this file. 1 #ifndef __JLANG__JOBJECTIO__
2 #define __JLANG__JOBJECTIO__
17 namespace JPP {
using namespace JLANG; }
28 template<
class JReader_t>
41 inline bool getError(
const std::ifstream& reader)
43 return reader.bad() || (reader.fail() && !reader.eof());
53 template<
class JReader_t,
class T>
54 inline void load(
const char* file_name, T&
object)
66 template<
class JWriter_t,
class T>
67 inline void store(
const char* file_name,
const T&
object)
90 template<
class JReader_t,
class T>
93 JReader_t in(file_name);
126 template<
class JWriter_t,
class T>
129 JWriter_t out(file_name);
void load(const char *file_name, T &object, JType< JReader_t > type)
Load object from input file.
Auxiliary class for a type holder.
Exception for reading of file.
Exception for opening of file.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
void store(const char *file_name, const T &object, JType< JWriter_t > type)
Store object to output file.
bool getError(const std::ifstream &reader)
Get error status of reader.
Auxiliary classes and methods for language specific functionality.