Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
JASCIIFileWriter.hh
Go to the documentation of this file.
1 #ifndef __JLANG__JASCIIFILEWRITER__
2 #define __JLANG__JASCIIFILEWRITER__
3 
4 #include <string>
5 #include <ostream>
6 
9 
10 
11 /**
12  * \author mdejong
13  */
14 
15 namespace JLANG {}
16 namespace JPP { using namespace JLANG; }
17 
18 namespace JLANG {
19 
20 
21  /**
22  * Object(s) writing to ASCII file.
23  *
24  * This class implements the JAccessibleObjectOutput interface.
25  */
26  template<class T>
29  public JStreamObjectOutput <T>,
30  public JAccessibleObjectOutput<T>
31  {
32  public:
33  /**
34  * Default constructor.
35  */
38  JStreamObjectOutput<T>(static_cast<std::ostream&>(*this), "")
39  {}
40 
41 
42  /**
43  * Constructor.
44  *
45  * \param file_name file name
46  */
47  JASCIIFileWriter(const char* file_name) :
48  JAccessibleOutputStream(file_name),
49  JStreamObjectOutput<T>(static_cast<std::ostream&>(*this), "")
50  {}
51 
52 
53  /**
54  * Constructor.
55  *
56  * \param file_name file name
57  * \param sep token separator
58  */
59  JASCIIFileWriter(const char* file_name,
60  const std::string& sep) :
61  JAccessibleOutputStream(file_name),
62  JStreamObjectOutput<T>(static_cast<std::ostream&>(*this), sep)
63  {}
64  };
65 }
66 
67 #endif
Object(s) writing to ASCII file.
JASCIIFileWriter(const char *file_name)
Constructor.
JASCIIFileWriter()
Default constructor.
JASCIIFileWriter(const char *file_name, const std::string &sep)
Constructor.
Interface for object output with named access.
Accessible output stream.
Template implementation of stream output for single data type.
Auxiliary classes and methods for language specific functionality.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JSTDTypes.hh:14