| 
    Jpp 20.0.0-rc.3
    
   the software that should make you happy 
   | 
 
Object writing to file. More...
#include <JFileRecorder.hh>
  
Public Types | |
| typedef JSharedPointer< JAccessibleObjectOutput< T > > | helper_type | 
| typedef JPointer< JAccessibleObjectOutput< T > > | pointer_type | 
| typedef JStorage< JAccessibleObjectOutput< T >, JNew > | storage_type | 
| typedef JNew< JAccessibleObjectOutput< T > > | memory_type | 
Public Member Functions | |
| JFileRecorder () | |
| Default constructor.   | |
| JFileRecorder (const char *file_name) | |
| Constructor.   | |
| const std::string & | getFilename () const | 
| Get file name.   | |
| const void | setFilename (const std::string &file_name) | 
| Set file name.   | |
| virtual void | open (const char *file_name) override | 
| Open file.   | |
| void | open () | 
| Open file.   | |
| virtual JAccessibleObjectOutput< T > * | getHelper () const override | 
| Get helper.   | |
| virtual bool | put (const T &object) override | 
| Object output.   | |
| virtual bool | is_open () const override | 
| Check is device is open.   | |
| virtual void | close () override | 
| Close device.   | |
| const JSharedPointer & | getSharedPointer () const | 
| Get shared pointer.   | |
| JSharedPointer & | getSharedPointer () | 
| Get shared pointer.   | |
| void | setSharedPointer (const JSharedPointer &object) | 
| Set shared pointer.   | |
| virtual void | reset () override | 
| Reset pointer.   | |
| void | reset (const JPointer< T > &pointer) | 
| Reset pointer.   | |
| void | reset (JAccessibleObjectOutput< T > *p) | 
| Reset pointer.   | |
| void | set (const JPointer< T > &pointer) | 
| Set pointer.   | |
| void | initialise () | 
| Initialise counter.   | |
| void | attach (const JSharedCounter &object) | 
| Attach this counter to given shared counter object.   | |
| bool | detach () | 
| Detach.   | |
| const int | getCount () | 
| Get count.   | |
| void | recreate () | 
| Recreate object in memory.   | |
| void | create () | 
| Create object in memory.   | |
| void | create (const unsigned int size) | 
| Create array of objects in memory.   | |
| virtual JAccessibleObjectOutput< T > * | get () const override | 
| Get pointer.   | |
| JAccessibleObjectOutput< T > *const & | getReference () const | 
| Get rereference to internal pointer.   | |
| JAccessibleObjectOutput< T > *& | getReference () | 
| Get rereference to internal pointer.   | |
| virtual bool | equals (const JAbstractPointer &object) const | 
| Equals.   | |
| bool | is_valid () const | 
| Check validity of pointer.   | |
| JAccessibleObjectOutput< T > * | operator-> () const | 
| Smart pointer operator.   | |
| operator JAccessibleObjectOutput< T > * () const | |
| Type conversion operator.   | |
Static Public Member Functions | |
| static void | release (JAccessibleObjectOutput< T > *p) | 
| Release memory.   | |
| 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.   | |
Protected Member Functions | |
| void | set (const JSharedPointer &object) | 
| Set pointer.   | |
| virtual void | set (JAccessibleObjectOutput< T > *p) override | 
| Set pointer.   | |
| void | release () | 
| Release memory.   | |
Protected Attributes | |
| std::string | fileName | 
| int * | counter | 
| JAccessibleObjectOutput< T > * | __p | 
| pointer to object   | |
Static Protected Attributes | |
| static bool | do_throw | 
| throw option   | |
Friends | |
| std::istream & | operator>> (std::istream &in, JFileRecorder &recorder) | 
| Read file recorder from input.   | |
| std::ostream & | operator<< (std::ostream &out, const JFileRecorder &recorder) | 
| Write file recorder to output.   | |
Object writing to file.
This class implements the method open of the JLANG::JAccessible interface. The file format is derived from the file name extension. The method open can be called to open a file after reading the file name.
Definition at line 42 of file JFileRecorder.hh.
      
  | 
  inherited | 
Definition at line 64 of file JObjectWriter.hh.
      
  | 
  inherited | 
Definition at line 34 of file JSharedPointer.hh.
      
  | 
  inherited | 
Definition at line 35 of file JSharedPointer.hh.
      
  | 
  inherited | 
Definition at line 33 of file JStorage.hh.
      
  | 
  inline | 
Default constructor.
Definition at line 49 of file JFileRecorder.hh.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inlineoverridevirtual | 
Open file.
| file_name | file name | 
Implements JLANG::JAccessible.
Definition at line 93 of file JFileRecorder.hh.
      
  | 
  inline | 
Open file.
Definition at line 104 of file JFileRecorder.hh.
      
  | 
  inlineoverridevirtualinherited | 
Get helper.
Implements JLANG::JAbstractAccessibleObjectWriter< T >.
Definition at line 78 of file JObjectWriter.hh.
      
  | 
  inlineoverridevirtualinherited | 
Object output.
| object | object | 
Implements JLANG::JObjectOutput< T >.
Definition at line 43 of file JAbstractObjectWriter.hh.
      
  | 
  inlineoverridevirtualinherited | 
Check is device is open.
Implements JLANG::JAccessible.
Definition at line 102 of file JAbstractObjectWriter.hh.
      
  | 
  inlineoverridevirtualinherited | 
Close device.
Implements JLANG::JAccessible.
Definition at line 127 of file JAbstractObjectWriter.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Set shared pointer.
| object | shared pointer | 
Definition at line 117 of file JSharedPointer.hh.
      
  | 
  inlineoverridevirtualinherited | 
Reset pointer.
The reference counter is decremented by one and the object pointed to previously is deleted when its reference counter is zero.
Reimplemented from JLANG::JStorage< JAccessibleObjectOutput< T >, JNew >.
Definition at line 171 of file JSharedPointer.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Reset pointer.
| p | pointer to object | 
Definition at line 94 of file JAbstractPointer.hh.
      
  | 
  inlineprotectedinherited | 
Set pointer.
The reference counter of the shared object pointed to is incremented by one.
| object | shared pointer | 
Definition at line 188 of file JSharedPointer.hh.
      
  | 
  inlineoverrideprotectedvirtualinherited | 
Set pointer.
The reference counter of the shared object pointed to is initialised to one.
| p | pointer to derived class object | 
Reimplemented from JLANG::JPointer< JAccessibleObjectOutput< T > >.
Definition at line 202 of file JSharedPointer.hh.
      
  | 
  inlineinherited | 
Set pointer.
| pointer | pointer to object | 
Definition at line 96 of file JPointer.hh.
      
  | 
  inlineinherited | 
Initialise counter.
Definition at line 33 of file JSharedCounter.hh.
      
  | 
  inlineinherited | 
Attach this counter to given shared counter object.
| object | shared counter | 
Definition at line 46 of file JSharedCounter.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Recreate object in memory.
A new object is created if no memory is allocated yet, else the previously created object is maintained.
Definition at line 57 of file JStorage.hh.
      
  | 
  inlineinherited | 
Create object in memory.
The memory allocated by a previously created object will be released.
Definition at line 69 of file JStorage.hh.
      
  | 
  inlineinherited | 
Create array of objects in memory.
The memory allocated by previously created objects will be released.
| size | number of elements | 
Definition at line 81 of file JStorage.hh.
      
  | 
  inlineprotectedinherited | 
Release memory.
Definition at line 91 of file JStorage.hh.
      
  | 
  inlinestaticinherited | 
Release memory.
| p | pointer to data | 
Definition at line 41 of file JMemory.hh.
      
  | 
  inlineoverridevirtualinherited | 
Get pointer.
Implements JLANG::JAbstractPointer< JAccessibleObjectOutput< T > >.
Definition at line 64 of file JPointer.hh.
      
  | 
  inlineinherited | 
Get rereference to internal pointer.
Definition at line 119 of file JPointer.hh.
      
  | 
  inlineinherited | 
Get rereference to internal pointer.
Definition at line 130 of file JPointer.hh.
      
  | 
  inlinevirtualinherited | 
Equals.
The equality is evaluated by comparison of the internal pointers.
| object | abstract pointer | 
Definition at line 50 of file JAbstractPointer.hh.
      
  | 
  inlineinherited | 
Check validity of pointer.
Definition at line 83 of file JAbstractPointer.hh.
      
  | 
  inlineinherited | 
Smart pointer operator.
Definition at line 112 of file JAbstractPointer.hh.
      
  | 
  inlineinherited | 
Type conversion operator.
Definition at line 126 of file JAbstractPointer.hh.
      
  | 
  inlinestaticinherited | 
      
  | 
  inlinestaticinherited | 
      
  | 
  friend | 
Read file recorder from input.
| in | input stream | 
| recorder | JFileRecorder | 
Definition at line 152 of file JFileRecorder.hh.
      
  | 
  friend | 
Write file recorder to output.
| out | output stream | 
| recorder | JFileRecorder | 
Definition at line 167 of file JFileRecorder.hh.
      
  | 
  protected | 
Definition at line 175 of file JFileRecorder.hh.
      
  | 
  protectedinherited | 
Definition at line 94 of file JSharedCounter.hh.
      
  | 
  protectedinherited | 
pointer to object
Definition at line 136 of file JPointer.hh.
      
  | 
  staticprotectedinherited |