Object(s) writing to ASCII file.  
 More...
#include <JASCIIFileWriter.hh>
 | 
|   | JASCIIFileWriter () | 
|   | Default constructor.  
  | 
|   | 
|   | JASCIIFileWriter (const char *file_name) | 
|   | Constructor.  
  | 
|   | 
|   | JASCIIFileWriter (const char *file_name, const std::string &sep) | 
|   | Constructor.  
  | 
|   | 
| virtual bool  | is_open () const | 
|   | Check is file is open.  
  | 
|   | 
| virtual void  | open (const char *file_name) | 
|   | Open file.  
  | 
|   | 
| virtual void  | close () | 
|   | Close file.  
  | 
|   | 
| virtual bool  | put (const T &object) override | 
|   | Object output.  
  | 
|   | 
| const std::string &  | getSeparator () const | 
|   | Get token separator.  
  | 
|   | 
| void  | setSeparator (const std::string &sep) | 
|   | Set token separator.  
  | 
|   | 
 | 
| static void  | Throw (const bool option) | 
|   | Enable/disable throw option.  
  | 
|   | 
| static int  | Throw (const JException_t &error, const int value=-1) | 
|   | Throw exception or return error.  
  | 
|   | 
template<class T>
class JLANG::JASCIIFileWriter< T >
Object(s) writing to ASCII file. 
This class implements the JAccessibleObjectOutput interface. 
Definition at line 27 of file JASCIIFileWriter.hh.
 
◆ JASCIIFileWriter() [1/3]
Default constructor. 
Definition at line 36 of file JASCIIFileWriter.hh.
   36                       :
   39    {}
JAccessibleOutputStream()
Default constructor.
 
JStreamObjectOutput(std::ostream &out, const std::string &sep="")
Constructor.
 
 
 
 
◆ JASCIIFileWriter() [2/3]
◆ JASCIIFileWriter() [3/3]
Constructor. 
- Parameters
 - 
  
    | file_name | file name  | 
    | sep | token separator  | 
  
   
Definition at line 59 of file JASCIIFileWriter.hh.
 
 
◆ is_open()
  
  
      
        
          | virtual bool JLANG::JAccessibleOutputStream::is_open  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinevirtualinherited   | 
  
 
 
◆ open()
  
  
      
        
          | virtual void JLANG::JAccessibleOutputStream::open  | 
          ( | 
          const char * |           file_name | ) | 
           | 
         
       
   | 
  
inlinevirtualinherited   | 
  
 
 
◆ close()
  
  
      
        
          | virtual void JLANG::JAccessibleOutputStream::close  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinevirtualinherited   | 
  
 
 
◆ put()
template<class T > 
  
  | 
      
   | 
  
inlineoverridevirtualinherited   | 
  
 
 
◆ getSeparator()
◆ setSeparator()
◆ Throw() [1/2]
Enable/disable throw option. 
- Parameters
 - 
  
    | option | true enable; false disable  | 
  
   
Definition at line 37 of file JThrow.hh.
 
 
◆ Throw() [2/2]
Throw exception or return error. 
- Parameters
 - 
  
    | error | exception  | 
    | value | return code  | 
  
   
- Returns
 - return code 
 
Definition at line 51 of file JThrow.hh.
   52    {
   54      
   56        throw error;
   57      }
   58 
   59      cerr << error.what() << endl;
   60      
   61      return value;
   62    }
 
 
 
◆ __out
◆ __sep
◆ do_throw
throw option 
Set default throw option to true. 
Definition at line 28 of file JThrow.hh.
 
 
The documentation for this class was generated from the following file: