#include <IOManager.h>
Inheritance diagram for Sct::IOManager:

Methods for Streamable implementors | |
  | |
| virtual void | writeImpl (OStream &out, const Streamable &ob, bool writeClassName) const | 
| Writes a Streamable to an output stream.   | |
| virtual void | writeImpl (OStream &out, const Streamable &ob, const string &className) const | 
| Writes a Streamable to an output stream with a different name - to be used for base classes.   | |
| virtual void | writeImpl (OStream &out, const Streamable &ob, const char *className) const | 
| explicitly calls same with string as final argument, to prevent implicit conversion to bool   | |
| virtual shared_ptr< Streamable > | readImpl (IStream &in) const | 
| Read a Streamable from an input stream.   | |
| virtual shared_ptr< Streamable > | readImpl (IStream &in, const string &className) const | 
| Read a Streamable from an input stream.   | |
| virtual shared_ptr< Streamable > | readImpl (IStream &in, const char *className) const | 
| explicit conversion to string for the final argument prevents accidental implicit conversion to bool.   | |
| virtual void | readImpl (IStream &in, Streamable &ob, bool readClassName) const | 
| Read a Streamable from an input stream.   | |
| virtual void | readImpl (IStream &in, Streamable &ob, const string &className) const | 
| Read a Streamable from an input stream with different classname - to be used for derrived classes.   | |
| virtual void | readImpl (IStream &in, Streamable &ob, const char *className) const | 
| calls method with explicit string in last arg to prevent implicit conversion to bool   | |
| virtual void | writeClassName (OStream &out, const string &className) const | 
| Writes a class name to an OStream.   | |
| virtual string | readClassName (IStream &in) const | 
| Read a class name from an IStream.   | |
| bool | addToMap (const std::string &className, std::auto_ptr< Streamer > s) throw () | 
| Add a Streamer to the map.   | |
Methods for sub-class authors | |
  | |
| 
typedef map< string, shared_ptr< Streamer > >  | StreamerMap | 
| virtual Streamer & | getStreamer (const string &className) const | 
| A sub-class can override this if it wants to influence the Streamer that will be used for a particular class.   | |
| virtual Streamer & | getStreamer (const string &className, const unsigned version) const | 
| Get a particular verion of a streamer, to be used e.g.   | |
| StreamerMap & | getMap () throw () | 
| map of classname, streamer   | |
| StreamerMap & | getFullVersionMap () throw () | 
| map of mapname (=classname/version), streamer   | |
| std::string | getMapName (const std::string &classname, const unsigned version) throw () | 
| class | Streamer | 
Public Member Functions | |
Methods for users  | |
{   | |
| virtual void | write (const Serializable &ob, const IOParams *params=0) const=0 | 
| Write an object.   | |
| virtual shared_ptr< Serializable > | read (const string &name, const IOParams *params=0) const=0 | 
| Read an object.   | |
Possibilities are raw file, IS, some other form of persistency. Perhaps even a viewer.
Some methods here deal with a name. This is a backend specific identifier - e.g. a filename or an IS name. In order to retrieve a name, a backend specific method or an appropriate IOName sub-class should be used.
shared_ptr is returned sometimes, rather than auto_ptr to allow singletons to be returned which might be indicated by some numeric ID for instance.
Definition at line 43 of file IOManager.h.
      
  | 
  ||||||||||||
| 
 Add a Streamer to the map. The Streamer will be used to do IO on classes named className. 
 
 Definition at line 17 of file IOManager.cpp. References Sct::AbstractThrowable::sendToMrs().  | 
  
Here is the call graph for this function:

      
  | 
  
| 
 map of mapname (=classname/version), streamer 
 Definition at line 55 of file IOManager.cpp. Referenced by getStreamer().  | 
  
      
  | 
  
| 
 map of classname, streamer 
 Definition at line 60 of file IOManager.cpp. Referenced by getStreamer().  | 
  
      
  | 
  ||||||||||||
| 
 Get a particular verion of a streamer, to be used e.g. by archival when reading data saved with old streamers. Definition at line 82 of file IOManager.cpp. References getFullVersionMap().  | 
  
Here is the call graph for this function:

      
  | 
  
| 
 A sub-class can override this if it wants to influence the Streamer that will be used for a particular class. 
 
 
 Reimplemented in Sct::Archive::IOManagerStreamerVersioned. Definition at line 65 of file IOManager.cpp. References getMap(). Referenced by readImpl(), Sct::IOManagerDummy::testStreaming1(), Sct::IOManagerDummy::testStreaming2(), and writeImpl().  | 
  
Here is the call graph for this function:

      
  | 
  ||||||||||||
| 
 Read an object. Will determine the class by first reading a string assumed to contain the className. 
 
 Implemented in Sct::Archive::IOManagerArchiveFile, Sct::IOManagerDummy, and Sct::IS::IOManagerIS.  | 
  
      
  | 
  
| 
 Read a class name from an IStream. Should only be overriden if absolutely necessary. Sub-classes should use this method if ever they need to write a class name and avoid proprietry solutions as they may break Java compatability. 
 
 
 Reimplemented in Sct::Archive::IOManagerStreamerVersioned. Definition at line 170 of file IOManager.cpp. Referenced by readImpl().  | 
  
      
  | 
  ||||||||||||||||
| 
 calls method with explicit string in last arg to prevent implicit conversion to bool 
 Definition at line 142 of file IOManager.cpp. References readImpl().  | 
  
Here is the call graph for this function:

      
  | 
  ||||||||||||||||
| 
 Read a Streamable from an input stream with different classname - to be used for derrived classes. 
 
 
 Definition at line 132 of file IOManager.cpp. References getStreamer(), and Sct::Streamer::read().  | 
  
Here is the call graph for this function:

      
  | 
  ||||||||||||||||
| 
 Read a Streamable from an input stream. 
 
 
 Reimplemented in Sct::Archive::IOManagerStreamerVersioned. Definition at line 151 of file IOManager.cpp. References Sct::Streamable::getClassName(), getStreamer(), Sct::Streamer::read(), and readClassName().  | 
  
Here is the call graph for this function:

      
  | 
  ||||||||||||
| 
 explicit conversion to string for the final argument prevents accidental implicit conversion to bool. 
 Definition at line 146 of file IOManager.cpp. References readImpl().  | 
  
Here is the call graph for this function:

      
  | 
  ||||||||||||
| 
 Read a Streamable from an input stream. Corresponds to write with writeClassName=false. 
 
 
 Definition at line 137 of file IOManager.cpp. References getStreamer(), and Sct::Streamer::read().  | 
  
Here is the call graph for this function:

      
  | 
  
| 
 Read a Streamable from an input stream. Reads the class name from the stream first. Corresponds to write with writeClassName=true. 
 
 
 Reimplemented in Sct::Archive::IOManagerStreamerVersioned. Definition at line 126 of file IOManager.cpp. References getStreamer(), Sct::Streamer::read(), and readClassName(). Referenced by SctData::IO::RawScanResultStreamer_v2::read(), SctData::IO::RawScanResultStreamer_v1::read(), and readImpl().  | 
  
Here is the call graph for this function:

      
  | 
  ||||||||||||
| 
 Write an object. 
 
 
 Implemented in Sct::Archive::IOManagerArchiveFile, Sct::IOManagerDummy, and Sct::IS::IOManagerIS.  | 
  
      
  | 
  ||||||||||||
| 
 Writes a class name to an OStream. Should only be overriden if absolutely necessary. Sub-classes should use this method if ever they need to write a class name and avoid proprietry solutions as they may break Java compatability. 
 
 Reimplemented in Sct::Archive::IOManagerStreamerVersioned. Definition at line 166 of file IOManager.cpp. Referenced by writeImpl().  | 
  
      
  | 
  ||||||||||||||||
| 
 explicitly calls same with string as final argument, to prevent implicit conversion to bool 
 Definition at line 117 of file IOManager.cpp. References writeImpl().  | 
  
Here is the call graph for this function:

      
  | 
  ||||||||||||||||
| 
 Writes a Streamable to an output stream with a different name - to be used for base classes. 
 
 
 Definition at line 121 of file IOManager.cpp. References getStreamer(), and Sct::Streamer::write().  | 
  
Here is the call graph for this function:

      
  | 
  ||||||||||||||||
| 
 Writes a Streamable to an output stream. 
 
 
 Reimplemented in Sct::Archive::IOManagerStreamerVersioned. Definition at line 111 of file IOManager.cpp. References Sct::Streamable::getClassName(), getStreamer(), Sct::Streamer::write(), and writeClassName(). Referenced by SctData::IO::RawScanResultStreamer_v2::write(), SctData::IO::RawScanResultStreamer_v1::write(), and writeImpl().  | 
  
Here is the call graph for this function:

 
1.3.5